Documentation Center

  • Trial Software
  • Product Updates

sedb.evinfo

Package: sedb

Event information in discrete-event simulation

Syntax

ev_struct = evinfo(evid)

Description

ev_struct = evinfo(evid) returns a structure that stores information about the event with identifier evid. To obtain a list of events on the event calendar and their identifiers, use sedb.evcal.

Input Arguments

evid

String that represents an event identifier.

Output Arguments

ev_struct

Structure that stores information about the event. The following table describes the ev_struct fields.

FieldDescription
IDEvent identifier
EventTypeType of event
EventTimeScheduled time of event
PriorityPriority of event
EntityIdentifier of entity associated with the event
BlockPath name of block that executes the event

Examples

View event information:

  1. Begin a debugger session for a particular model. At the MATLAB® command prompt, enter:

    sedebug('sedemo_count_attributes')
  2. Proceed in the simulation. At the sedebug>> prompt, enter:

    step

    The output shows the identifier, ev1, in the display:

    %==============================================================================%
    Initializing Time-Based Entity Generators
        %..........................................................................%
        Scheduling EntityGeneration Event (ev1)
        : EventTime = 0.000000000000000 (Now)
        : Priority  = 1
        : Entity    = <none>
        : Block     = Time-Based Entity Generator
  3. View information about the event that the application is about to schedule:

    evid = gcev
    evdetails = evinfo(evid)

    The output shows the same identifier, ev1, in the workspace variable, evid, and the ID field of the structure, evdetails:

    evid =
    
    ev1
    
    
    evdetails =
    
               ID: 'ev1'
        EventType: 'EntityGeneration'
        EventTime: 0
         Priority: '1'
           Entity: ''
            Block: 'sedemo_count_attributes/Time-Based Entity Generator'
    
  4. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

See Also

|

Was this topic helpful?