'which function should i use in the select output 5 in anylogic?
Hi i'm new in AnyLogic world. I'm trying to simulate the cereal bar process, now I insert select output 5 in my flowchart because I have 4 different type of bar, but now I don't understand which function I should use for saying to my process what type of bar it must do. In addition, I have an excel file with the production schedule of the bars. I attach the photos of the flowchart and excel.


Solution 1:[1]
Since you are making use of a combine I would suggest that you set up the combined block to create a new agent of type "Bar" and in Bar, you need to have a variable indicating what bar it is. it is best to make use of an options list or enumerator, but you can use an integer or string as needed.
I currently set the value randomly using BarType.random(getDefaultRandomGenerator())
Set Bar as the new agent that gets created at the combine block
Then in the select output block you can divert bars to go where you want to go
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |




