| Contents | Index |
Set breakpoint on operation involving target entity
enbreak(enid)
enbreak
enid
benid = enbreak(enid)
enbreak(enid) or enbreak enid sets a breakpoint for execution or cancellation of the entity with identifier enid in the simulation.
benid = enbreak(enid) returns the identifier of the entity breakpoint.
enid |
String that represents an entity identifier. |
benid |
String that represents an entity breakpoint identifier. |
Set a breakpoint on an advancing entity.
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_timeout')Proceed in the simulation. At the sedebug>> prompt, enter:
step over
The output is:
%==============================================================================%
Initializing Time-Based Entity Generators
%..........................................................................%
Scheduling EntityGeneration Event (ev1)
: EventTime = 0.500000000000000
: Priority = 1
: Entity = <none>
: Block = Time-Based Entity Generator
%==============================================================================%
Executing EntityGeneration Event (ev1) Time = 0.500000000000000
: Entity = <none> Priority = 1
: Block = Time-Based Entity GeneratorProceed further on in the simulation. At the sedebug>> prompt, again, enter:
step over
The output is:
%..........................................................................%
Generating Entity (en1)
: Block = Time-Based Entity Generator
%..........................................................................%
Entity Advancing (en1)
: From = Time-Based Entity Generator
: To = Schedule Timeout
%..........................................................................%
Scheduling Timeout Event (ev2)
: EventTime = 1.500000000000000
: Priority = 1700
: Entity = en1
: Block = Schedule Timeout
%..........................................................................%
Entity Advancing (en1)
: From = Schedule Timeout
: To = Infinite Server
%..........................................................................%
Scheduling ServiceCompletion Event (ev3)
: EventTime = 0.596864516245641
: Priority = 1
: Entity = en1
: Block = Infinite Server
%..........................................................................%
Executing Scope
: Block = Number of Entities Time-Stamped
%..........................................................................%
Scheduling EntityGeneration Event (ev4)
: EventTime = 1.000000000000000
: Priority = 1
: Entity = <none>
: Block = Time-Based Entity Generator
%==============================================================================%
Executing ServiceCompletion Event (ev3) Time = 0.596864516245641
: Entity = en1 Priority = 1
: Block = Infinite ServerSet a breakpoint that causes the debugger to stop when it is about to advance the entity, en1.
The output confirms the operation:
Set b1 : Breakpoint for operation involving entity en1
Run the simulation until the breakpoint:
cont
The output shows that the debugger hits the entity and stops upon hitting the breakpoint at entity, en1.
Hit b1 : Breakpoint for operation involving entity en1
%..........................................................................%
Entity Advancing (en1)
: From = Infinite Server
: To = Cancel TimeoutEnd the debugger session. At the prompt, enter:
sedb.quit

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |