Setting Clinic opening times via dialog boxes - a schedule start point approach
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,