Model Description:
For an exercise at my university I have to simulate a storage and retrieval machine (stacker crane). I have 4 aisles each with an individual stacker crane. He picks up the loadunit at an Input/Output point and delivers it to the targeted storage space. Each storage space is modeled as an agent which is part of an agent population in the aisle-agent.
Every minute an event of the aisle-agent triggers. If more than 19 Load Units are stored in the aisle, a random loadunit is chosen which has to be retrieved by the stacker crane. Then the stacker crane hands the loadunit over to a sink.
Problem:
The problem occurs if I want to look into the storage space agents. In the first few thousand simulated minutes, I can open ervery storage space agent with no problem at all and the model works smoothly. After some time I can’t access the storage space agents without getting the error:
Error during drawing animation frame:
java.lang.NullPointerException: Cannot invoke “com.anylogic.engine.FlowchartPort.count()” because “this.i” is null
After this error occurs, I can still continue the simulation.
The event in the aisle-agent still triggers, but even though the aisle clearly contains more than 19 loadunits, no loadunit is chosen to be retrieved. The aisle will be fully filled without any retrieval.
I tried to change the logic of the retrieval-event in the aisle-agent but it didn’t change anything. I have the feeling AnyLogic can’t access the storage space agents from a certain point in time and has no idea how many storage space agents exist (which I think would make sense considering the error message).
Jonathan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4