Hello! Quick Question. The queue are entering items, marked with a Label "MyLabel1". It says either 1 or 2. How can i assign items with the label 1 to Port 1 or 3 and items with label 2 to the ports 2 or 3?
thank you for your help.
Luca
Hello! Quick Question. The queue are entering items, marked with a Label "MyLabel1". It says either 1 or 2. How can i assign items with the label 1 to Port 1 or 3 and items with label 2 to the ports 2 or 3?
thank you for your help.
Luca
You insert another queue behind the one where you want Type 1 to divert to port 1 or 3. This is connected just with one output port, but this new queue can distribute by first available, round robin or random port variant.
Instead of Sending items to a defined port, you activate Pull in the Processors down stream of the queue. Pull Requirement is Specific Label and its value.
Thank you! I want to solve it with one queue, thats kind of a requirement. But however, the Pull-strategy solved it alone.
So its basically not possible to put AND/OR/EXOR directly in the port by case function?
You can hard code that logic into the port by case function, but it's a lot easier to just add another queue like Jörg suggested. This is an example of a way you could hard code it. (It's not that efficient.)
int outPort; if(item.MyLabel1 == 1) { outPort = bernoulli(50,1,3,getstream(current)); if(!opavailable(current, outPort)) { if(outPort == 1) { outPort = 3; } else if(outPort = 3) { outPort = 1; } } } if(item.MyLabel1 == 2) { outPort = bernoulli(50,2,3,getstream(current)); if(!opavailable(current, outPort)) { if(outPort == 2) { outPort = 3; } else if(outPort = 3) { outPort = 2; } } } return outPort;
12 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
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.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved