Skip to Main Content Skip to Search
Product Documentation

Stepping Through the Simulation

Overview of Stepping

Using the SimEvents debugger, you can proceed step by step in the simulation. After each step, you can inspect states or issue other commands at the sedebug>> prompt.

When to Step

Stepping is appropriate if one of these is true:

When Not to Step

Stepping is not the best way to proceed with the simulation in the debugger if one of these is true:

How to Step

If you have decided that stepping is appropriate for your debugging needs, at the sedebug>> prompt, enter one of the commands in the next table. To learn about the choices for granularity of steps, see Choosing the Granularity of a Step.

If Latest Message in Simulation Log Is...And You Want to...At sedebug>> Prompt, Enter...
An independent operation (not indented)Take the smallest possible stepstep or step in
Skip consequences of the current operation and stop at the next independent operation that appears in the simulation logstep over
A dependent operation (indented)Take the smallest possible stepstep or step in or step over
Skip remaining consequences of the previous independent operation and stop at the next independent operation that appears in the simulation logstep out

As a result, the simulation proceeds and the simulation log displays one or more messages to reflect the simulation progress.

For an example, see Building a Simple Hybrid Model (Confirming Event-Based Behavior Using the SimEvents Debugger section).

Choosing the Granularity of a Step

Using the SimEvents debugger, you can proceed in the simulation by an amount that corresponds to one message in the simulation log, or a collection of messages. The endpoint of a step depends on these factors:

Taking the Smallest Possible Step

The smallest possible step in the SimEvents debugger corresponds to one message in the simulation log. Taking the smallest possible step is appropriate if one of these is true:

Taking a Larger Step By Skipping Consequences

A potentially larger step in the SimEvents debugger corresponds to a series message in the simulation log. The last message in the series is not indented, while other messages in the series are indented to show that they represent consequences of an earlier operation. Taking a larger step is appropriate if one of these is true:

For Further Information

Tips for Stepping Through the Simulation

  


Free Discrete Event Simulation Technical Kit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS