This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Discrete-Event Simulation in Simulink Models

SimEvents® software incorporates discrete-event system modeling into the Simulink® time-based framework, which is suited for modeling continuous-time and periodic discrete-time systems. In time-based systems, state updates occur synchronously with time. By contrast, in discrete-event systems, state transitions depend on asynchronous discrete incidents called events. Some examples illustrate these differences:

  • Suppose that you are interested in how long the average airplane waits in a queue for its turn to use an airport runway. However, you are not interested in the details of how an airplane moves once it takes off. You can use discrete-event simulation in which the relevant events include:

    • The approach of a new airplane to the runway

    • The clearance for takeoff of an airplane in the queue

  • Suppose that you are interested in the trajectory of an airplane as it takes off. You would probably use time-based simulation because finding the trajectory involves solving differential equations.

  • Suppose that you are interested in how long the airplanes wait in the queue. Suppose that you also want to model the takeoff in some detail instead of using a statistical distribution during runway usage. You can use a combination of time-based simulation and discrete-event simulation, where:

    • The time-based aspect controls details of the takeoff

    • The discrete-event aspect controls the queuing behavior

In a Simulink model, you typically construct a discrete-event system by adding various blocks, such as generators, queues, and servers, from the SimEvents block library. These blocks are suitable for producing and processing entities, which are abstractions of discrete items of interest. Examples of entities are packets within a communication network, planes on a runway, or trains within a signaling system. Asynchronous events that correspond to motion and changes in entity attributes through the system model update the states of the underlying system. Examples of states are lengths of queues or service time for an entity in a server.

One or more discrete-event systems can coexist with time-based systems in a Simulink model. This coexistence facilitates the simulation of sophisticated hybrid systems. You can pass signals from time-based components/systems to and from discrete-event components/systems modeled with SimEvents blocks. The combination of time- and event-based modeling facilitates the simulation of large-scale systems that incorporate smaller subsystems from multiple environments. An example of a large-scale system might have physical modeling for continuous-time systems, such as electrical systems, which communicate via a channel modeled as a discrete-event system. A Simulink model can also contain a purely discrete-event system with no time-based components when modeling event-based processes. These systems are common in models that represent logistic and manufacturing systems.

Related Examples

More About

External Websites

Was this topic helpful?