question

Fakhrusy Sf avatar image
0 Likes"
Fakhrusy Sf asked Jason Lightfoot commented

Conditional Decide : Decide to release token when the machine is idling

Hi Everyone,

I have a question that I want to ask. How to set the conditional decide when the machine(In this case, premixer_Gear and Premixer_Hydraulic) is idling.

1655965090277.png

When premixer is filling, the premixer for gear and hydraulic must wait for process on the premixer_engine to be finished..

My current conditional decide is " token.Mixer.as(FlowMixer).step == 0 " . I want to insert "AND" statement.How?

I just want that coding statement that says "Premixer_Gear is not running" AND "Premixer_Hydraulic"

FlexSim 18.2.3
processflowFloWorksconditional decide
1655965090277.png (65.5 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
You can add another process which summarizes all conditions for one token or many. If all conditions are fulfilled you release your involved token in your main process.

If you use many tokens you can batch them or you can build a structure of split and combine.

0 Likes 0 ·
Fakhrusy Sf avatar image Fakhrusy Sf Joerg Vogel commented ·

I am not clear on how to do it.. May you give an example, a simple one to give me a better understanding


0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @Fakhrusy Sf, was Jeanette 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jeanette F avatar image
0 Likes"
Jeanette F answered

Hello @Fakhrusy Sf,

One way is to write the code like follows.

Model.find("Processor1").as(Object).stats.state().value == 1 && Model.find("Processor2").as(Object).stats.state().value == 1

The 1 refers to the index that state is in the state profile list.

1656386950921.png

idel state conditional decide.fsm Version 22.1 (Sorry I do not have 18.2). Let me know if you you didn't get enough from the info I provided and I can remake my example model in 18.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.

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.