Cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create an Exit Strategy based on time of the day

Hello Community,

 

I have the biggest problem in my Emergency Department Model, that I have 20 rooms and some of them are closed at given hours in the day; therfore, I need to define an exit strategy in the buffer -as shown in the pic- that send patients randomly to some selected rooms based on the time of the day and also day of the week. (e.g. buffer will send patients only to rooms 1,2,3,4 from 7am - 7pm Mon-Fri,  and to rooms 5,6,7 from 11am - 11pm Mon-Fri, and from 7am - 7pm Sat-Sun will send patients to rooms 1,2,3). Is there a way to do it? I have tried using shift calender but still patients are sent to rooms even if it is not the time of their operation. I want to create an exit strategy for the buffer to send patients based on the shift calender I have defined for rooms operation.

 

I would be thankful if you help me with an exit method, since this for me is the biggest concen for now, and I have posted this issue before but didin't get a working reply.

 

Thanks in advance

Mohamed Elshal

 

 

14 REPLIES

Betreff: Need to create an Exit Strategy based on time of the day

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello

 

you should use an exit control for the buffer. In this exit control you can use functions dayOfWeek and/or

timeOfDay to determine where to move you MUs.

 

Hope this will help.

 

Regards

 

GG

Regards
GG

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: Need to create an Exit Strategy based on time of the day

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you could try the following:
- add ShiftCalendars to the rooms
- in the exitcontrol check, if the rooms are operational (make a table with all rooms --> run through the table using a loop --> write all available rooms into a list
- dice a number between 1 and dim of the list (e.g. z_uniform)
- send the patient to the room in the row with the random number
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Need to create an Exit Strategy based on time of the day

Thank you, Can you please help me with the method?

Re: Need to create an Exit Strategy based on time of the day

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you need a small example, than we can try to make the control
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Need to create an Exit Strategy based on time of the day

Hi Steffen

 

Here is a simple model that you created before for me, but the method is never working for my model. I don't know why

Re: Need to create an Exit Strategy based on time of the day

One alternative that I can create a parallel proc. instead of multiple single procs., but I wonder if I can control the dimensions of the parallel proc. (Number of rooms operating) based on time of the day and day of the week (for ex. Wed 9a dimension is 20,     Sat at 11pm dimension is 5). I wonder if we can do that?

Betreff: Need to create an Exit Strategy based on time of the day

Hi

 

Can you please give me an example for using funcitons DayofWeek and TimeofDay in the exit strategy?

 

 

Thank you,

Mohamed Elshal

Re: Need to create an Exit Strategy based on time of the day

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
Tis example is working, but you need to assign different shiftcalendars to the stations (for your project you will need three shift calendars !!)
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Need to create an Exit Strategy based on time of the day

The problem that the method is not working in my model, unlike yours. I have modified created the table and changed the names of objects but still not working. I am not able to locate the error.

I have copied in the email:

 

--delete content of decision
decision.delete
--write all available successors into the decision table
for var i:=1 to Buffer.numSucc loop
if buffer.succ(i).receptive(buffer.cont) then
decision.writeRow(1,decision.yDim+1,i,buffer.succ(i))
end

next
--no possible successor --> try it later
if decision.yDim=0 then
self.methCall(60) --look again after 60 seconds
else
--take the room with the lowest relative occupation
--make here your decision
decision.minAttr({2,1}..{2,*},"statRelativeOccupation")
--Plant Simulation sets the cursor into the cell
--move the MU to the successor
buffer.cont.move(buffer.succ(decision[1,decision.cursorY]))


end