2

I'm attempting to build a new model in AnyLogic and I'm getting the following error:

enter image description here

I'm really grasping at straws to identify what is going wrong as there are no errors in the Problem window. The only thing I can think of is that a while ago I copy-pasted Agents and classes from old models into this one. However, the model compiled and ran after the copy-paste, so if related then this is a very delayed bug. Anyone have any ideas?

Dylan Knowles
  • 2,726
  • 1
  • 26
  • 52

2 Answers2

1

I found the answer: it was a problem with AnyLogic's RunConfiguration. To fix it I did the following:

  1. I checked ignore on all of my agents and classes.
  2. I tried to build the model; as expected, RunConfiguration fails to build as it no longer has a top-level agent.
  3. I unchecked ignore on all of my agents and classes and gave RunConfiguration a new top-level agent.
  4. Internally, this changes the RunConfiguration's ActiveObjectClassId, which, for whatever reason, resolves the problem.

Hopefully this helps you too!

Dylan Knowles
  • 2,726
  • 1
  • 26
  • 52
0

As @Dylan Knowles suggested, I encountered a problem with Run Configuration. Although his solution did not work for me, I was able to resolve the issue by following these steps:

  1. I deleted the agent Main.
  2. I recreated the agent Main.
  3. I set the top-level agent in Run Configuration to Main.

After completing these steps, the problem was fixed. I believe that I may have accidentally edited or deleted the top-level agent, causing Anylogic to encounter a null pointer and throw the error.

I hope that this information is helpful to you.