Showing results for 
Search instead for 
Do you mean 
Reply

Blocking Patient of Entering a Treatment Room based on Shift calender

Hello Community,

 

I am working in an Emergency department model that has 20 treatment rooms "processes". Some rooms are closed in specefic times and days and I have defined the time of operation for room using "shift calender"; however, patients "MUs" are still sent to rooms at the time rooms are not in operation. Then, they keep waiting and start being processed when the room starts operating again. I need to define an exit strategy for sending those patients "MUs".

 

My objective to define an exit strategy for the preceeding process that patients "MUs" will be send only to rooms "processes" which are currently in operation based on what I have defined in the shift calender for each room.

 

I wonder if anyone can help me with this.

 

Mohamed Elshal

11 REPLIES

Re: Blocking Patient of Entering a Treatment Room based on Shift calender

what you describe is the default behavior of Plant Simulation. The MU will be moved, only when the processor can receive it (empty and not paused, not unplanned, not failed...). If you use a (fifo)buffer as waiting room, you will get blockages of the patients, which could be treated.
How do you distribute the patients to the rooms?

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: Blocking Patient of Entering a Treatment Room based on Shift calender

I am using 'Max contents" as exit strategy. It has proven to be the best but still not working the way I want. I need to define an exit strategy based on shift times I defined in shift calender for each room. Is that possible?

Re: Blocking Patient of Entering a Treatment Room based on Shift calender

do you checked the behavior with deactivated "blocked" option? This should "jump over" not available successors.

 

If you use a exit method (rear), the exit behavior will not work anymore. So you need check all your successors by simtalk.

 

You can check the state of the successors with operational (should be true) or you check explicite the attribute unplanned (no shift, should be false). You should have a plan for the case, that here is no room available.

So normally you wait, until one of the rooms is empty and operational, than you can move the MU in this direction.


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: Blocking Patient of Entering a Treatment Room based on Shift calender

I beleive that this the strategy I need, but I am not sure how to use simtalk to create an exit strategy based on the state of successors and shift information. Can you please help me with the code?

Re: Blocking Patient of Entering a Treatment Room based on Shift calender

can you post your model ?


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: Blocking Patient of Entering a Treatment Room based on Shift calender

Attached is the model. You will find the problem in T_Room Submodel. Each shift calender acts as a control for three rooms (e.g. Shiftcalender_R123 means it is used INR1, INR2 and INR3).

Thank you for your help I am using Plant Simulation 13

Re: Blocking Patient of Entering a Treatment Room based on Shift calender

[ Edited ]

I'm not able to edit your model.

I have made a small example, so you can test a lot of variants.

The method consists of two parts:

- first collect all possible successors in a tableFile

- if there are no possible successors, wait a little bit (e.g. 60 seconds and try it again)

- make a decision --> move the MU

--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

--> you can use all attributes of the singleProc for the decision; there is also a method maxAttr (see help) to check max. values

 


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: Blocking Patient of Entering a Treatment Room based on Shift calender

Hello,

 

The code it not working for my case. I have defined shiftcalender for all rooms. The entities are always blocked from entering all the time. I don't know where is the problem

Re: Blocking Patient of Entering a Treatment Room based on Shift calender

can you post your model again?

btw I think, you could use the exit strategy cyclical, non blocking. Then all the work is done by Plant Simulation automatically.


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net