Jump to content

Patients need to stay in task loop until transport arrives, and only a certain number can go. multiple servers involved.


Recommended Posts

We are building a model of a medical facility where some patients need to be evacuated out of the model using a vehicle. 

In its current state, when a patient is in the ward or ICU, it will be determined if they need to evacuate. While they are waiting for an evacuation transport, they will be in a task sequence loop.

We would like some way for the patient to seize a spot on the transport, perform the tasks loops, and once the transport arrives at the facility transfer node, the patients break out of their loop, and seize a worker to be carried to the vehicle. 

We have patients looping correctly and workers carrying the patients to the transport node, but they are not waiting for the vehicle to arrive. Having a condition that breaks the loop when the vehicle is in the loading node is not working because as it leaves its current node does not update quickly enough so entities go to the node that then are not picked up. 

 

A potential solution we found was to use the MinimumDwellTimeExpired State variable for the Evac transport in the loop conditional (If transport is dwelling then do not continue the loop and get routed to the transport, if it is not dwelling stay in the loop), however this variable is not public with no apparent way to make it so. We have also tried to make a function in the vehicle to try and mirror the state variable value, but this also did not seem to work as it does not update during the run.

 

Link to comment
Share on other sites

If I were you I would define a storage element. Then, if the patients are finished with their loop I send them to storage (you can think of it as a waiting room). Then, when the vehicle is available I should check the storage (with a search step) and if exist get the patients on the vehicle. Does it work for you?

Link to comment
Share on other sites

Is there a way to keep them in the loop until the transport arrives, there will never be a point where they are done with the loop until the transport gets there.  Right now if they are in the loop I can assign them a modelentity state variable (boolean), then when a vehicle arrives it initiates a process that has a search step with the search condition modelentity.BooleanStateVariable==1 with a return limit of the capacity of the vehicle. the found entities must either interrupt the task or process they are currently doing depending on where they are in the loop and be moved by a worker to the evac node. If that seams like a plausible solution, I just need a process step that can completely cancel a task sequence because the interrupt and suspend steps do not seem to apply to tasks. Once the task sequence is suspended the modelentities should flow to the destination node no problem after leaving the server.

 

 

Link to comment
Share on other sites

×
×
  • Create New...