question

Daniel C avatar image
0 Likes"
Daniel C asked Emily Hardy commented

Operator doesn't follow code

I have this rack with queues. Any item can go in any queue but once it enter only items from the same type can enter (see color). the it leaves and any item can enter. his codes works just fine but when i use the 'Use Transport' option the operator doesn't respect the code and puts the item anywhere. See images below.

Any idea?

FlexSim 18.1.1
queueoperatorcode
with-operator.gif (742.6 KiB)
no-operator.gif (372.2 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.

1 Answer

Joshua S avatar image
0 Likes"
Joshua S answered Emily Hardy commented

The reason this was happening was a timing issue. When the operator was not in use, it could dump every item created at the 2 main queues instantaneously to the racked queues, which would then fire each of those queues "on entry" events, changing their "tipo_actual" labels to the first item entered "Tipo" label.

With an operator in use, the racked queues receive a list of objects that will be sent to them before their "on entry" event is activated. I added a line of code to each of the racked queues "pulled requirement" code which then takes the first item it pulls then changes the "tipo_actual" label to that items "Tipo" label.

this is the line I added:

  1. setlabel(current,"tipo_actual",Tipo);

See if this model is what you are going for 11913-test-racks-fix.fsm

I also connected both main queues to the bottom racked queue, it wouldn't fill without doing so, don't know if that is something you wanted to do as well.

Hope this helps.


· 1
5 |100000

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