question

Mike avatar image
0 Likes"
Mike asked Mike commented

Trigger Operator by case

I am creating a model to trigger operator for material loading once the quantity is lower than the certain quantity. There are a few combiner workstations in the model. Materials from Q2 should be loading to Q1 for workstation1. I am doing in a way that Q1 is to send message to dispatcher when the quantity of Q1 content is lower than 60 and at the start of the simulation since the quantity is zero at the start. Dispatcher on receive of message, process starts to acquire operators and walk to respective message sending object and start loading of material until the quantity reaches 80. I am having trouble how to refer to the item for the operator to load then unload to destination. Could you please help to take a look and adviseTrigger Operator by Condition.fsm? Thanks.

FlexSim 23.1.1
trigger operators by case
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 Mike commented

Using centerport connections is a good way of referencing the upstream queues.

If you are sure that there will always be items in the queues the operators load from, you can just use .first to refer to the first subnode of an object.

token.sendingObject.centerObjects[1].first

You also don't need the subflow, since you only create single token that loops inside of it anyway.

Apart from using messages, you could also react to the On Content Change event of the queues directly.

trigger-operator-by-condition-fm.fsm


· 5
5 |100000

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

Mike avatar image Mike commented ·

Perfect! What should I change to make operator go to Q5 and Q7 after finishing the loading at first station and carry 4item on each trip?

Thanks a lot.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Mike commented ·
Queue5 and 7 are currently missing the trigger that sends the message on simulations start, so no token is generated for them.

To move 4 items at once, either put the load and unload activities into a subflow that runs 4 times or simply use 4 copies of the activities in succession.

1 Like 1 ·
Mike avatar image Mike commented ·
Thanks. Could you please help me check what went wrong with my version with messaging method. I tried to use "token.sendingObjects.subnodes.first". it returned with an error. 

Trigger Operator by Condition.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Mike commented ·
Queue 5 and 7 are missing the centerport connection to the input queues. That's why the program says that the index '1' in centerObjects[1] is out of bounds, since there is no first connection.
0 Likes 0 ·
Mike avatar image Mike Felix Möhlmann commented ·

Great! Please find the working solution here for those who might need it.

Trigger Operator by Condition_carry 4pcs.fsm

0 Likes 0 ·