question

Luca S4 avatar image
0 Likes"
Luca S4 asked Matthew Gillespie commented

Person gets lable from objekt

Hi guys,

how can i set a lable in a created person by sitting on a specific chair?

Background: Doctor's office with one Trainee, wich works slower. I need the person to know somehow on wich chair out of a group he sits down and set a lable. After that im defining the delay in the processflow.

Maybe you can help me, thy a lot

Luca

aufgabe3.fsm

FlexSim 18.1.2
processflowhealthcarelablecreate person
aufgabe3.fsm (122.7 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
2 Likes"
Matthew Gillespie answered Matthew Gillespie commented

You're already doing this. In the Acquire Location:WaitingArea1 activity you acquire a chair and store a reference to it on current.MyChair. So now the person has a MyChair label that points at the chair they just acquired. If you want to store this value on another label you should add an Assign Labels activity and assign the value of the MyChair label onto a new label.

· 2
5 |100000

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

Luca S4 avatar image Luca S4 commented ·

thx, didn't know that. How is it then possible to create a deciding path based on the case wich chair it is? Because i think you can only get the decision in tha case based on a int, is that right?

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Luca S4 commented ·

If you want to use the By Case pickoption then, yes, you would use an int. You could get the chair's rank:

current.MyChair.rank

and make a decision based off that. Like I'll go here if I got the 2nd chair.

Otherwise you can pass the path of an object into the model().find() command like this if you want to compare objects:

if(current.MyChair == model().find("WaitingArea1>visual/drawsurrogate/Chair20"))
1 Like 1 ·