I use the Shift Calendar to derive the arrival patterns of the patients in a hospital. On monday and wedsnesday (every other week) more patients arrive than on the other days.
Now I have made two Shift Calendars: MondayWednesday and RestoftheDays. The MondayWednesday has to work every monday, but wednesday only every other day. How do I easily model this?
I know that I can exclude dates in the Tab Calendar, but this takes many effort if the simulation takes long and is prone to errors.
Thanks in advance,
Solved! Go to Solution.
You need only one ShiftCalendar. Make a little gap before 24:00, so that you have unplanned time. Than you can use an observer in the ShiftCalendar for the attribute unplanned.
In the observer-method you can detect the weekday:
if ShiftCalendar.unplanned=false then local d:integer; d:=dayOfWeek(eventController.absSimTime); if d=1 or d= 3 then --Mon, Wen -- set your value for source.interval else -- set your value for source.interval end; end;
freelance simulation specialist
You can insert the dates in the Calendar part of the dialog by importing them from an external source, like Excel. This should be pretty quick.
A thought. What is the nature of a run in your case? Do you study individual days and is your system empty at the end of a day? Or do patients stay in the system for longer? This determines what kind of simulation runs you should do.
Thanks for your answer Gert.
The patients stay in the system for more than one day. I don't know how long to run the model yet, so importing from Excel still is not the way for me. But thanks for helping.