我曾尝试在运行 Anylogic 的代理人口和 SD 住房示例期间的事件中使用 add_people(),以便在模拟期间向模型添加更多代理,但我遇到了这个错误。我怎么解决这个问题?
[Exception during discrete event execution:
-1
java.lang.ArrayIndexOutOfBoundsException: -1
at com.anylogic.engine.Dimension.getIndexPosition(Unknown Source)
at com.anylogic.engine.HyperArray.getPosOf(Unknown Source)
at com.anylogic.engine.HyperArray.get(Unknown Source)
at agent_population_and_sd_housing.Person.makeDecision(Person.java:428)
at agent_population_and_sd_housing.Person.executeActionOf(Person.java:408)
at com.anylogic.engine.EventRate.execute(Unknown Source)
at com.anylogic.engine.Engine.m(Unknown Source)
at com.anylogic.engine.Engine.jd(Unknown Source)
at com.anylogic.engine.Engine.h(Unknown Source)
at com.anylogic.engine.Engine$g.run(Unknown Source)]