| Contents | Index |
Customize debugger simulation log in discrete-event simulation
detail(settingtype)
detail(struc)
detail(Name,Value)
prev = detail(settingtype)
prev =
detail(struc)
prev =
detail(Name,Value)
detail
curr = detail
detail(settingtype) configures the debugger to omit or show certain simulation log messages. Choices of settingtype are described in the table.
| Value of settingtype | Description |
|---|---|
| 'none' or 'off' | Configures the debugger to omit all simulation log messages, except upon reaching breakpoints. This syntax is the same as detail('en',0,'ev',0,'cal',0). When the debugger omits all simulation log messages, you cannot use the step function to step to anything other than breakpoints. |
| 'default' or 'on' | Resets the detail settings to the default values of the debugger. This syntax is the same as detail('en',1,'ev',1,'sig',1,'cal',0). |
| 'all' | Configures the debugger to show all simulation log messages. This syntax is the same as detail('en', 1, 'ev', 1, 'sig', 1, 'cal', 1). |
detail(struc) uses the structure struc to establish detail settings.
detail(Name,Value) configures the debugger to show or omit certain kinds of messages in the simulation log. You can specify one, two, or three Name,Value pair arguments.
prev = detail(settingtype), prev = detail(struc), or prev = detail(Name,Value) configures the debugger based on the inputs, and also returns a structure that describes the previous detail settings.
detail displays the current detail settings.
curr = detail returns a structure that describes the current detail settings.
settingtype |
String that specifies a group of detail settings. Choices are 'none', 'default', and 'all'. |
struc |
Structure having three fields describing the detail settings that you want. Field names and field values are the same as in Name-Value Pair Arguments. |
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
curr |
Structure that describes the current detail settings. Field names and field values are the same as in Name-Value Pair Arguments. |
prev |
Structure that describes the previous detail settings before changing them. Field names and field values are the same as in Name-Value Pair Arguments. |
Configure displays for breakpoints and stepping:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_timeout')Establish a breakpoint. Then proceed in the simulation, suppressing the simulation log until the debugger reaches the breakpoint. At the sedebug>> prompt, enter:
tbreak 2 prev = detail('none') cont
The output ends with the context of the simulation at T=2:
Set b1 : Breakpoint for first operation at or after time 2
prev =
ev: 1
en: 1
sig: 1
cal: 0
Hit b1 : Breakpoint for first operation at or after time 2
%==============================================================================%
Executing EntityGeneration Event (ev10) Time = 2.000000000000000
: Entity = <none> Priority = 1
: Block = Time-Based Entity GeneratorNow that the simulation is at a point of interest, configure the debugger to show the simulation log. This configuration makes subsequent step operations more informative. Then move forward in the simulation:
detail(prev)
step overThe output confirms the change in detail settings and then shows the result of enabling the simulation log:
Event Operations (ev) : on
Entity Operations (en) : on
Signal Operations (sig) : on
Event Calendar (cal) : off
%..........................................................................%
Generating Entity (en4)
: Block = Time-Based Entity Generator
%..........................................................................%
Entity Advancing (en4)
: From = Time-Based Entity Generator
: To = Schedule Timeout
%..........................................................................%
Scheduling Timeout Event (ev11)
: EventTime = 3.000000000000000
: Priority = 1700
: Entity = en4
: Block = Schedule Timeout
%..........................................................................%
Entity Advancing (en4)
: From = Schedule Timeout
: To = Infinite Server
%..........................................................................%
Scheduling ServiceCompletion Event (ev12)
: EventTime = 2.581301297500028
: Priority = 1
: Entity = en4
: Block = Infinite Server
%..........................................................................%
Executing Scope
: Block = Number of Entities Time-Stamped
%..........................................................................%
Scheduling EntityGeneration Event (ev13)
: EventTime = 2.500000000000000
: Priority = 1
: Entity = <none>
: Block = Time-Based Entity Generator
%==============================================================================%
Executing Timeout Event (ev5) Time = 2.000000000000000
: Entity = en2 Priority = 1700
: Block = Infinite ServerEnd the debugger session. At the sedebug>> prompt, enter:
sedb.quit
sedb.blkbreak | sedb.cont | sedb.evbreak | sedb.tbreak

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |