question

Fauzy Syaputra avatar image
0 Likes"
Fauzy Syaputra asked Jeanette F commented

Pull with 2 specified labels and values condition.

How to make people walk towards the bus where for case stop 17 passengers can only board buses with the label 'arah' = -1 or the return route. I have tried several methods but still cannot do it. The token gets stuck in 'push to the list' or when I try several methods, it results in a bad travel. So, I plan that for the destination walking, it must meet 2 conditions, namely token.bus and token.direction with a value of -1.
BUS.fsm

FlexSim 22.2.0
tokendestinationwalking
bus.fsm (438.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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Fauzy Syaputra, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Fauzy Syaputra, there a few things going wrong in your model.

Firstly, there are errors in Halte 17 because you have a max wait timer on the "Pull from list - From 17" activity. Tokens don't get pulled and proceed to a subflow that requires a token that is set by that pulled item. You should either remove the max wait timer or divert the token to a different set of activities to handle that.

In other pull from list activities (like "From 5" in Halte 5), you have the pulled item assigned to token.Bus, but you require token.bus in the following Walk activity.

If all these Haltes have the same logic with a few changes here and there, you may want to turn Halte logic into a single subflow that handles the logic in one place to avoid duplication and errors. If you don't want to combine them all into one, then I suggest making one that works and copy/pasting it (not recommended approach considering you'll have to make a change to all 17 if you find a mistake).

5 |100000

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

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.