Search code examples
anylogic

Is there a function in AnyLogic to display an alert message during model run?


I would like to display some text in an alert box similar to what the error() and errorInModel() methods create, but not as an error, just a simple message. I searched for a built-in method in the Help, but couldn't find anything.

It's not intended for an end user, just for myself as an alternative to printing to console during debugging.


Solution

  • No, but you can create an agent type with a visual warning msg.

    Embed the agent in Main as myAgent.

    When you have your issue, you jump into the agent using ((Main)getRootAgent()).myAgent._origin_VA.navigateTo();

    this will visually jump into the agent.

    It is up to you to change the msg in that agent using a text object, obviously.