Re-seizing the same resource unit from a pool

35 views
Skip to first unread message

Jürgen Strohhecker

unread,
Apr 29, 2024, 3:57:31 AMApr 29
to JaamSim Users Discussion Group
Dear all,
I am trying to model a process where an entity (e.g. a patient) re-seizes the same resource unit (e.g. a doctor) that it has previously seized. My idea was to define an attribute "SeizedBy" and assign the name of the seized resource to it, and then use a match condition on the second seizee. However, I cannot find a way to access the name of the resource that was seized. I have modified the "ResourceUnit and ResourcePool Example - with FollowAssignment" to illustrate what I am trying to achieve. Any help would be greatly appreciated.
I have also checked the resource object, but I have also failed to find a way to solve this.
Sorry if I missed a related post. 
Thanks, Jürgen
ResourceUnit with Re-Seize Example.cfg

Harry King

unread,
Apr 29, 2024, 12:34:45 PMApr 29
to JaamSim Users Discussion Group
Hi Jürgen,

It is harder than it should be for an entity to identity the resource that it seized. The solution is to use the 'filter' function on the 'UnitsList' output for the ResourcePool to find the ResourceUnit that is assigned to the entity. The attached example demonstrates how to do this. Look at the 'seizedRes' custom output for SimEntity1.

Harry

Identity of Seized Resource.cfg
Reply all
Reply to author
Forward
0 new messages