
Discrete-Event Simulation in Simulink Models
1-3
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 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 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 you are interested in how long the airplanes wait in the queue. Suppose you
also want to model the takeoff in some detail instead of using a statistical distribution
for the duration of 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 a variety
of 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. Using
special gateway blocks, you can pass signals from time-based components/systems to and
from discrete-event components/systems modeled with SimEvents blocks. These gateway
blocks enable time-based and event-based systems to share states. The combination
Commenti su questo manuale