In the attached model each item is assigned between 1-5 production steps on the different processors in the "On Creation" trigger of the source. Each processor is assigned a number through the "Num" label.
The items are pushed onto a list by the queue. The list has two custom expression fields.
The first one "needsProcessor" handles the pulling of items by the processor. It checks whether the number of the processor is present in the steps that the item still has to go through. If so, the field value is set to 1. This allows the processors to only pull items that need to be worked on by the respective machine.
In their "On Process Finish" trigger, the number is removed from the step array and instead added onto another array label that keeps track of the order in which the item was pulled by the processors.
The second field value evaluates to 1 if the step array is empty, so the item can then get pulled by the sink. In its entry trigger the needed steps and the order in which they were done is written to a global table.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.