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

fakhrusy_17004283
Contributor Contributor
0 Views
4 Replies
Message 1 of 5

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

fakhrusy_17004283
Contributor
Contributor

[ FlexSim 18.2.3 ]

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"

0 Likes
Accepted solutions (1)
1 View
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel
Not applicable
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
Message 3 of 5

fakhrusy_17004283
Contributor
Contributor

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
Message 4 of 5

jeanette_fullmer88DK3
Autodesk
Autodesk
Accepted solution

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.

0 Likes
Message 5 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

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