SIMUL8 Feature List - Debugging Your Simulation

SIMUL8 makes it really easy to get your simulation just how you want it.


Step

The Step button allows you to move through the simulation one event at a time. This is really useful when trying to debug a simulation. It allows you to closely follow one work item and check the parameters being updated at each stage.

[Top of the page]


Onscreen Results

Activities and Queue optionally display onscreen their current contents count. Ends display the number of completed work items and Start Points how many items have entered. These count displays and a great way to quickly visually check whether everything in your model is as it should be.

[Top of the page]


Simulation Monitor

The simulation monitor lets you see the detailed activity taking place within SIMUL8's internal simulation engine.

The Next Step tab shows a description of the next thing which is going to happen or the next thing which SIMUL8 will test to see if it can happen. (For example "End of job on Activity" or "Try to move a work item to an Activity").

The History tab shows a list of the previous 100 "Steps" (as on the Next Step tab) except that the history only shows successful steps. (For example if "Try to move a work item to an Activity" was not actually able to move the work item because the Activity was already busy then this is not shown in the history as it did not actually happen). The history tab also shows the times at which each step took place.

Click RUN to run the simulation while continuously monitoring the steps. Click STEP to move forward just one step. Note that Step here is more detailed than Step on the main button bar because the main button bar step on shows steps which have an effect on the simulation model (the successful steps in the simulation monitor).

If you double click on any event in the Future tab of the Simulation Monitor the simulation will run until this event is reached then stop. This is really useful for debugging because it lets you get your simulation to exactly the time you want it at.

[Top of the page]


Watch Window

This amazing debugging aid shows you the state of any part of your simulation at any time.  Any formula or property reference can be added to the window.  Its value is updated as it changes.

And the watch window's dockable so you can leave it visible as your simulation runs

Click right in Visual Logic windows has Watch Window options for use during debugging. You can even add values to be watched directly from the Visual Logic window.

[Top of the page]


Speed Analyzer

Find out the parts of your Visual Logic that are taking a long time to run. This feature makes it quick to find ways to improve the speed of very complex simulations.

Included in SIMUL8 Professional Only.

[Top of the page]


View Contents

The contents dialog lets you look inside an Activity or Queue at the actual work items currently inside it.

The displayed dialog box lists the work items (the names shown in the left hand list are the names of the work item type) and their labels. The work items in a queue are shown in sequence in the queue. The top of the list is the work item at the head of the queue.

Clicking on a work item and a label name displays the values of the label.

Right click in the Contents Dialog to copy the Contents information to the Clipboard. This allows precise analysis of the contents of an object.

You can also reach the contents dialog to see an individual work item. If you can see the work item on the screen (on a conveyor, in an animated queue, or just traveling between objects) just click on it while holding down CTRL and SHIFT on the keyboard.....this will take you straight to the contents dialog for that work item.

[Top of the page]


View All Work Items

The View All Work Items options allow you to view the properties and location of every work item in the simulation.

To use as a debug tool, select an item and then select the This WI Image option and change the color of the item. You will then be able to watch it travel through the simulation.

[Top of the page]


Disable Current Line

Disable Current Line “Comments Out” a line of Visual Logic, so that you can test if it has the desired effect when running. For example, in this block of code the second line of code (with the large red X at the beginning of the line) is disabled and will not run.

[Top of the page]


Stop Debug at Current Line

Stop Debug at Current Line is a very powerful debugging feature. 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. 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.


Trace Work Item

Trace Work Item is similar to the 'stop and debug at line'. It lets you trace your work item as it passes through a section of visual logic code. So each time your work item causes some visual logic to run the model stops and lets you step through the code line by line.

[Top of the page]


Debugging Toolkit

This suite of tools will let you debug your Visual Logic much faster.

Value Tips

While in debug mode whenever you hover your mouse over any variable in Visual Logic or object property the value of this item is displayed in the status bar of the debug window. This saves all the stopping and starting of your simulation and the going backwards and forwards between different windows.

Monitor Spreadsheet

Spreadsheets can be left open during debugging so that you can easily monitor value changes. This really speeds up the debugging process and makes it much easier.

Stop When Value Changes

Add any formula to the watch window and whenever it's changed through Visual Logic the simulation will stop and you can view the piece of logic which caused the change. If the change isn't made through Visual logic you can stop the simulation and view the simulation monitor to explore what caused the change.

More Stop Debug Options

The Stop Debug mode has additional controls in Professional that let you:

Step Into:

Executes the next line of Visual Logic and steps into called sections.

Step Over:

Executes the next line of Visual Logic without stepping into called sections.

Step Out of this Section:

Executes the remainder of the current called section and breaks at the next line in the main Visual Logic section.

Run to Selected Line:

Allows you to insert a temporary break point. Simulation runs until it reaches this.

Call Stack

While in break mode, Call Stack presents a dialog box that shows all the Visual Logic sections that have been called but not yet run to completion. The Call Stack helps you trace your code as your simulation executes a series of nested procedures.

For example, a Visual Logic section can call a second Visual Logic section, which can call a third Visual Logic section - all before the Visual Logic section that started this chain is completed. Such nested Visual Logic calls can be difficult to follow and can complicate the debugging process.

These features are only available with SIMUL8 Professional

[Top of the page]


All States Now

This report shows the current state of every Activity, Start Point and Conveyor in your simulation, so whether it's working, blocked, waiting on work to arrive etc.

You can also choose to "Show States" so you can see visually on screen the states. The states stay visible as the simulation runs providing additional animation and a valuable debugging tool.

[Top of the page]