question

Adil M avatar image
0 Likes"
Adil M asked Adil M commented

Decision Based on Queue Content

Truck Loading model_1.fsm-I want a decision to be made on based on the queue reaching a certain number. I had seen an answer to a similar question and tried to use the expression on the conditional decide but it still gives me an error.

- On the TDR process flow, I want the truck to hold the 12 content till the delay is completed, but wasn't sure how to connect the flow items to the token in the process flow.

FlexSim 24.1.0
queuequeue contentdecision
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Adil M commented

Set the Send to Port field of the truck to -1. This means it will not release the items. In the Process Flow, after the batch is complete, release all tokens and release the item in a Custom Code activity after the delay (Control -> BasicFR -> Release Item) through port 1. Activating "Through Port" overrides the Send to Port of the truck and the items can be released.

capture1.png

The upper flows currently break when the truck reaches 12 items, since the tokens are discarded and the respective pallets remain on the combiner forever. It would be a better idea to use a Wait for Event activity to wait for the content of the truck to be less than 12.

truck-loading-model-2.fsm


capture1.png (16.1 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.

Adil M avatar image Adil M commented ·
Thanks Felix, I understand the solution. Just out of curiosity, was there a reason the expression I had put in 'decide' not work? What would be a good expression if I want to refer the content of of queue in the decide function?
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Adil M commented ·
You mistyped "lenght" instead of "length". Other than that the decide is technically fine. The issue is that instead of sending the token to a sink, it should wait for the the queue content to drop.

The token is the only way for an item to leave the combiner. If you delete the token the combiner becomes blocked forever.

1 Like 1 ·
Adil M avatar image Adil M Felix Möhlmann commented ·

Ahh! Thank you so much.

0 Likes 0 ·