Head (before)

Setting Clinic opening times via dialog boxes - a schedule start point approach — Simul8 Community Forum

Head (after)

Ask the Simul8 Community

Content (before)

Setting Clinic opening times via dialog boxes - a schedule start point approach

Created at
in Community support

Hi All,

I'm in the process of building a hospital clinic simulation model and I want functionality to enable me to quickly adjust opening days and times of the clinic via a visual logic command on reset, or button click. This would enable me to establish an hourly flow of patients between the opening times. I don't want to purely limit the open time of the clinics to a standard time via the clock as I need the patients to stay in the system so I can count the amount of patient over spill as a KPI. I've explored a few options but setting times doesn't seem to work via a dialog box, which is the main issue.

I've decided that the most viable option so far is using a dynamic schedule from the start point, involving a time check logic loop every 24hrs. To inform, I leverage a few dialog boxes that take an opening day tick box and open and close times as integers between 0-23hr. Then for each simulated day of the week, I create a loop from 0-23 that assigns the schedule spreadsheet with either a number of patients for that hour or 0. I have a Time check logic that runs this process every day at 23:59.

My issue being, It runs the correct schedule for Monday as outlined in the code but then skips all the remaining days as if there is no input. I've double checked the schedule spreadsheet and it is indeed updating every 24hr with the correct numbers between the two opening times, but for some reason the start point doesn't bring in any patients after it changes once on the Monday. Does anyone know if we can update the schedule whilst running the code? Or, even better, have a more concise solution to this problem?

Any help would be appreciated,


  • Was this answer helpful?


    I've solved this problem with a combination of setting shift starts times and if statements in VL. If anyone is interested I'd be more than happy to share a more detailed explanation. The solution allows the user to set days and times of clinic opening and enables you to set a distribution of clinic arrival between the designated times to address did not attend patients and late arrivals etc

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Content (after)