question

Tom avatar image
0 Likes"
Tom asked Tom commented

How can I move active tokens to another activity?

Hi.

I want to move tokens that are conducting 'walk to floor spot2' to 'walk to floor spot3'

My scenario is that when patients who are walking to floor spot2 are in floor spot1's Proximity Radius, they get 'go to floor spot3' label and then go to floor spot3 by 'change direction'


Key point is that as soon as patients are within floor spot 1's range, they have to go to floor spot 3 by 'change direction'


I think the reason why I can't get the result what I want is that token have to finish their current activity and then can move to next activity.

How can I solve this problem?

Thank you.

Q_move tokens.fsm

FlexSim 22.2.2
tokensconditional decidewalk
q-move-tokens.fsm (93.1 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

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Use the Release Token option of a Custom Code activity or the Release Token activity

· 3
5 |100000

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

Tom avatar image Tom commented ·

Thank you for your replying.

Despite your advice, I still haven't solved this problem.

Could you explain it in more detail?

Q_move tokens.fsm

0 Likes 0 ·
q-move-tokens.fsm (49.9 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Tom commented ·

In the attached model I create a child token in the StartRedirect activity, when the proximity fires. Then I create an empty tasksequence to preempt and abort the current travel task and then redirect the parent token to the Spot3 walk activity.

1665326605331.png

q-move-tokens_jl.fsm

There will be other ways to do this - but you specifically asked about moving the patient token to a different activity so that what's in this model.


0 Likes 0 ·
1665326605331.png (35.0 KiB)
Tom avatar image Tom Jason Lightfoot ♦ commented ·

Thank you so much!

This is exactly what I want.

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.