Skip to content

Commit 491092f

Browse files
committed
feat(full_model): + warmup event
1 parent 48315ff commit 491092f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

content/08_full_model.ipynb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,33 @@
642642
" env.process(service(caller_count, env, args))"
643643
]
644644
},
645+
{
646+
"cell_type": "markdown",
647+
"id": "ed7d9306-2f77-4f4f-bb14-ea3e4aebae0a",
648+
"metadata": {},
649+
"source": [
650+
"## 🥵 Warm-up period\n",
651+
"\n",
652+
"The call centre model starts from empty. If the call centre runs 24/7 then it is a non-terminating system and our estimates of waiting time and server utilisation are biased due to the empty period at the start of the simulation. We can remove this initialisation bias using a warm-up period. \n",
653+
"\n",
654+
"We will implement a warm-up through an **event** that happens once in a single run of the model. The model will be run for the warm-up period + results collection period. At the end of the warm-up period an event will happen where all variables in the current experiment are reset (e.g. empty lists and set quantitative values to 0.0).\n"
655+
]
656+
},
657+
{
658+
"cell_type": "code",
659+
"execution_count": 1,
660+
"id": "e5148415-3dff-41ad-ad17-ba755a86074f",
661+
"metadata": {},
662+
"outputs": [],
663+
"source": [
664+
"def end_of_warmup(warm_up_period, env, args):\n",
665+
" yield env.timeout(warm_up_period)\n",
666+
" trace(f'{env.now:.2f}: Warm-up complete')\n",
667+
"\n",
668+
" # reset variables to remove initalisation bias.\n",
669+
" args.init_results_variables()"
670+
]
671+
},
645672
{
646673
"cell_type": "markdown",
647674
"id": "161ce6c8-b50b-457c-8f9e-4837edb07933",

0 commit comments

Comments
 (0)