In my simulation i want to divide 225 products by 5, into 900 in one color in the above queue and 225 in different color into the bottom queue-> rack. Methodology used in my project didn't work. Does anyone have ideas?
In my simulation i want to divide 225 products by 5, into 900 in one color in the above queue and 225 in different color into the bottom queue-> rack. Methodology used in my project didn't work. Does anyone have ideas?
Modulus operator in combination with color by case in the OnExit trigger and port by case in the send to port function.
You use the output statistic value of the separator with a modulus operator integer division. The division returns in this operation the rest. This value chooses the case for color and port. For example values of 0 to 3 are going to output port 1 and value of 4 goes to port 2.
Equal to this method you set the colors.
If someone want to argue, that it isn't necessary to add so much cases. That is right. You need only the default case and the case for the secondary return action.
Thank you very much for your answer. It works. I would like to understand how does the function works. What is the logic of it?
I think you found the split option in separator object properties. The split value is static expression of 5.
The send to port function on the Flow tab expects a return value for each item being released. The return value is connected directly to output port numbers rank of objects. There are special return values.
A mod division is an integer division returning the integer rest of the division. On a sequence of values like A={0,1,2,3,4,5,6,7} returns in mod division by 4 A%4={0,1,2,3,0,1,2,3}.
You need a sequence of values in the send to port function to use a port by case function. This can be a statistic value or a label value that you increment by events like OnEntry, OnExit, OnProcessFinish.
The statistic values are properties in the attributes [tree] of objects. This means you can find informations on the classes in FlexSim source code in the manual FlexScript Class Reference (this reference contains more classes than being available in FlexSim version 17). The available classes are documented in the program manual of the version you use.
obj.stats.output.value
where obj is a reference or pointer in FlexSim. Some pointers are predefined in the source code header of functions or triggers. Please take a look into the source code editor to find them under the parchment roll icon. You have not to write there directly code in the beginning. Just read the header and close the editor. These Pointers are:
The function fields in the properties can hold small source code snippets directly, which returns a value if they get evaluated, or just static values.
The relevant sequence of activities are, but there are much more.
11 People are following this question.
Modified combiner and separator functionality
How to split the single quantity of flowitem into double quanitity in separator?
Combiner "pack" to separator "unpack" - item won't leave separator
How to destroy excess objects once batched.
Send pallet and two groups of 5 boxes to 3 different queues from a separator
© 1993- FlexSim Software Products, Inc. All Rights Reserved.
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.