Keeping Track of a Simulation

You can output textual information during the model execution. You can use it for tracing the model execution by writing specific text on different occurrences. It can also be used as a debugging tool, for example, to find out what is the order in which the model executes actions of different objects. This possibility is convenient for output of information across several model runs, because information you write is not reset in between model runs. 

How-To video: Printing debug information

The log is displayed in the Console view as a read-only text, which can be copied onto the Clipboard. By default, the Console view opens at the bottom of the application window when you run your model.

You write to log using the functions trace() and traceln() in the same way as you write in Java using System.out.print() and System.out.println() Java functions.

Simple demo model: Event Writes to the Log


Related topics

    trace()

    traceln()