question

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

How can I make both pieces leave for the processors synchronized ?

I need to use the robot to tranposrt the pieces

FlexSim 22.1.4
queu
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

Option 1 (Triggers): I suggest to create a centerport-connection between the two queues to make referencing each other easier.

- On Reset: Close the output of the queue

- On Exit: Send a message with a delay of 0s to both queues if the exiting item is the last one in the queue (current.subnodes.length == 1).

- On Message: Close the output of the queue

- On Entry: Open the other and the current queue (in that order) if the other queue is not empty.


Option 2 (Process Flow):

- Make the queue push the item to a list in the Send to Port option (partitioned or marked by a label in some way, to differentiate between the queues when pulling - I would just partition by the queues themselves (current as partition ID)).

- Create a token for each processor in Process Flow that pulls an item from the list. Then the tokens are batched to sync them. Then the item is released (Custom Code activity -> Control -> Basic FR -> Release Item (through port 1)). The token then waits for the item to exit the processor before pulling the next one.

capture1.png


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