question

Beatriz DT avatar image
0 Likes"
Beatriz DT asked Felix Möhlmann answered

Send production order when queues are empty

OrdenProduction.fsmIn the simple model that I attach, the separator cuts the product (type 1, red or 2, green) into eight equal parts. The queues in which they are stored have a maximum capacity of 8 
units. I want to configure that until the queue is emptied (alm_rojo1), the separator does not cut another product into 8 red units. And in the same way with the green product, until the green queue (Alm_verde1) is emptied, the separator does not cut another green product
into 8 units. 
In summary, I want to send the order that when these queues (Alm_red1 / green1) are 
emptied, the separator cuts another unit, it is the color that is ordered in 8 equal parts.
FlexSim 21.0.5
separatorflexsim 21.0.5
ordenproduction.fsm (37.9 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

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

You can close the output of the queues whenever an item exits them by using the "On Exit" trigger. Then you open them again via message that get send by the "Alm_" queues when the last item exits.

(The condition is that one item is in the queue, as the item has not yet left the queue when the "on exit" event triggers)

Additionally, you should also only open the output of the "Alm_" queues once all items from the combiner have entered, as otherwise one item can enter and leave, leading to a message being send prematurely, before the other seven enter the queue.

ordenproduction_solutionFM.fsm



5 |100000

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