This error occurs when Pathmind is unable to execute your
doAction or get your observations. Unfortunately, it is difficult to troubleshoot but it can most commonly happen whenever an agent or collection is null or empty when Pathmind is triggered.
1. Null agent
If you call an AnyLogic agent inside your
getObservation, add a check to ensure the agent is not null. Otherwise, do nothing.
2. Empty collection
Similar to the above, if you call a collection inside your
getObservation, add a check to ensure the collection has been populated. Otherwise, do nothing.
Finally, you may wonder why your simulation runs fine in AnyLogic but errors out in Pathmind. The reason is most likely related to the AnyLogic initialize sequence when executing inside AnyLogic versus outside AnyLogic (i.e. standalone).