question

Alexis B avatar image
0 Likes"
Alexis B asked Jason Lightfoot commented

How to decide when a processor is busy ?

Hello everyone.

Today, I ask you how can I put a decision which say, in ProcessFlow, :

Go 2nd way when Processor1 is busy

Thank you.

FlexSim 18.1.1
process flowdecisionbusy
13.png (73.6 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

Joshua S avatar image
1 Like"
Joshua S answered Jason Lightfoot commented

In your decision point, you can use a conditional decide with the condition being:

model().find("Your_Processor's_Name").as(Object).attrs.state_current.value==1
· 4
5 |100000

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

Alexis B avatar image Alexis B commented ·

@Joshua S

Hello. In my model here, it doesn`t work because :

when token goes in decide with

model().find("Processor1").as(Object).attrs.state_current.value==1

1 : true / 2 : false

But when my processor is busy, my token goes 2nd way whereas, I want my token goes 1st way when my processor is busy and 2nd way zhen my processor is free

ex13.fsm

0 Likes 0 ·
ex13.fsm (27.2 KiB)
Joshua S avatar image Joshua S Alexis B commented ·

Instead of ==, use !=

0 Likes 0 ·
Adnan avatar image Adnan commented ·

Hello Joshua,


I have the same issue and I applied the code you just gave and it actually worked but after 1 loop everything just ends up (false) even if the processor is empty


can you please help me check on it?

Thanks a lot

screenshot-2023-11-10-120741.png


screenshot-2023-11-10-190315.png


AGV Final 1.fsm

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Adnan commented ·
This looks like it's been answered in y our own question.
0 Likes 0 ·