question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Patrick Cloutier commented

How to create transport and equipment on demand in people flow

I'm modeling thousands of patients and employees walking through an hospital. I create them as needed with Create Person. I also create people accompanying people as needed. I create people at their origins and destroy them at their destination. Its a flow analysis model. That works fine.

I'm trying to also create transport and equipment on demand so that I don't have to have a group of thousands of wheelchairs and gurneys at the beginning of the simulation waiting to be used.

What would be the command(s) to Create WheelChair, Create Gurney and Create Equipment and then acquire them properly with Acquire Equipment and Acquire Transport ? All this in ProcessFlow.

Thanks

FlexSim 18.1.1
people flowcreate equipmentcreate transport
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Regan Blackett avatar image
2 Likes"
Regan Blackett answered Patrick Cloutier commented

Here's a little fuller example, using the same concept with a patient TaskExecuter instanced flow to mimic a patient track. The big key is creating a single Staff, Transport or Equipment object in the model and then using Create Object activities to make copies of them (just sample the object on the 'Object' field of Create Object).


stafftransportondemand.fsm


· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joshua S avatar image Joshua S commented ·

A much better example. Something I noticed with both our examples is since the objects were duplicated, the duplicated wheel chairs will start stacking on each other over time, so something will need to destroy them in process flow, or else on reset your are going to have a large amount of wheelchairs pile up.

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ commented ·

I destroy my Staff and Transports when they aren't needed any more, and also flag them to be destroyed on reset so you don't get left overs if you happen to start over while they are still in use.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier commented ·

That is so simple. Wow.

Question 1: Why can't I just use current.staff instead of token.staff since I'm in an instanced flow?

Question 2: Is it possible to create the objects where I want? Now whatever I specify in CreateIn or CreateAt, they are created on top of where the current one is. Not convenient because I have more than 15 entrances.

Comment 1: I'm using Astar so I added a contextdragconnection right after the create to attach the created object to Astar.

Comment 2: I use CreatePerson instead of CreateObject to create the staff and it works just as well.

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Patrick Cloutier commented ·

Answer 1: You probably can. 'current' there would refer to the Patient object and so if you assign the label to current, that seems fine. I probably assigned it to token more out of habit than anything.


Answer 2: With 'Create in' and 'Create at' you need some object to act as the target for where to put things, but you could follow up the creation activity with a Change Visual and adjust the coordinates if you want to place them someplace specific. I may be misinterpreting your question, if so let me know.

Comment to Comment 1: You don't have to do that. The 'Create Person' activity automatically attaches people to an A* navigator (if it exists) upon creation.

Comment to Comment 2: Good! I again probably used 'Create Object out of habit

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Regan Blackett ♦ commented ·

About Question 2. I import an Excel table in a Process Flow Schedule. This creates 2 pointer labels on the tokens: Origin (Orig) and Destination (Dest).

These are always Door locations. The persons are created at token.Orig. Then in the instanced Flow (see picture), if a person needs a wheelchair for example, its process flow branch has a CreateObject wheelchair like you showed me to do. In the CreateAt field I put current.Orig

This should create the wheelchair in whatever origin (door) is specified on the pointer label. But it does not. The wheelchair is always created on top of the original wheelchair which serves as the copy model.

But surprisingly it works for the cart. If a person needs to push a cart, then the cart is created at whatever door location specified in current.Orig. It's like createobject behaves differently if its an equipment (cart) VS a transport (chair or gurney).

0 Likes 0 ·
capture.jpg (134.6 KiB)
Show more comments
Joshua S avatar image
0 Likes"
Joshua S answered Joshua S converted comment to answer

This is a very simple example using a Wheelchair and a PortableEKG.equipment-and-transport-on-demand.fsm


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.