Cancel
Showing results for 
Search instead for 
Did you mean: 

Shift Calendar working every other week

Experimenter
Experimenter

Hello,

 

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,

Elieke

 

 

4 REPLIES

Re: Shift Calendar working every other week

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Shift Calendar working every other week

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Elieke,

 

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.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Shift Calendar working every other week

Experimenter
Experimenter

Thanks for your suggestion Steffen, it works great!

Re: Shift Calendar working every other week

Experimenter
Experimenter

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.