suggest_warmup¶
Python reference for nagasim.experiments.suggest_warmup.
Suggest a warm-up length from a run's entity log with MSER-5.
MSER-5 (White 1997) groups the output series into batches of batch
observations and picks the truncation point d that minimises
sum_{i>d} (m_i - mean_{i>d})**2 / (k - d)**2 over the batch means
m_1..m_k: the head to drop that leaves the most precise estimate of the
steady-state mean. The series is the entity throughput time ordered by exit
time and averaged across replications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
dict or DataFrame
|
A results dict from |
required |
batch
|
int
|
Observations per batch. |
5
|
Returns:
| Type | Description |
|---|---|
WarmupSuggestion
|
|
See Also
nagasim.api.run_model : Produces the results this reads.
Examples:
>>> from pathlib import Path
>>> import nagasim
>>> from nagasim import api, experiments
>>> path = Path(nagasim.__file__).parent / "models" / "single_server.json"
>>> results = api.run_model(str(path), replications=2, run_length=300, warmup=0, seed=0)
>>> suggestion = experiments.suggest_warmup(results)
>>> suggestion.warmup >= 0 and suggestion.reliable in (True, False)
True