question

Nathaniel W avatar image
1 Like"
Nathaniel W asked Nathaniel W commented

Having Staff Walk to an Object's Reset Position

Hello, I am currently working on a model where a patient is placed on a gurney, taken to an OR, a procedure is done, and then the patient and gurney are brought back to the gurney's reset position. There are 2 staff members involved in the surgery, and both staff should walk back to the Gurney's reset position. While I can have one RN push the patient and gurney back to the gurney's reset point, I am having trouble making the second the second RN walk to the gurney's reset position at the same time. Since there are multiple potential gurney's, I cannot hard code this location. I would like to know if there is a way I could put "Acquired Transport Resource".resetposition, or something similar, into a destination field. I have attached a simplified model which demonstrates the problem. Thank you!

testmodel.fsm

FlexSim 21.0.2
flexsim 21.0.2reset positionstaff walking
testmodel.fsm (438.9 KiB)
5 |100000

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

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Nathaniel W commented

Things are designed so that you don't usually have to worry about label values, but all the resources you acquire for a patient are on the patient's Staff, Transports, Locations, or Equipment labels:

You can, for example, use patient.Locations[1] to refer to the last location acquired, or patient.Staff to get an array of all the staff currently acquired.

You can also pass an array of staff members into the different travel activities to make them all travel at the same time to the same place. I would recommend just passing patient.Staff into the Staff field of the Transport Patient activity. (I also added a .reverse() method call at the end to reverse the array of staff returned by patient.Staff. This is because the first staff member pushes the gurney, and so the reverse() call makes the RN push the gurney instead of the MD.)

See the attached model: testmodel_2.fsm

Now, if you still wanted to know how to get the transport's reset position you could do it with a code snippet like this where you use patient.Tranports[1] to get the transport:

Object transport = patient.Transports[1];
Vec3 loc = transport.resetPosition.location;
Vec3 rot = transport.resetPosition.rotation;
return [loc.x, loc.y, loc.z, rot.x, rot.y, rot.z];

1616083023125.png (8.4 KiB)
1616083167177.png (18.3 KiB)
testmodel-2.fsm (439.0 KiB)
· 1
5 |100000

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

Nathaniel W avatar image Nathaniel W commented ·

This is perfect Matthew, thank you so much for your thorough explanation!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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