| Contents | Index |
Current time in discrete-event simulation
t = simtime
t = simtime, at the SimEvents debugger command prompt, returns the current simulation time.
Set a breakpoint to advance the simulation by 2 s from the current time:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_count_attributes')Use the current time to set a breakpoint. At the sedebug>> prompt, enter:
t = simtime; tbreak(t+2)
The following output confirms the setting of the breakpoint:
Set b1 : Breakpoint for first operation at or after time 2
Run the simulation until the breakpoint:
cont
The output describes simulation behavior and then confirms that the debugger has reached the breakpoint. Here is an excerpt:
Hit b1 : Breakpoint for first operation at or after time 2 %==============================================================================% Executing EntityGeneration Event (ev3) Time = 2.000000000000000 : Entity = <none> Priority = 1 : Block = Time-Based Entity Generator
End the debugger session. At the sedebug>> prompt, enter:
sedb.quit

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 |