I am currently modelling a brewery process with four different types of beer. In the cooling process i have two parallel coolers and I want to split the liters contained in the order to the two coolers, based on the capacity of the coolers and the different speeds. For that i am using a split and a splitfunction. When i simulate it though I get an error for the split (enclosed in screenshot). Where does this root error come from and how can I solve it? The type is an attribute contained in the order which implies which type of beer is being processed.
As your error message says, the error comes from your source object, not from your split. In AnyLogic simulations, root
usually refers to the Main
agent.
If type
is an attribute of the agent type that you are creating with the source, then you want to call agent.type
instead of this.type
.
this
refers to the Main
(or root) agent in this context.