AnyLogic supports on-the-fly checking of types, parameters, and diagram syntax. As you develop your model in the AnyLogic workspace, AnyLogic may automatically detect some problems or errors. The errors found during code generation and compilation are displayed in AnyLogic Problems view. For each error, the Problems view displays description and location.
To show or hide the Problems view
- Choose View > Problems from the main menu.
The first column of the Problems view displays an icon that denotes the type of the item. Click on the item to open the file in an editor, the line containing the problem will be highlighted.
You can open an error. Depending on the error, opening it may result in displaying different views If, for example, it is a graphical error, the corresponding diagram is opened in the graphical editor with invalid shapes highlighted.
To open an error
- Double-click the error in the Problems view.
It is not always possible to give an exact error location in AnyLogic windows. For example, if you are trying to use an identifier Java cannot resolve, it could be an undeclared variable, or a parameter, or anything else. In such cases, AnyLogic displays a JAVA file and positions the cursor at the error location. This file is opened read-only and it is up to you to track down the real error location in AnyLogic.
The Problems view displays information about problems of two types: errors and warnings.
- Error — a critical problem that makes the model non-working and should be necessarily fixed.
- Warning — information about some non-critical issue that may potentially lead to some problems, or just an advice how to optimize the implementation (e.g. information about use of deprecated function). Warnings do not prevent you from running the model.
You can easily distinguish errors from warnings. Just look at the icon shown in the leftmost column of the corresponding entry in the Problems view.
By default the information about warnings is hidden to concentrate only on critical errors that should be fixed. You can show warnings the following way:
To show warnings
- Click the Show warnings button in the Problems view. When the button is shown pressed, the warnings are shown, otherwise — not.
You can filter errors in the Problems view, to view only warnings and errors for a particular element.
To show all errors in the workspace or for a selected element only
- Click the Filter problem by selection button in the Problems view.
How can we improve this article?