| Contents | Index |
Enable breakpoints in discrete-event simulation
enable id1 id2 id3 ...
enable(id_array)
enable all
enable id1 id2 id3 ... enables the breakpoint having identifier id. To see breakpoints and their identifiers, use sedb.breakpoints.
enable(id_array) enables the breakpoints in the cell array, id_array.
enable all enables all breakpoints.
id |
String that represents a breakpoint identifier. |
id_array |
Cell array of strings that represent breakpoint identifiers. |
Manipulate timed breakpoints and run the simulation until a breakpoint:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_timeout')Establish and view breakpoints. At the prompt, enter:
tbreak 0.5 tbreak 1 tbreak 1.5 breakpoints
The output lists the breakpoints:
Set b1 : Breakpoint for first operation at or after time 0.5 Set b2 : Breakpoint for first operation at or after time 1 Set b3 : Breakpoint for first operation at or after time 1.5 List of Breakpoints: ID Type Value Enabled b1 Timed 0.5 yes b2 Timed 1 yes b3 Timed 1.5 yes
Delete, disable, and enable some of the breakpoints. View the resulting list:
bdelete b2 disable b3 disable b1 enable b3 breakpoints
The output is:
Deleted b2 : Breakpoint for first operation at or after time 1 Disabled b3 : Breakpoint for first operation at or after time 1.5 Disabled b1 : Breakpoint for first operation at or after time 0.5 Enabled b3 : Breakpoint for first operation at or after time 1.5 List of Breakpoints: ID Type Value Enabled b1 Timed 0.5 no b3 Timed 1.5 yes
Run the simulation until the first enabled breakpoint:
cont
The partial output shows that b3 is the breakpoint at which the debugger stops. The debugger ignores the disabled breakpoint, b1, and does not consider the previously deleted breakpoint, b2.
Hit b3 : Breakpoint for first operation at or after time 1.5 %==============================================================================% Executing EntityGeneration Event (ev7) Time = 1.500000000000000 : Entity = <none> Priority = 1 : Block = Time-Based Entity Generator
End the debugger session. At the prompt, enter:
sedb.quit
sedb.bdelete | sedb.breakpoints | sedb.disable

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 |