On the validity of discrete event models
Universidad Panamericana, McLeod Institute for Simulation Sciences
Augusto Rodin 498, 03910 Mexico City, Mexico
Keywords: modeling, simulation, discrete events, validity
Discrete event models are commonly used while simulating queuing, manufacturing and
similar systems. However, in some cases the concept of events, which duration is equal to
zero may be too simplified and the validity of the model questionable. An alternative
approach is proposed, called semi-discrete events that permits a finite duration of the
event activity. This leads to a model specification where there is no conceptual difference
between semi-discrete and continuous events. It is shown that discrete event models may
be located in the points of discontinuity in the general space of models (may form
singularities). This may have serious consequences, namely the validity of such models
may result to be false.
Discrete event models are commonly used in so-called discrete simulation. The other part
of the simulation methodology and its implementations is called continuous simulation.
These two branches of simulation seem to be totally different though some models are
created using combined simulation when the two approaches are being mixed together
with or without success. Observe that whatever would be the classification of a model we
create, we always pretend to find an abstraction of the real world. Classifying the part of
the real world as discrete or continuous, the modeler frequently looks at the real world
through a (correct or false) mirror of the simulation tools he/she dominates. In fact, the
things we observe in the real word do not divide into continuous and discrete. This is
only the deficiency of our modeling tools that suggests such division. Consequently, we
tend to see a mass service and queuing systems as "discrete" and to describe almost all
apparently continuous physical processes by differential equations, even if no such
equations for a given process exist at all.
In one of my previous articles a metric structure for the space of (all) models have been
proposed (Raczynski, 1998). This permits us to talk about the convergence of sequences
of models and about the continuity of certain mappings in the model space. The point of
this article is to suggest that discrete event models may represent singularities in the
model space, and certain mappings from a parameter space to the simulation results
space may result to be discontinuous at the point when the discrete event model is
located. This is closely related to the model validity.
THE DISCRETE TIME AND DISCRETE EVENTS
First of all, it should be emphasized that we will not enter neither into the relativistic
approach to the concept of time, nor into the quantum physics. In both fields the time is
something far more complicated that what our experience and intuition might indicate.
Let us limit to the concept of the real time and the model time. Real time is what our
(physical) clocks are trying to measure and indicate. The model time is just a variable in a
simulation model, changing its value according to the calculations of the model
trajectory. It can be represented by one model variable, or a set of variables, as sometimes
occurs in the distributed simulation. Simulating the movements of a galaxy, the model
time interval can reach billions of years, while the simulation run needs one hour of real
Historically, the model time in early simulation languages like Control and Simulation
Language (CSL) used in the middle of the past century and in the early implementations
of GPSS was discrete. Then, the new simulation languages used real variables to
represent the continuously changing model time. Note that this "continuity" is always an
illusion. In the real computer nothing is continuous and the (mathematical) real variables
do not exist. Perhaps this is the reason why discrete events gained such a wide field of
applications. Other obvious fact is the relatively low computing cost and the high velocity
of the discrete-event simulations. Let take a look at the discrete event. This is the change
in the model state that occurs in a discrete time instant. In other words, the length of the
model time interval during which a discrete event occurs is equal to zero. One can say
that the discrete event models are too simplified, because no real physical system can
change its state in time zero. But this does not mean that discrete event models are
invalid. Remember that what we are looking for are abstractions of the real world.
Nobody pretends to create a model that reflects all what occurs in the reality. There are
various criteria to check the model validity. Most of them refer to the abstraction or
simplification operation that transforms the real model state into the state of a model.
Roughly speaking, if the following two operations: transforming (simplifying) the model
state and advancing in model and real time lead to the same result (model state)
independently of the order we execute them, the model is said to be valid. However, this
validity criterion only refers to state transformations and not to passing from a real
system to a discrete event model (this rather refers to the model time handling).
Other measure of the model validity is how it approximates the reality. Any simplified
model has some characteristics or parameters that, while changed, approximate better or
worse the real system. One of such parameters can be the duration D of events. If this
time interval is equal to zero, the model events become discrete. In other words, a
discrete event model could be treated as the limit case of a series of models with finite
duration D of single event execution, while D approaches zero. The question is how the
simulation results change if D tends to zero. Let denote the set of the results (outputs) of
our model by R(D). If the mapping M from the space of D values (real numbers space)
into the results space is continuous, we can say that the discrete event model is valid,
because when we pass from semi-discrete evens (with finite duration) to the discrete
events model, R(D) tends to R(0) (D approaches zero). Unfortunately, in general, this is
NOT the case. In other words, the results provided by a model with very small D could
be completely different from the results of the corresponding discrete event model (when
D=0). Let see some examples.
First, consider a simple physical system, shown at figure 1.
Figure 1. A model of an electric circuit.
Suppose that all elements of the circuit of figure 1 are ideal ones, so the conductors have
resistance equal to zero and no inductance, the switch is an ideal on-off contact and the
capacitors have no internal resistance or inductance. This is not an exaggerated
simplification. Simulating electric circuit models we almost always make such
assumptions. Now, suppose that the initial voltages of the capacitors are U = 1V, W = 0
and that the switch closes at time t = 1. The event we simulate consists in passing electric
current through the resistance R, so that, finally, U = 0.5V and W = 0.5V (the capacitors
are equal to each other). Theoretically, this event has an infinite duration, and the current
approaches zero according to the exponential curve. But in our case we suppose that the
event is over when the current is less then 0.001 its initial value. Obviously the duration
of the event depends on the resistance R. The current is given by the following formula
i (t ) (1 e(t 1) / T )
where t 1, T
Now, let pass with R to zero. The event duration D becomes small, and in the limit we
have D = 0 with R = 0. The voltages of the two capacitors at the end of the event are
always equal to each other, U = W = U(0)/2 = 0.5V. So, one could say that the model
with R = 0 is a valid model of the circuit when R is very small. However, this is not the
case. Consider the limit model (R = 0). The total circuit energy before the event (before
closing the switch) is equal to U(0)2C/2 = 0.5C. After closing the switch the total energy
accumulated in the two capacitors is equal to
0.52 C 0.52 C
So, where the half of the circuit energy disappeared? It is something wrong with the limit
model; it is simply a wrong, invalid model of our circuit. If we ask the same question for
the model with R>0 (even very small), there is no problem with the energy. A simple
calculation of the transient process shows that the half of the initial energy always
dissipates on the resistor, independently of its value. So, we cannot replace the model
with, R equal to, for example, 0.00000000001ohms by the model with R = 0. From the
mathematical point of view the mapping D -> R(D) mentioned before is not continuous at
D = 0.
But the above example is perhaps not the most typical for discrete event applications,
because it is rather a physical system. However, it shows that a discrete event may not be
a limit case of a sequence of finite-duration events, and the discrete case may lie in a
discontinuity point in the space of events. Generally speaking, the change of the model
state must take certain time interval, because the energy cannot be transferred in time
zero. Now, let us consider rather logical than physical model. In the logical problem
statement the model state is a more generalized, abstract concept, though it might appear
to be simple. In such models, mainly queuing, manufacturing, military etc. we have
atomic models like queues or servers, and complex models composed by the smaller
elements. There is a vast literature and important theoretical work done in the field,
mainly the Discrete Event Specification Formalism (DEVS, see Zeigler 1976, Barros
1996, Chow 1996). What is common in all serious works on DEVS is the problem of
simultaneous event treating. Once we admit discrete events, we must face this problem
that implies model ambiguity and certain known logical conflicts caused by the
possibility of simultaneous events. This is frequently overcome by adding a "select"
element to the model specification. This is an algorithm or an additional rule that resolves
possible conflicts. Note, however, that this is some artificial, implementation-dependent
element that has no corresponding component in the real modeled system.
Any valid model of a real system cannot be language- or implementation-dependent. This
means that the difference in the model output implemented on different platforms can
differ only due to a particular computer and software resolution and cannot be completely
different from each other in the qualitative and logical sense. This makes the treating of
simultaneous evens difficult. While running simultaneous events on a single-processor
machine, the events occur simultaneously in model time, but not in real time. Any event
must be put at one or more event queues and the order of the simultaneous event
execution may be random or may depend on the particular hardware or software (for
example, the place in the source code where the event specification has been located).
This order has nothing to do with any property of the modeled system, but may influence
dramatically the simulation results, making the model invalid.
Take a look at the simple model of a duel. The rules are as follows. Two duelists wait for
the signal from a judge, in the initial position A (figure 2). When the signal comes, each
of them starts walking forward, and when the following signal comes, they turn back and
shoot (position B). A simple rule is that each duelist is a perfect shooter, so his bullet kills
his adversary after a small time interval. However, he cannot shoot being hit by the shot
of the other one and killed. The output from the model is the average number of
survivors. Several events occur in the model. Suppose that the two duelists are identical
to each other, so they move, turn and shoot in exactly the same moments, so all
corresponding events have the same time locations for the two men. Now, consider the
event "shoot-and-kill". First, suppose that this event has a finite duration (case 1: D>0).
This is due to velocity of the bullet and the small time interval between being hit and die.
Obviously, in this case the two duelists kill each other and the number of survivors is
equal to zero. This result does not depend on D, and is valid for any D approaching zero,
but different from zero.
Figure 2. A model of a duel.
Now, consider case 2, with D=0. In this case the two events "shoot-and-kill" (for the two
men) are put into the event queue and scheduled for the same model time. The order of
their execution (in the real time) may be random or fixed by the implementation, and it is
implementation-dependent. It may also be controlled by certain DEVS selection rule.
But, observe that whatever this order would be, the number of survivors is always one,
because the duelist who has already been killed cannot shoot. This means that our
discrete event model is invalid.
The above example shows that the discrete event model (case 2) is not the limit case of
any series of models with non-discrete events, with D approaching zero. In other
words, we see again that the mapping from the space of real positive numbers (values of
D) into the space of results in not continuous at D=0.
Consider other example, a simple mass-service model in with clients must pass through
two consecutive servers without buffers. Any client who cannot occupy a server is being
lost and disappears from the model. Suppose that the clients arrive in time intervals equal
to one time unit and the service time for each server is equal to one. A new client or that
who leaves the first server and intents to seize the following one may not be allowed to
do this, because the server is still occupied. In fact, the server will be free at the same
model time instant, but the client event (seize the server) has already failed and the client
has been lost. The number of lost clients depends again on the implementation, namely
on the order of simultaneous event execution. The SELECT feature of the DEVS
formalism solves this conflict, but it results to be a non-trivial problem.
Let us see what happens in the real system. A new client or that leaving the first server
looks at the state of the following server. If he observes that the server is changing its
state at the moment, he will immediately seize the server and will not be lost. But this
needs a small (maybe approaching zero) model time interval. This means that the event is
executed in some non-zero model time. Note that the client will not wait in any queue.
So, the number of lost clients in the real system is equal to zero, and the discrete-event
model (without a proper SELECT rule) is invalid.
Packages like GPSS simply add invisible buffers before each server. This is not what is
proposed in this paper. The difference between ideal discrete events and the semi-discrete
events proposed here is the definition of an event as an activity of a model object,
which may change the model state and is performed during some time interval.
Thus, an event can have any duration. This means that there is no difference between
semi-discrete and continuous events. Simply a continuous event may have duration equal
to the whole simulation time interval or a part of it, while a semi-discrete event is that
which duration is small. The event duration D belongs to the interval (0,final time]. Note
that this interval is open at the left side. In other words, the case D=0 is not included.
According to this approach, any model is defined in terms of events. Consequently, there
is no difference between continuous and discrete-event simulation. Simply the
continuous events have a longer model time activity interval, and the duration of semi-
discrete events is small.
Figure 3 shows this concept. Case A shows the "activity status" of discrete events with D
= 0. The activity status merely shows whether the event is active at the moment. The
case B depicts the semi-discrete events (small activity intervals). The event CE should be
classified as a continuous event. In the semi-discrete event simulation simultaneous
events does not exist. Instead, the events can be executed in separate or overlapping time
intervals. The only requirement for semi-discrete events is that the activity interval D
cannot be equal to zero.
As there is no conceptual difference between semi-discrete and continuous events, we
should look for a unique software tool for the model handling. This is not a purpose of
this paper to propose such tools. In general, this task could be difficult and any
implementation of semi-discrete model could result to be hundreds times slower than the
corresponding classic discrete event model. But, this is not the argument to reject the
concept. We should look for new tools and not for theories that fit into existing ones.
It should be clearly defined what a semi-discrete event is. First of all, the event should
have a well-defined objective (aim). This normally will consist in changing the state of
some model components. If this objective is reached, the event activity terminates.
Activity status A
Figure 3. Activity status of discrete events (A) and semi-discrete events (B). CE is a
The event should include the following operations.
1. Permanently observe the state of the model or its part, evaluating the logical condition
for the execution of the operational part. If the result is TRUE, then go to the operational
2. Operational part: fulfill the objective.
3. Terminate event activity.
The event is invoked by the "clock" mechanism of the actual software package, according
to the event message taken from the event queue. Termination of the event activities is
controlled by the event itself. The event activity interval can be less or equal to the pre-
defined event duration.
The term "permanently observe" could be difficult and expensive to implement. The
event cannot occupy the computer processor. On a multi-processor system it might be
easier to implement, but anyway the vent will occupy a processor for a given real time
interval. The task can be implemented using existing, discrete-event tools, but it is
perhaps not a proper way to handle semi-discrete events.
Some simple examples have been implemented using the PASION simulation system
(see links in the References). Here is a fragment of the output from a model discussed in
the previous example (two consecutive servers).
10.01056654 10 End service 1
10.01056654 10 try to enter serv 2
10.01058492 11 try to enter the first server
11.01030253 End service 1
11.01030253 11 try to enter serv 2
11.01040253 11 try to enter serv 2
11.01050253 11 try to enter serv 2
11.01056654 End service 2
11.01060253 11 try to enter serv 2
11.01234052 12 try to enter the first server
12.01060253 End service 2
12.01200983 12 End service 1
12.01200983 12 try to enter serv 2
12.01394743 13 try to enter the first server
13.01200983 End service 2
13.01429602 End service 1
13.01429602 13 try to enter serv 2
The first column shows the model time, and the second is the object identifier (except
"End service" events). The time intervals between client arrivals were equal to one time
unit. The fractional part of the model time is caused by the finite event activity duration.
Note several intents to seize a server that is occupied in the moment, but released within a
small model time interval. In the "normal" ideal discrete event simulation the client 11
will not be able to enter service (server 2) and will be lost unless some extra conflict
resolution mechanism is applied. The "try to enter..." operation is the repeatedly executed
the condition checking operation 1 of the event activities mentioned earlier.
The validity of discrete event models is questionable. We do not insist that discrete event
models are always invalid. Even if so, they are commonly used with good results.
However, we should reconsider the concept of model validity in general, and all its
consequences. The question is, if an invalid model can be used at all. The reality is that
invalid models are frequently created, implemented and used without any dramatic
consequences. For example, most of the simulationist in the System Dynamics field
create their models and believe that the use of well-verified tools like Dynamo or Stella
makes their models valid. It is sufficient to revise thousands of papers on both continuous
and discrete simulation, to see that very few authors check the model validity or even
mention the issue.
Semi-discrete models will be most expensive and slow, if implemented on the available
hardware. But, as this concept puts semi-discrete and continuous models in one unified
modeling frame, it could be worth of some further research.
Barros F.J., 1996, The Dynamic Structure Discrete event System Specification Formalism, Transaction of
the Society for Computer Simulation, vol. 13, no.1, pp 35-
Chow A.C.-H., 1996, Parallel DEVS: A parallel, hierarchical, modular modeling formalism and its
distributed simulator, Transaction of the Society for Computer Simulation, vol. 13, no.2, pp 55-67.
Raczynski,S.,1998, On the metric structure in the space of dynamic system models, Transactions of the
Society for Computer Simulation International, Vol.15 co.2, pp.70-75, June 1998.
Zeigler B.P., 1976, Theory of Modelling and Simulation, Wiley-Interscience, New York.