How can I set the drop-off block to unload a certain percentage of people at one train station and a different percentage at the next train station?
相关问题
- Anylogic - Combined multiple items back to origina
- Moving one agent within another agent in Anylogic
- AnyLogic Execution with Jar files - Run Fastest Sp
- How can I log my position regularly in a GIS Model
- “Anylogic” Inventory management
相关文章
- Anylogic - Combined multiple items back to origina
- 在AnyLogic建模人口密度(Modelling population density in An
- 很难找到的代理商在AnyLogic模拟当前位置(difficult to find the curr
- Moving one agent within another agent in Anylogic
- AnyLogic Execution with Jar files - Run Fastest Sp
- How can I log my position regularly in a GIS Model
- “Anylogic” Inventory management
- Setting drop-off block in anylogic
You can find out how many agents are contained in the container by doing
container.contents().size()
Let's imagine you want to dropoff 50% in the first and 10% in the second.
In the first dropoff, assuming that you want to dropoff 50% you can choose the option dropoff "given quantity if available" and set the quantity as
(int)round((container.contents().size())*0.5)
Of course you can change 0.5 to 0.3 if you want to dropoff 30%.
In the next dropoff you want to dropoff 10% of the initial population (but only 50% is remaining, so you want to dropoff 20% of the current population
(int)round((container.contents().size())*0.2)
Let's imagine that you have 100 in the initial population and you want to dropoff 50% on the first and 10% on the second (50 passengers in the first and 10 passengers in the second)
(int)round((container.contents().size())*0.5)
will dropoff those 50 passengers, so you will have only 50 passengers left and on the second you want to dropoff 10 passengers. 10, is 20% of 50... that's why I use 0.2 in the second dropoff