Checking that a simulation is doing what it is designed to do needs some special tools. SIMUL8 provides several main ways of checking your simulation:
The Simulation Monitor is accessed through the Visual Logic tab. It shows every event that has happened, is currently happening, or is due to happen.
The Visual Data Tool can be found on the the Insert tab.
Visual Data allows you to display the current value of a Global Data Item on screen. This can be used to track values, and Global Data Items can be added to the KPI Summary (Right Click on them in the Information Store).
The contents dialog lets you look inside an Activity or Queue at the actual Work Items currently inside it. Click “Contents” in either the dialog box for the particular object. The dialog shows the first 500 Work Items in the object.
Visual Logic contains 2 main Debugging tools: Stop (Debug) at Current Line, and Disable Current Line.
Disable Current Line
Disable Current Line simply comments out a line of Visual Logic, so that you can test if it has the desired effect when running. To disable a line of code, highlight the line of code in the Visual Logic Editor window and right-click with the mouse, or press the INSERT key to open the command menu. Select the option “Disable Current Line”. The line of code will appear in the window with a red cross at the left hand side. This is to signify that this line will no longer be executed when the simulation runs.
Stop (Debug) at Current Line
This is a very powerful debugging feature as it stops the simulation run when a particular line of code is reached so that the user can examine what is happening in the simulation and step through a block of visual logic. To put a debug in visual logic code, highlight the line of code that you wish to stop the simulation at. Right click with your mouse or press the INSERT key to opn the command menu. Select the “Stop (Debug) at Current Line” option. The debug feature will color a line of Visual Logic, indicating that this is a breakpoint.
When SIMUL8 encounters this line of code it will stop, and display a message. Clicking the OK or Ignore buttons will open the visual logic editor to allow you to step through your code. Pressing the Step button or F8 function key allows the code to progress, line by line. The code can be watched as it executes to make sure that it is executing as designed.