question

Ricard RH avatar image
2 Likes"
Ricard RH asked Ricard RH commented

How can I know if there is at least one token in an activity from process flow?

I have to make a Conditional Decide activity which will send tokens to one port or the other depending on the existance of at least one token in an Acquire Resource activity in the same Process Flow. Is there any way to code it inside the Conditional Decide?

FlexSim 18.1.1
process flowdecideconditional decidetoken
· 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.

tannerp avatar image tannerp commented ·

Is there a way you could upload an example model of what you are trying to do?

0 Likes 0 ·

1 Answer

·
Gesa R avatar image
1 Like"
Gesa R answered Ricard RH commented

decide-tokens-in-activity.fsm

Hello Ricard,

I attached a small example model. Is that what you mean?

I used the function: gettokens(processFlow, getactivity(processFlow, "Resource")); in the decide on condition code. It returns an array with all tokens in the specified activity.


· 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.

Ricard RH avatar image Ricard RH commented ·

This is exactly what I needed, thank you so much!

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.