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
Solved! Go to Solution.
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.
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?
Can you please give me an example for using funcitons DayofWeek and TimeofDay in the exit strategy?
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
--write all available successors into the decision table
for var i:=1 to Buffer.numSucc loop
if buffer.succ(i).receptive(buffer.cont) then
--no possible successor --> try it later
if decision.yDim=0 then
self.methCall(60) --look again after 60 seconds
--take the room with the lowest relative occupation
--make here your decision
--Plant Simulation sets the cursor into the cell
--move the MU to the successor