You are on page 1of 14

Hindawi

Modelling and Simulation in Engineering


Volume 2018, Article ID 7842402, 13 pages
https://doi.org/10.1155/2018/7842402

Research Article
Qualitative Reasoning for Quantitative Simulation

Mehmet Fatih HocaoLlu


Department of Industrial Engineering, Faculty of Engineering and Natural Sciences, Istanbul Medeniyet University, Istanbul, Turkey

Correspondence should be addressed to Mehmet Fatih Hocaoğlu; hocaoglumf@gmail.com

Received 11 May 2017; Revised 5 August 2017; Accepted 5 September 2017; Published 1 January 2018

Academic Editor: Luis Carlos Rabelo

Copyright © 2018 Mehmet Fatih Hocaoğlu. his is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly
cited.

Qualitative simulation is a well-known reasoning technique that involves the use of simulation technologies. Reasoning is made to
determine qualitative values and change directions of system variables, and it is done for each time point and time interval following
the time point. Qualitative variables possess continuous qualitative value sets that are discretized by landmark points. Qualitative
simulation uses qualitative time representation and its quantitative value is of no interest. he main purpose of this study was to
develop a technique to determine time steps for a quantitative simulation under guidance of qualitative information. he proposed
technique determined time advances using qualitative and quantitative information together to obtain a robust time step as wide as
possible for simulation time advances. For this purpose, sign algebraic properties and derivation roots of quantitative equations and
qualitative variable values with their change directions were used to compute time advances. In the approach, qualitative simulation
determined landmark points to be advanced, and quantitative simulation calculated the duration required. Using the proposed
algorithm, the simulation is advanced instead of iterating simulation time for a predeined time step and checking whether or not
there is any activity in the interval, directly to the time points that are qualitatively diferent.

1. Introduction qualitative reasoning and sign algebra. In contrast to the ixed


time advance mechanism for continuous event simulation,
Qualitative simulation (QS) is deined as a reasoning tech- this approach maps continuous event simulation into discrete
nique using simulation, and it generates possible value and event simulation by discovering events and discontinuity
their change directions that are deined as state on time axis points using qualitative information with quantitative func-
for continuous event systems, using qualitative information tional analysis. It is known that every time step in con-
of the system being simulated, and the states following each tinuous event time management may possibly not compute
other in time point and time interval sequences consti- a qualitatively distinct state vector. As seen in the bathtub
tute behavior trees [1, 2]. Qualitative diferential equations example given in Section 5, although diferent numerical
(QDEs) utilized by QS represent a function family, not values for each time point in a time interval [�, � + Δ�] are
a speciic function; they accommodate a set of functions calculated, the time interval represents the same qualitative
beneath. Time axis in QS is constituted by time points and state vector, because all numerical values between � and � + Δ�
interval between time points. Qualitative state descriptions are mapped to the same qualitative interval. For example,
are computed for both time points and intervals, and they qualitative meaning is that water level is between zero and
constitute a simulation trajectory. Because of the incomplete full and it is increasing (⟨(0, full), inc⟩) (diferent cases for tub
information used by QS, each qualitative variable yields next problem are given in Table 2). Until a qualitative landmark
value set rather than a single value. As a result of this, point is reached, qualitative interpretations and mathematical
simulation execution gives possible alternative trajectories. properties (sign of derivatives, change direction) for the time
he main motivation of this study is to develop a simu- interval remain the same.
lation time management technique that advances simulation In this study, a time advance algorithm is developed
steps to system discontinuity points that are discovered by based on qualitative state vectors and qualitative algebra. he
2 Modelling and Simulation in Engineering

Table 1: Qualitative value (QV) transition rules.

P-Successors QV(V, �� ) ⇒ QV(V, �� , ��+1 ) I-Successors QV(V, �� , ��+1 ) ⇒ QV(V, ��+1 )


P.1 ⟨�� , std⟩ ⟨�� , std⟩ I.1 ⟨�� , std⟩ ⟨�� , std⟩
P.2 ⟨�� , std⟩ ⟨(�� , ��+1 ), inc⟩ I.2 ⟨(�� , ��+1 ), inc⟩ ⟨��+1 , std⟩
P.3 ⟨�� , std⟩ ⟨(��−1 , �� ), dec⟩ I.3 ⟨(�� , ��+1 ), inc⟩ ⟨��+1 , inc⟩
P.4 ⟨�� , inc⟩ ⟨(�� , ��+1 ), inc⟩ I.4 ⟨(�� , ��+1 ), inc⟩ ⟨(�� , ��+1 ), inc⟩
⟨�� , dec⟩ ⟨(��−1 , �� ), dec⟩ ⟨(�� , ��+1 ), inc⟩ ⟨(�∗ ) , std⟩
1
P.5 I.5
P.6 ⟨(�� , ��+1 ), inc⟩ ⟨(�� , ��+1 ), inc⟩ I.6 ⟨(�� , ��+1 ), dec⟩ ⟨�� , std⟩
P.7 ⟨(�� , ��+1 ), dec⟩ ⟨(�� , ��+1 ), dec⟩ I.7 ⟨(�� , ��+1 ), dec⟩ ⟨�� , dec⟩
P.8 ⟨(�� , ��+1 ), std⟩ ⟨(�� , ��+1 ), std⟩ I.8 ⟨(�� , ��+1 ), dec⟩ ⟨(�� , ��+1 ), dec⟩
P.9 ⟨(�� , ��+1 ), std⟩ ⟨(�� , ��+1 ), inc⟩ I.9 ⟨(�� , ��+1 ), dec⟩ ⟨(�� , ��+1 ), std⟩
P.10 ⟨(�� , ��+1 ), std⟩ ⟨(�� , ��+1 ), dec⟩ I.10 ⟨(�� , ��+1 ), std⟩ ⟨(�� , ��+1 ), std⟩
1 ∗
� is a value between �� and ��+1 .

Table 2: Diferences between cases. Several approaches and ontologies are proposed to
accomplish this purpose by researchers. Device centered
Case 1 Case 2 Case 3
ontology [3], process centered ontology [4], and constraint
Function based approach [2] are well-known methods. QSIM algo-
Inlow Constant Constant
dependent
rithm, as a constraint based approach, is one of the most
Constant Constant widely used algorithms in the developed techniques [1]. In
Function
Outlow because of because of
dependent constraint based qualitative simulation, qualitative variable
constant inlow constant inlow
values are represented as a discrete value set consisting of
Inlow/outlow landmark points. A landmark point represents a qualitatively
Interaction with valve clearance No
No interaction distinct model state. QS is performed from time point to
the system is changed interaction
exogenously
time interval and continued. In Table 1, qualitative value
transition rules from time point to time interval (P) and time
interval to time point (I) are depicted. As seen in the table,
main idea is to calculate a time step as wide as possible a qualitative value of variable V is represented by a value or
to reach the next qualitative state vector point (named as an interval with a change direction. he QSIM representation
landmark points) that is close to the current state value was developed, in part, to make the abstraction relationship
of simulation model depending on its change in direction between the qualitative representations and the theory of
instead of reaching the qualitative value by many small diferential equations explicit and precise. Qualitative difer-
time steps that the quantitative equations are solved for. In ential equation (QDE) is a tuple of four elements, ⟨�, �, �, �⟩,
some sense, this involves mapping a continuous space into each of which will be deined below [2], and they are used to
a discrete one and allowing it to reach a state point directly, ilter out spurious behaviors.
instead of traversing from one state to another by small time (i) � is a set of variables, each of which is a “reasonable”
steps. function of time.
In Section 2, qualitative simulation is summarized and
Section 3 gives brief information about the solution pro- (ii) � is a set of quantity spaces, one for each variable in
cedures for continuous event simulation with a time man- �.
agement taxonomy. While Section 4 gives fundamentals of (iii) � is a set of constraints applied to the variables in �.
the proposed qualitative time management approach, the Each variable in � must appear in some constraint.
approach is clariied by an example in Section 5. In the (iv) � is a set of transitions which are rules deining the
last section, advantages and disadvantages of the proposed boundary of the domain of applicability of the QDE.
solution are discussed.
he variables in a QDE represent time-varying quantities.
2. Qualitative Simulation In order to be possible for qualitative reasoning, variables
must be restricted to correspond to functions of time whose
Qualitative simulation (QS) is accepted as one of the qual- behavior is reasonable. First, a reasonable function must
itative reasoning (QR) techniques which are utilized to be continuously diferentiable. Transitions between domains
model human reasoning approach. he aim of QS is to will make it possible to represent isolated discontinuities
generate possible future qualitative behaviors of any kind of between regions of continuous behavior. Second, it is con-
system. During behavior generation, initial states, qualitative venient to consider each variable, including time, to range
constraint set, and qualitative value set that are associated over the extended real number line, �∗ , which includes
with qualitative state variables of the system are handled as the endpoints −∞ and +∞. he function V : [0, ∞] →
an input set. �∗ is deined to be continuous at ∞ exactly if lim�→∞ V(�)
Modelling and Simulation in Engineering 3

exist. Using extended real number line allows the use of the 3. Simulation Strategies and Time
invariant that the value of a variable always lies in a closed Management Techniques
interval deined by landmark values. hird, there will be a
need to avoid functions of time whose qualitative properties here are three available strategy types of discrete event
change ininitely oten in a inite interval. All these properties simulation which use discrete event simulation language. (1)
deine a reasonable function. Event-scheduling strategy deals with the prescheduling task
of the events. Activating events with the help of test on the
Deinition 1. Where [�, �] ⊆ �∗ , the function � : [�, �] → �∗ global state is out of the context of this strategy. (2) Activity
is a reasonable function over [�, �] if scanning strategy is diferent from event-scheduling strategy
because of the fact that the conditions of events are arranged
(1) � is continuous on [�, �], by contingency test. Besides that, the scheduling process is
carried out in time as well. (3) Process-oriented strategy
(2) � is continuously diferentiable on [�, �], is a combination of event-scheduling and activity scanning
(3) � has only initely many critical points in any strategy mentioned above. here is always a distinction
bounded interval, between the continuous time of real world and simulation
time in the simulation environment. Simulation time can be
(4) the one-sided limits lim�→�+ �� (�) and lim�→�− �� (�) established either using discrete time of continuous events
exist in �∗ . �� (�) and �� (�) are deined to be equal or discrete events. In a discrete time simulation system, time
to these limits. variable is increased at the level of Δ� from the point of
� so the last time period is � + Δ�. Changes in states are
Proposition 2. Any reasonable function � : [�, �] → �∗ calculated between [�, � + Δ�] points at the � + Δ� time. In
deined over a bounded interval [�, �] has a inite set of brief, discrete event simulation progress is computed from the
landmark time points, � = �0 < �1 < ⋅ ⋅ ⋅ < �� = �, in its occurrence time of one event until the occurrence time of the
domain, and a inite set of landmark values, �1 < �2 < ⋅ ⋅ ⋅ < �� , next event, in other words, from one state change to the next
in its range. A qualitative variable V and its quantity space state. hat is why discrete event driven simulation is more
�1 < �2 < ⋅ ⋅ ⋅ < �� deine a symbolic language, a inite advantageous due to the fact that simulation model advances
set of meaningful distinctions, for describing the values of a from one state to the another state. During this process,
reasonable function �(�) : [�, �] → �∗ . At any time �, the computations between inactive periods are not performed
qualitative value of �(�) can be deined in terms of its ordinal [5]. State transition which occurs by an event saves the
relationships with the landmarks in its quantity space and its model features the same state till either an internal transition
direction of change. happens or another event receives [6].
In Agent driven Simulation Framework (AdSiF) which
Deinition 3. he qualitative value of �(�), ��(�, �), with is solution based model for the proposed approach, dis-
respect to the quantity space, �1 < �2 < ⋅ ⋅ ⋅ < �� , is the pair crete/continuous simulation approach and continuous event
⟨�mag, �dir⟩, where simulation approach are developed by scheduling a pseudo-
event for each time interval and each time point (Hocaoglu,
{�� , if � (�) = �� , a landmark value, 2005, 2011). It means that execution is succeeded in the
�mag = { same way with discrete event simulation. By the way, the
(� , � ) , if (��) ∈ (�� , ��+1 ) ,
{ � �+1 pseudoevent can be deined as a description of discretization
point on a continuous function trajectory. Mentioned points
{
{ inc, if �� (�) > 0, (1) are candidates for event publishing. Time step � is accepted
{
{
�dir = {std, if �� (�) = 0,
as a dynamic parameter and it changes for each kind of
{
{ simulation models. Every simulation model can deine its
{
{dec, if � (�) < 0.
� own time step according to its time requirement that are
based on ODEs or equation set.
Qualitative reasoning by simulation, in other words, qual- he related works related combination of qualitative
itative simulation is achieved beginning from a time point reasoning with quantitative simulation are commonly studied
and inferring qualitative variable values for the time interval using interval algebra enveloping qualitative state variables
following and continuing so. he inference about qualitative with numerical intervals. First studies in this ield are per-
values of variables at each simulation step is done using the formed by means of a speciic tool given as follows:
rules shown in Table 1. P-Successors rule set deines time (i) Nsim (H. Kay and Kuipers, 1993; Herbert Kay, 1996)
point to time interval transitions and carries out I-Successors (ii) Q2 (B. J. Kuipers and Berleant, 1988)
rule set and vice versa. As an example, P.1, P.2, and P.3 rules
(iii) Q3 (Berleant, 1991)
show a variable value, which is equal to a landmark value
and being stable on that point, it keeps its value and change (iv) SQSIM and MSQUID (Herbert Kay and Ungar,
direction, increases through the next landmark point, and 2000).
decreases through the previous landmark point, respectively, he essential solution is carried out by integrating landmarks
in time interval following that time point. and monotonic functions. Qualitative behaviors created by
4 Modelling and Simulation in Engineering

QSIM perform as a structure in order to represent quali- based on uncertainty of event occurrence time points. he
tative information. hese behaviors serve by marking both uncertainty of the event time is represented in a closed time
landmark values with real intervals and monotonic function interval in �, which is also known as temporal interval [8].
constraints with real functions. he quantitative limits can Because of the uncertain order of events, there would be
be enlarged across constraints in order to derive narrower ties on the future event calendar. If there is a tie, QDEs
limits or in order to realize a contradiction and separate would not assume a tie breaking strategy. Instead, it creates
out the existing behaviors (Benjamin J. Kuipers, 1993). NSim threads that make up all of the possible ordering of ties.
(Numerical Simulator Using Interval Method) is developed hus, the future event calendar in QDEs collects all the
by improving some features of QSIM simulation tool which event notices whose execution order is uncertain and groups
generates a numerical bounding envelope for each parameter them in a set, called the nondeterministically ordered set
in the QSIM model extended with partial quantitative infor- (NOS). Each of these event notices will be executed in
mation. turn and results in a set of threads that will include all of
he concept of qualitative discrete event simulation the possible ordering of event sequences. he capability of
was explored by Ingalls [7–9] who developed a simulation generating all possible scenarios is achieved with the thread
methodology that combines discrete event simulation with generation algorithm. his distinctive characteristic of QDEs
qualitative simulation using temporal interval as simulation of generating all possible ordering of event sequences is
time speciication. Temporal interval allows the user to deine known as coverage [11]. A solution based on event occurrence
time as an interval in the simulation. his means that the probability is developed by [9]. he solution provides a means
current state of the simulation can occur at any time during to tie breaking in qualitative discrete event simulation.
the interval deined by � = [�− , �+ ]. Temporal intervals are As another qualitative discrete simulation tool,
represented by the modeling of their endpoints, assuming, QMTOOL, which is based on QSIM, has been extended
for any interval �, the lesser endpoint is denoted by �− and with object-oriented features. he variables used with the
the greater by �+. important elements in a system or subsystems are input, state,
he approach allows the modelers to express times output, and connection. he connection variable describes
symbolically for both situations when timing of events is how the variables in an element are related. Variables can be
unknown and when timing is known, though this can assigned: an identiier (name), magnitude, sign, maximum,
vary. he time advance values could be expressed as linear and minimum values (operating range) [12].
polynomials such as 1, 2, �, �, 2�, � + �, 2� − � + 9, which must be In the approach proposed here, time advance points
evaluated to nonnegative real numbers [10]. he time advance are determined by event occurrences. Any landmark point
in this approach highly depends on time resolution. he of a system variable and derivation points are taken into
interval given is discretized by minimum time step and each consideration as event occurrences and an event occurrence
step yields a simulation trajectory branch. From this respect, is discovered in the following given cases:
if the interval [�− , �+ ] is spanned by Δ�, it gives the number of
(i) Event occurrences. A time point where a set of
(�+ − �− )/Δ� trajectory branches. It is assumed that there is a
events are received is determined as time point to be
state transition or an event occurrence at related time step.
advanced
QDE and activity-tracking paradigm ofer solutions to
advance simulation time close to discrete event simulation. (ii) Qualitative landmark points. A qualitative landmark
QDE solutions are based on discretizing time step by Δ� point is determined for system variables. Each land-
minimum possible time steps and computing the likelihood mark point represents a meaningful distinction for
for each step and inally generating parallel simulation trajec- the variable. For example, empty and full are two
tories [9]. Activity-tracking paradigm ofers a quantization landmark points for a gas tank. Any value between
approach of change of the parameters in the temporal and two landmark points represents the same qualitative
spatial dimension [5]. meaning such as a value between empty and full
It is known that the symbolic discrete event system uses meaning “there is some gas in the tank.” As shown
the polynomial representation. Since QDEs deine neither earlier, a system variable is given as a pair consisting
any quantitative time based relationships nor numerical of a value and a direction change. Direction change
relationships between qualitative variables, ordinary (quan- is used to determine what landmark point is to be
titative) diferential equations (ODEs) are associated with reached and how much time is necessary
QDEs. Association is achieved by both deining quantitative (iii) Function derivatives. First and second derivatives of
diferential equation of qualitative ones and deining quanti- a function give distinct time points on simulation
tative counterparts of landmark points. In this matching, the trajectory and it is assumed that an event is created at
irst derivation of quantitative equations gives qualitatively related time points. If the irst derivative of a variable
distinct time points and the points are taken into consider- is equal to zero at �� , it is interpreted as the fact that
ation as landmark points. QDEs determine which qualitative the variable reaches a critical point and at the adjacent
variable requires time advance and ODEs determine their time interval [�� , ��+1 ], its direction of change could be
quantitative values. In this respect, the simulation model has inc, dec, or std. If the second derivation of the variable
two equation sets. he irst one is quantitative diferential is negative, the variable changes its change direction
equations and the other one is QDEs, which guide ODEs. to dec ater std. If the irst and the second derivatives
Most studies on qualitative discrete event simulation are are equal to zero and the third derivative is positive or
Modelling and Simulation in Engineering 5

L0 v L1 and truncation error in computations [14]. It is clear that


Distance smaller time step size than necessary yields double precision
error and bigger time step size than necessary yields two
Figure 1: Time step calculation for a variable. important problems. he irst one is truncation error and the
other one is ignoring qualitatively important function points,
such as irst-order derivative, second order derivative, and
qualitatively distinguished points.
negative, the variable keeps its direction as inc or dec, Quantitative time advance is computed under the guid-
respectively. If a function is the derivative between ance of qualitative simulation. To be able to calculate time
value couples deined as [�, �], � and � are deined as advance size, time requirement for each state variable is found
landmark points. and the minimum value is set as time to advance. Qualitative
System variable change directions are driving factors, espe- analysis by discovering state transitions of state variables
cially in value movement between landmark points, leaving using both landmark point transitions and sign algebra gives
or approaching from/to a landmark point. qualitatively distinct points to advance. Quantitative analysis
computes the time advance size to reach these points.
State variables start at time �0 with values and change
4. Managing Simulation by of directions constituting initial state. All values at time �0
Qualitative Reasoning are known as quantitative and qualitative. he qualitative
variable values for time interval [�0 –�1 ] following �0 are
he relationship between QS and quantitative simulation
generated using qualitative simulation (Table 1 rule set).
is examined in [13]. In this paper, it is contended giv-
Filtering applied to the result is computed using rule set given
ing some related issues with time management. While QS
in Table 1. In quantitative simulation, interest is in time points
enhances quantitative simulation by reasoning techniques
and time interval is used to reach the next time point. In
and allowing usage of qualitative characteristics of system
this respect, [�� , ��+1 ] time interval is seen as time step with
variables such as derivative signs and dependencies between
size (��+1 − �� ) to advance time point ��+1 from �� . he ive
variables, quantitative simulation alleviates incompleteness
fundamental rules of time inference depending on value and
and the ambiguity that qualitative models have. Moreover,
change direction of a qualitative variable are given below.
qualitative information enriches quantitative simulation with
deep knowledge that keeps simulation production rules in Time Rule 1. A variable insists keeping its change direction the
structure rather than “if-then” rule sets. same for ininite time unless receiving an event interrupting
Qualitative reasoning in simulation is accommodated time interval or reaching a landmark point.
to manage time and events. QS simulation advances as a
reasoning process from time point to time interval, time Time Rule 2. A received event causes an external transition
interval to time point, and so on. he basic idea of QS is to and it creates a new critical (landmark) point in value set
infer values and change of directions that system variables of related qualitative variable and the time that the event is
take at next time interval and at time point. Qualitative values received is a candidate time point to be advanced.
taken by system variables are landmark values. In this sense,
while QS determines qualitative magnitudes that consist Time Rule 3. A dependent variable time request is determined
of value and change of direction, quantitative simulation by minimum time request of independent variables that it
determines when it happens, in other words, duration to be depends on.
granted.
Time Rule 4. A variable with increased or decreased change
4.1. QR in Time Management. Qualitative reasoning in time direction requests a duration enough to reach irst landmark
management is used to compute the time to be granted to point at its direction path.
pass from one time point to the following spanning time Time Rule 5. A variable with std change direction (stable in
interval between these two time points for a continuous time interval) requires ininite time.
event system. Time step is calculated using variable values
at two adjacent time points, not at time interval deined by Under these general rules, durations necessary to succeed
qualitative transition rules. he main purpose to do this is in qualitative value transitions given in Table 1 are interpreted
to get as big as and as accurate as time step that is enough as follows. Quantitative time advance is determined based
to reach next landmark point depending on variable value on interval to point transitions. he following interpretations
and direction of change. As seen in Figure 1, the variable show why reasoning is done on time intervals and not on
� has a value V that is between landmark � 0 and � 1 and time points. I.1 says a value ⟨�� , std⟩ at [�� , ��+1 ] is kept at time
its change of direction is toward � 1 . We aim to ind a time ��+1 . Because of the fact that it does not change its value, the
step that the variable needs to reach value represented by variable aims to keep its value for ininite time. When a value
landmark � 1 . he change amount on the variable value is increasing in a landmark interval (I.2) reaches landmark
equal to distance = � 1 − �. upper bound of the interval it is in and changes its change
Having an accurate time advance is important for a direction to std at time point following the time interval,
faster simulation execution and minimized round-of error the variable requests a limited duration (computable using
6 Modelling and Simulation in Engineering

quantitative equations) and it changes its change direction (ii) the transition function is applied to the current state
to std because of either an event received or the success of if the condition succeeds. It returns a new qualitative
a condition that disturbs it. Time request in I.3 gives the state, perhaps deined with respect to a new QDE,
same result with I.2 but the change direction of the variable from which simulation can resume.
remains the same because there is no received event and
successful condition. I.4 does not request any time step. A Qualitative time management is done using currently active
system variable that has a value given in I.4 consumes time QDEs. he algorithms and rules developed are generic and
step determined by any other variables. I.5 and I.9 are an valid for all QDEs and there is no domain dependency.
external transition case and it happens if and only if an event
is received or a condition that changes its value succeeds. 4.4. Abstracting Structure from ODE to QDE. To be able
Time step is deined as the time that the event is received. to use qualitative simulation for time management, two
I.6 and I.7 are computed in a similar way with I.2 and I.3, folded models are required: quantitative model (Ordinary
respectively. A dual interpretation of I.4 and I.1 is valid for Diferential Equations (ODE)) and qualitative model (QDEs).
I.8 and I.10, respectively. It is possible to abstract QDE set using ODE set, given
External transition deines state transition forced by that a suitable ODE is decomposed into an equivalent set
an event received. In this case, diferently from internal of simultaneous equations by introducing terms for each
transition in which the simulation model transits its state by subexpression. Abstraction gives a weaker QDE set than
consuming the time assigned to the state it is in, external ODE. “Weaker” means that any behavior that satisies the
transition interrupts the current state at the event received ODE must satisfy the QDE, but not necessarily vice versa.
time without consuming the whole state time. he duration Qualitative reasoning dictates the point qualitatively distinct
consumed is equal to the diference between the event to be reached in mathematical space of system variables.
received time and state entry time. In this sense, qualitative simulation serves what state vector
landmark points are to be reached and quantitative simula-
4.2. QR in Event Handling and Detecting Event Occurrences. tion computes when they are reached.
A continuous system receives and sends events. A received
event may afect change directions of qualitative values and 5. Example: Bathtub Problem
this determines the time point to advance. A qualitative
variable reaching one of its landmark points makes an Bathtub problem is a simple but clear enough step to show
internal state transition and sends events attached to the both quantitative and qualitative simulation procedures and
state. In this sense, QSim representation is extended by event time management and event handling using qualitative rea-
attachments to the landmark points. he rules regarding soning. he system basically has two valves to ill and drain.
receiving an event are summarized below. he qualitative model of problem is given below.

Event Rule 1. A qualitative variable may change its change M + (amount, outlow) amount = netlow ∗ Δ�
direction if and only if the system receives an event interrupt- Add (netlow, outlow, inlow) dinlow/�� = 0
ing it (related rules are I.2, I.5, and I.9). (2)
Deriv (amount, netlow) Transitions
Event Rule 2. A received event determines the time point to Constant (inlow) amount (full, inc) �→ �
advance and causes an external transition.
he rule regarding sending an event is summarized Graphical representation of the system and qualitative equa-
below. tions set are depicted in Figures 2(a) and 2(b), respectively.
Figure 2(c) shows the relation between components. Valve-F
Event Rule 3. First and second derivation time points are and Valve-D have relation with tub named Fills and Drains,
candidate event of creation points. respectively.
�+ represents a monotonic increasing function and it is
Event Rule 4. An event may be created at a landmark point bidirectional function but the causality lows in one direction.
discovered by an external transition. In model representation, higher water amount is correlated
with higher outlow.
4.3. Transitions. QDE and related ODE are deined for a
speciic region. he transitions associated with a QDE deine Add (�, �, �) is equal to � + � = �,
the limits of the region of applicability of the QDE and �� (3)
optionally specify a transition to a new QDE if that limit is Deriv (�, �) : = �.
reached. ��
Transitions section in qualitative model represents model
Deinition 4. A transition is a rule of the form condition → transition. hat means the simulation uses another set of
transition function, where equations representing the system. In this case, ater tran-
(i) the condition is a pattern of the form (⟨variable⟩ sition the pouring amount of water is calculated, amount
(⟨�mag⟩, ⟨�dir⟩)), or a Boolean combination of such of water in the tub is equal to full, and it does not
patterns, change.
Modelling and Simulation in Engineering 7

Table 3: Qualitative behavior trajectory for Case 1.

�0 P-Successors ([�0 , �1 ]) I-Successors (�1 )


Amount ⟨0, ↑⟩ P.4: ⟨(0, full), ↑⟩ I.2: ⟨full, ⟩, I.3: ⟨full, ↑⟩, I.4: ⟨(0, full), ↑⟩, I.5: ⟨�∗ , ⟩
Outlow ⟨0, ↑⟩ P.4: ⟨(0, ∞), ↑⟩ I.2: ⟨∞, ⟩, I.3: ⟨∞, ↑⟩, I.4: ⟨(0, ∞), ↑⟩, I.5: ⟨of, ⟩
Inlow ⟨if, ⟩ P.1: ⟨if, ⟩ I.1: ⟨if, ⟩
Netlow ⟨(0, ∞), ↓⟩ P.7: ⟨(0, ∞), ↓⟩ I.6: ⟨0, ⟩, I.7: ⟨0, ↓⟩, I.8: ⟨(0, ∞), ↓⟩, I.9: ⟨(0, ∞), ⟩

Amount zero and ∞. It does not change during simulation. Qualitative


Inflow
value set for qualitative variables is given below:
Inflow
M+ amount = {0, full, ∞} ,

Outflow inlow = {0, if, ∞} ,


Amount (4)
+ outlow = {0, ∞} ,
netlow = {−∞, 0, ∞} .
Netflow d/dt
Outflow Initial state (�0 ) is seen in Table 3. he only variable that
(a) Tub system (b) Model variable relations is known is inlow and it is equal to if. he other variables
are determined by propagating its value using qualitative
Valve-F Fills equations. Ater completing qualitative variables at �0 , the
prediction of its successor state describing the open interval
[�0 , �1 ] is given in Table 3.
Tub From [�0 , �1 ] interval to �1 point, for amount, the rules I.2,
I.3, I.4, and I.5 are applied (in Table 3 the rules and time point
values for each rule are given for the variable amount, resp.
Drains Valve-D
For I.5 a value �∗ is discovered). It is possible to calculate
a duration for I.2 and I.3 to ind an answer for the question
“How much time is required to reach the full level starting from
(c) Relation the value at �0 ?” he variable amount, which has zero value at
Figure 2: Bathtub problem graphical representation. �0 , reaches full at �1 according to both rules. he quantitative
value change is equal to (full-0) and the duration it takes is
calculated as �amount = (full-0)/netlow. he rule P.7 is the
only rule to be applied for the variable netlow and it gives
he cases given below are not alternative qualitative the same qualitative value for the time interval following �0 .
behaviors of the system being simulated. Rather, they are For the other variables, the rules applied and their qualitative
alternative scenario designs. At each case, qualitative simu- values in the time interval [�0 , �1 ] are given in Table 3.
lation generates total envision (whole alternative behaviors)
of the system being simulated. While each behavior con- he answer to the question at �1 is sought whether or not
sists of current qualitative values, landmarks to be reached, the amount will keep its direction as inc or it will be stable at
and change of direction at time points and time intervals, full value or a value in the interval [0, full]. he answer is given
quantitative simulation calculates the time span to reach by the variables to which the variable amount is connected.
those landmark points if it is possible. his allows us to here are inlow and outlow variables that determine the
advance simulation over qualitative landmark points. A variable netlow. If netlow is greater than zero, then the
landmark point is reached at each simulation step or a change direction of the variable amount is known as increase
landmark point is created at the time point that an event (inc) and if it is equal to zero, its change direction is known
is received and sent by any other simulation components. as std. It is necessary to check if there is an event scheduled
his makes simulation execution faster than stepping by Δ� for �1 to change to inlow or outlow or both of the valves,
time step and calculating a state vector and more accurate so that netlow is equal to zero. If there is no event scheduled
because qualitatively distinct landmark points are calcu- like these (it is given), the solution accepting amount equal
lated directly instead of approaching the values by slicing to ⟨full, while ⟩ is accepted as invalid. Similarly, the value
time. (⟨(0, full), std⟩ or ⟨�∗ , std⟩) represented by I.5 is also not
applicable because of the same reason (no event scheduled
Case 1 (constant low). In this type, inlow variable has a to change inlow and outlow).
constant numeric value and maintains the same qualitative At time �1 , the value of amount equal to full and direction
value. he value is determined as “if” that is placed between of change is inc, and this is a transition condition (amount
8 Modelling and Simulation in Engineering

Table 4: he behaviors at �1 . the amount decreases to zero value. he duration to reach


zero water level is calculated depending on new netlow value.
1 2 3
Simulation execution is completed in two steps. he irst
Amount ⟨full, ↑⟩ ⟨full, ⟩ ⟨(0, full), ⟩ step is determined by the event scheduled and the second step
Outlow ⟨(0, ∞), ↑⟩ ⟨of, ⟩ ⟨of, ⟩ is from the point event received to the point that the variable
Inlow ⟨if, ⟩ ⟨if, ⟩ ⟨if, ⟩ amount reaches its full value or zero level.
Netlow ⟨(0, ∞), ↓⟩ ⟨0, ⟩ ⟨0, ⟩
Case 3 (gradually changing lows). In this case, inlow and
outlow change their values by a function of time (inlow =
(full, inc) → �). If the simulation is terminated, pouring �(Δ�) and outlow = �(Δ�)). It is assumed that an automated
level of water is calculated depending on passing time ater valve controller changes exogenous clearance levels of inlow
reaching the level full and the value of netlow. Simulation valve and outlow valve. It tries to make a valve clearance level
execution requires ininite duration ([�1 , ∞]) until schedul- maximum if it is closed or vice versa if the valve is open.
ing an event. If any event is scheduled to change inlow Clearance levels for inlow and outlow are determined by
and/or outlow level between �0 and �1 , the time advance is a time dependent cos(�)2 function and (cos(�) − sin(�))2 /2
determined as the time that the event is scheduled. Rule I.4 function, respectively. At the initial state �0 , the inlow valve
keeps the variable value interval and change direction for is opened full and outlow valve is closed and qualitative value
�1 the same with [�0 , �1 ] interval. Since it does not give any set of variables is given below.
landmark points, there is no other variable that reached a amount = {0, full, ∞} ,
landmark point in its qualitative value set, and because we
aim to calculate a time step I.4 is accepted as not suitable for inlow = {0, max if} ,
our purpose. he rules I.2 and I.3 give results that suitable to (5)
calculate a time step and both give the same time step and it outlow = {0, max of} ,
netlow = {−max of, 0, max if} .
is a time step necessary to reach the level full from the level
zero. It is possible to ilter out spurious qualitative behaviors
using the qualitative model constraints [1]. he process is he fact that while in Case 1, inlow is set as a constant, in
given in Appendix. Ater iltering qualitative behaviors three Case 2 inlow and outlow valve clearances are changed by
behaviors remain. hese are shown in Table 4. As mentioned time dependent functions, and this is the main diference.
earlier, there is no event scheduled to change inlow or
outlow; behavior (2) and behavior (3) are eliminated. If there Outlow obtains its clearance level to full clearance
is an event scheduled to change lows with a time label smaller (open) by time from closed state. Since each variable has a
than the time step necessary to reach level full, the event time time advance request to reach time �1 , ater [�0 , �1 ] interval
is granted as simulation time. computation, transition from the interval to time point �1
As seen here, qualitative model gives an answer to where is computed using Table 1 as in the earlier cases. At this
time advance is to be searched and quantitative model gives stage, time advance requirements are computed starting by
an answer to how big the time span is. Instead of writing independent variables and they are inlow and outlow.
an “if-then” rule to control whether or not the variable he irst and the second derivations of inlow function
amount reaches its maximum full value to switch to pouring give
model, the control rule, in other words, production rules, is −2 ∗ sin (�) ∗ cos (�) , (6)
presented as structural information.
2 ∗ (sin2 (�) − cos2 (�)) (7)
Case 2 (constant low and low change event scheduled).
Inlow has constant values and it is set to zero at time �� functions. Roots of the irst derivation in [0, 2 ∗ �] are
by changeFlow event. Time interval [�0 , �1 ] is calculated as [0, �/2, �, 3 ∗ �/2, 2 ∗ �] (using (6)). While these points give
in Case 1. If �� is in the interval, time request is determined minimum and maximum clearance for valves, the roots of
as �� ; otherwise it is set as �1 . When tub model receives cos(�)2 function give minimum clearance for valves and these
changeFlow event between �0 and �1 , it calculates the amount are �/2 and 3 ∗ �/2 (using (7)). Transition from initial time
of water illed until the time event is received. �� seems as a �0 to the time point �1 passes through time interval [�0 , �1 ]. As
new landmark point situated between �0 and �1 . he variables seen in Table 3, by applying the rules from rule set at Table 1,
have new values at time �� . he value set at time �� is the the variable values at the interval [�0 , �1 ] are calculated. Inlow
same in previous case at time �1 . he values of inlow and reaches its minimum value at �/2 (one of the roots of the irst
outlow are changed by the event changeFlow. A new value derivative) and at this time point, since the second derivative
for inlow (if ∗ ) and outlow (of ∗ ) is set. he next step is a has a positive value, inlow changes its direction of change
point to interval transition (from �� to [�� , �1 ]). he next value from dec to inc (see (8)).
of amount and the duration required is calculated using new �
inlow� = −2 ∗ sin (�) ∗ cos (�) = 0 �→ � = ,
2
netlow value. If netlow is zero, ininite duration is required
to reach maximum level. If the value is positive it is calculated (8)
2 � 2 �
as before but if it is a negative value (which means outlow is Inlow = 2 ∗ (sin ( ) − cos ( )) = [+] .
��
greater than inlow), because of netlow direction of change, 2 2
Modelling and Simulation in Engineering 9

Table 5: Qualitative behavior trajectories.

�0 P-Successors ([�0 , �1 ]) I-Successors (�1 )


Amount ⟨0, ↑⟩ P.4: ⟨(0, full), ↑⟩ I.2: ⟨full, ⟩, I.3: ⟨full, ↑⟩, I.4: ⟨(0, full), ↑⟩
Outlow ⟨0, ↑⟩ P.4: ⟨(0, max Of), ↑⟩ I.2: ⟨max Of, ⟩, I.3: ⟨max Of, ↑⟩
Inlow ⟨max If, ↓⟩ P.5: ⟨(0, max If), ↓⟩ I.6: ⟨max If, ⟩, I.7: ⟨max If, ↓⟩
Netlow ⟨(0, max If), ↓⟩ P.7: ⟨(0, max If), ↓⟩ I.6: ⟨max Of, ⟩, I.7: ⟨max Of, ↓⟩

Similarly, the calculation for outlow is done. outlow� = Let us assume full is equal to ive (5) and initial value of
sin2 (�) − cos2 (�) = 0 → {�/4, 3 ∗ �/4, 5 ∗ �/4, 7 ∗ �/4}, amount is equal to zero. In this case, there is no real solution
since the closest time point is �/4; the sign of the second for these value sets. It is assumed that the variable amount
derivation at this point is checked. At time points �/4 and requires ininite time. For later simulation execution, amount
5 ∗ �/4, the second derivation of outlow has positive values reaches a value of 4.80. he next step size is calculated by the
(outlow�� = 4∗cos(�)∗sin(�) = 4∗cos(�/4)∗sin(�/4) = [+] amount required to reach the landmark full (it is equal to 5)
and it is [−] for 3 ∗ �/4 and 7 ∗ �/4). Since the second because of the fact that it gives a smaller time step than the
derivative has a positive value, outlow changes its direction time step required by the valve clearances.
of change from dec to inc at time point �/4 ater having We know that any solution for the variable amount is an
a std change of direction. From time zero to �/4, outlow exact value and it is when the amount reaches its full value.
keeps its direction of change as decrease and between �/4 and While there is a possibility of passing the landmark value of
5 ∗ �/4 (the root of outlow function) it changes its direction a system variable, when the slicing time advance mechanism
of change to inc ater std at �/2 because of its positive second is used, in this case, since the time is advanced directly to the
derivative at �. he smallest time step is determined as �1 = landmarks points as stepping stones, it ensures that each time
�/2. Since the amount at time step � (amount� ) is equal to advance calculates the exact value of the system variable at the
amount�−1 + newlow[�−1,�] , its quantitative value is calculated exact time point where it has the value. As seen in Table 5,
using integral value of outlow and inlow for intervals [0, because of the small valve steps, the variable amount may
�/2] and [�/2, 0], respectively (9). he simulation advances have a value between 0 and full (I-Successors I.4). he time
directly to time �/2. Simulation execution continues stepping required for the amount to reach ⟨full, ⟩ or ⟨full, ↑⟩ is the
through qualitatively distinct time points that are landmark time granted to the time step by the variable amount. Until
points and roots of functions and their derivatives. this happens, it is seen as a behavior iltering rule and ⟨full, ⟩
and ⟨full, ↑⟩ are iltered.
�/2
(cos (�) − sin (�)) 2 cos2 (�) + �
outlow = ∫ = Simulation behavior state diagrams covering all cases
0 2 2 given here are seen in Figures 3 and 4. he behavior diagrams
�−2 are developed based on AdSiF. Figure 3 shows the behavior
= , of a valve. As seen in the igure, the event “close” closes the
4 valve and the event “open” opens it. If a valve is closed it stays
�/2
cos (�) sin (�) + � � (9) in closed state for ininite duration and it is interpreted as the
inlow = ∫ cos2 (�) = = ,
0 2 2 same way for the event “open” and state “active.” If a valve is
opened, it starts at maximum open clearance and activates the
amount = amout0 + inlow − outlow behavior Fsa SetClearence at “Out” phase of the state active.
If a valve is for draining, its initial behavior is set as Fsa Close
� �−2 �−2
=0+( − )= . and the clearance is set to zero. he behavior calculates the
2 4 4 next clearance level using (6)–(8) and the duration necessary
In this case, if the value of amount is greater than the to reach the calculated clearance is computed by the function
landmark full, it is thought to be subtracted from the value ValveDuration that is the duration calculator function of the
of amount to calculate the amount of pouring water. But the state Calculate Clearance. It sends an event name setClearence
better way is to determine how much time is necessary to to the tub where the valve is related to the relation known as
reach the landmark full, as seen below. Because, at further Fills or Drains.
iteration of the simulation, the smallest time step may come he tub is in active state for ininite time because
from the variable amount, this is not the case in the approach of its initial behavior Fsa Initial. Depending on quali-
to pass any variable landmark value. tative value of the variable amount, one of the behav-
iors Fsa FullLevelRequest, Fsa TimeToZero, and Fsa StdLevel
full = amout0 + inlow − outlow. (10) is activated because of their activation conditions. Fsa-
If there is no solution, the time step is assumed to be ininite FullLevelRequest is activated if the variable amount has an
(at the beginning of the simulation (at time 0) the amount is increasing direction (activationCond: ⟨val, inc⟩) and acti-
equal to zero). vation of other behaviors is interpreted as similar. At any
time during simulation, there is an active “Request Duration”
cos (�) sin (�) + � cos2 (�) + �
full = 0 + − . (11) state. Anytime the event named setClearence is received,
2 2 the tub activates the behavior Fsa LevelCalculator and it
10 Modelling and Simulation in Engineering

Fsa_Close Fsa_Open Fsa_SetClearance

Activate: In
close open
Open Closed

Calculate clearence
Closed Active Looping
Duration/inf Duration/inf Duration/ValveDuration
Exit/SetClearance

Relation/Fills; Drains
setClearance

Figure 3: Valve behavior diagram.

Fsa_Pouring Fsa_LevelCalculator Fsa_FullLevelRequest


Fsa_Initial
Full setClearance Request Duration
Request Duration
Active CalculatePouring Set Clearance Duration/CalculateDuration4Full
Exit/SetFull
Duration/inf Exit/CalculatePouringAmount Entry/SetClearence
ExtTrans/CalculateLevel
ActivationCond:
Fsa_TimeToZero ⟨val, inc⟩
Fsa_StdLevel
Activate: Out
Fsa_Empty Fsa_Full
Request Duration
Request Duration
Duration/CalculateDuration4ZeroLevel Activate: Out
Duration/inf
Exit/SetEmpty Empty Full
ActivationCon:
ExtTrans/CalculateLevel
⟨val, std⟩ Duration/inf Duration/inf
ActivationCond:
⟨val, dec⟩

Figure 4: Tub behavior diagram.

sets clearance level. Since the behaviors that consist of the as a separate model, and the irst support gets weaker but the
state “Request Duration” that is entry state of the behavior second support is still available.
Fsa LevelCalculator make external transition, they execute
ExTrans/CalculateLevel functions for the duration elapsed to 5.1. Performance Measurement. he example is executed for
calculate the water level in the tub. he state Request Duration ive (5) minutes. For time slicing simulation execution all
at Fsa FullLevelRequest calculates how much time is required state variables are updated at each second. hat means, for
to reach the level full using CalculateDuration4Full (10). If Case 1, simulation takes 300 (5 ∗ 60) steps, if there is no close
it reaches this level, it activates the behavior Fsa Full at the event received during execution. In qualitative calculation
state out phase. Fsa Full stays in Full state for ininite time. case, it takes just one step. In Case 2, time slicing simulation
Similarly, the state same state at Fsa TimeToZero calculates
approach takes 300 steps plus number of low change events.
the duration necessary to reach landmark level zero. If the tub
In qualitative calculation case, number of simulation steps is
is in full state and it receives setClearence event, it activates
Fsa Pouring. State full calculates the pouring water amount equal to two times the number of low change events.
up to the event received time. he most complex situation is seen in Case 3. Qualitative
It is seen that the qualitative model supports a quantitative landmark points are discretized by the values of inlow and
discrete model in two ways: (1) the qualitative model guides outlow function roots and of their derivative roots. he
quantitative model to ind which variable gives time advance roots are [0, �/2, �, 3 ∗ �/2] for inlow and [�/4, 3 ∗ �/4,
and (2) the landmark points work as structural rules, and 5 ∗ �/4, 7 ∗ �/4] for outlow. Each root value is taken
derivation points work as an inner event creation mechanism into consideration as a discrete time point in a continuous
for managing execution low. If the whole system is modeled universe. During simulation execution, in ive minutes, we
as a single entity, the irst support gets more prominent. In the have eight discrete time points in total (4 from inlow and
other cases, it is shown here that each component is modeled 4 from outlow) because of the discretized movements of the
Modelling and Simulation in Engineering 11

valves. At each step, the system reaches one landmark point state variables. In the approach, looking at discrete event
and this makes eight steps. In qualitative calculation phase, a occurrences on continuous state variable trajectories, this is
qualitative inference overhead is added to processing efort; it taken into consideration as rare event simulation [16, 17].
takes approximately 0.001 seconds. Processing efort for time he threshold values deined in rare event simulation are
slicing is directly related to simulation duration. In the second seen as landmark point intervals and time interval placed on
case, simulation time efort depends on both simulation time qualitative simulation trajectories.
and number of events processed. In the third case, the efort is he approach provides not only faster simulation exe-
calculated in a similar way. But none of the cases in qualitative cutions but also allows more accurate computations. Since
calculation and simulation execution efort does not depend simulation advances directly to qualitatively meaningful dis-
on simulation execution duration. crete time points computed on a continuous state variable
trajectory, the approach alleviates errors that come from
6. Discussions truncation and round-of. In other words, each simulation
step is as wide as simulation model needed rather than
Combining qualitative and quantitative information for sim- centrally granted time step. Because time step intervals are
ulation based analysis gives several advantages. In addition computed by both taking algebraic characteristics of function
to the advantages to cope with the problem in qualitative sign and qualitative value and function sets with change
analysis such as data size to be analyzed, variety of data type, directions into consideration, this gives an opportunity to
and hardness in generalizing qualitative analysis to particular advance time points mathematically and qualitatively, in
cases, [15], in this study, how qualitative reasoning provides this sense, linguistically reasonable function points during
a fast and accurate simulation execution providing time simulation execution without missing any important point
step mechanism via qualitative meaning of the mathematical and unnecessarily computing qualitatively the same adjacent
properties and qualitative information known prior to dis- time points. his makes simulation execution associated with
crete event simulation is shown. he simulation is advanced, model mathematical properties by making it independent
instead of iterating simulation time for a predeined time from model parameters. For example, let us take a moving
step and checking whether or not there is any activity in entity from point A to point B with a constant velocity � into
the interval, directly to the time points that are qualitatively consideration. he execution duration of this example case
diferent. using time slicing execution depends on velocity of the entity
As seen from the literature, qualitative discrete event and size of simulation step size. It is also known that the bigger
simulation studies are mostly focused on alleviating vague- the step size (than necessary), the bigger the Fourier error
ness on qualitative model and variables by enhancing them and the smaller the step size, the bigger the double precision
using quantitative information such as quantitative intervals. error [14]. But the approach proposed is independent from
Unlike other approaches, the approach presented here is simulation parameters, since it uses model mathematical
based on qualitative reasoning and it is used to guide quan- properties; the execution takes a known number of steps and
titative discrete event simulation determining qualitatively calculates the exact time points to advance. he approach
(common sense) meaningful time points. assumes to use integration methods to solve model equations
In the approach given here, qualitative simulation is instead of numerical methods. If it is necessary to use
achieved as a parallel processes, it is executed and its iltering numerical method each simulation entity consumes a wide
rules are applied, and whole process is followed. By this time step that is calculated using landmark points and/or
way, total envision (all possible behaviors), in other words, derivation time point presented in the approach by dividing
qualitative behavior trajectories, is got. All these behaviors into the smaller steps. he time saving opportunity allows
serve quantitative simulation to ind which qualitatively modelers to change diferential equation solution technique
distinct point is to be reached for each qualitative variable and from numerical methods to integration methods that give
using this information quantitative simulation calculates how more accurate result but need more computational efort.
long it takes. his ensures simulation execution is done by Since simulation time advances directly to the qualita-
stepping on qualitatively meaningful time points, instead of tively distinguished time points, the concept of time is taken
advancing a continuous simulation step by step and checking into consideration as 4th dimension in the space. his is
the rule set (e.g., if tub is burst or not and checking clearance explained by space time (relativity). In contrast with this,
of valves). he study aims to provide a higher order rule slicing time advance mechanism is basically Euclidian time
set depending on mathematical properties of the system deinition. here is a time axis that is continuously advancing,
and qualitative model, not depending on domain speciic the system variables are calculated for each time step, and for
information. each time step there is an activity scanning phase to discover
he proposed approach maps continuous event simula- whether or not there are any events to be processed.
tion into discrete event simulation by discovering qualita- he approach also provides some important advantages
tively distinct time points both in sign algebra (sign of deriva- for tracing simulation records. Jumping directly to qualita-
tives) and in qualitative value set consisting of landmark tively distinct time points on a continuous contour instead of
points of state variables. Discovered time points are inter- transverse function point (as seen in Table 5) and stepwise
preted as event points created by continuous state variables. qualitative computation of the same functional values (not
For a hybrid system, the approach poses events arising from in quantitative manner) at each time step gives less record
discrete part of the system onto trajectories of continuous points for each variable to be recorded. he property makes
12 Modelling and Simulation in Engineering

Table 6: Filtering behaviors using �+ (amount, outlow) and Add (netlow, outlow, inlow).

Amount Netlow
Outlow
⟨full, ↑⟩ ⟨full, ⟩ ⟨(0, full), ↑⟩ ⟨�∗ , ⟩ ⟨0, ↓⟩ ⟨0, ⟩ ⟨(0, ∞), ↓⟩ ⟨of, ⟩
⟨∞, ↑⟩ R2 R1 R2 R1 R4 R3 R4 R3
⟨∞, ⟩ R1 R2 R1 R2 R3 R4 R3 R4
⟨(0, ∞), ↑⟩ B1 R1 B4 R1 R3 R3
⟨of, ⟩ R1 B2 R1 B3 R3 R3
R1: [�(amount)/��] = [�(outlow)/��]; R2: if outlow has inf value then amount must have inf value; R3: [�(netlow)/��] + [�(outlow)/��] = [�(inlow)/��];
R4: ∞ + inite = ∞; R5: [�(amount)/��] = [netlow].

Table 7: Filtering behaviors using Deriv (amount, netlow). used are given as R1, R2, R3, R4, and R5. he main aim is to
ilter out the invalid alternative qualitative values following
Netlow
Amount the value at [�0 , �1 ]. Ater qualitative ilter, we just have three
⟨full, ↑⟩ ⟨full, ⟩ ⟨(0, full), ↑⟩ ⟨�∗ , ⟩ valid behaviors. hese are given as B1, B2, B3, and B4. Because
⟨0, ↓⟩ R5 B4 is the same behavior at [�0 , �1 ], it is eliminated.
⟨0, ⟩ R5 B2 R5 B3
⟨(0, ∞), ↓⟩ B1 R5 B4 R5 Conflicts of Interest
⟨of, ⟩ R5 R5
R1: [�(amount)/��] = [�(outlow)/��]; R2: if outlow has inf value then he author declares that they have no conlicts of interest.
amount must have inf value; R3: [�(netlow)/��] + [�(outlow)/��] =
[�(inlow)/��]; R4: ∞ + inite = ∞; R5: [�(amount)/��] = [netlow].
References
⟨@ OFF, ϴ⟩ [1] B. Kuipers, “Qualitative simulation,” Artiicial Intelligence, vol.
29, no. 3, pp. 289–338, 1986.
⟨(0, @ OFF), ↑⟩ [2] B. Kuipers, Qualitative Reasoning: Modeling and Simulation with
⟨0, ↑⟩ ⟨(0, @ OFF), ↑⟩ Incomplete Knowledge, MIT Press, New York, NY, YSA, 1994.
⟨@ OFF, ↑⟩
[3] J. De Kleer and J. S. Brown, “A qualitative physics based on
conluences,” Artiicial Intelligence, vol. 24, no. 1-3, pp. 7–83,
1984.
⟨f∗ , ϴ⟩ [4] K. D. Forbus, “Qualitative process theory,” Artiicial Intelligence,
vol. 24, no. 1-3, pp. 85–168, 1984.
Figure 5: Behavior trajectory for the variable amount.
[5] A. Muzy, R. Jammalamadaka, B. P. Zeigler, and J. J. Nutaro,
“he Activity-tracking paradigm in discrete-event modeling
and simulation: he case of spatially continuous distributed
it unable to record the necessary time points and obtain systems,” Simulation: Transactions of the Society for Modeling
qualitative records of the same values. In a constant time and Simulation International, vol. 5, no. 87, pp. 449–464, 2010.
step simulation, it is possible to miss qualitative meaningful [6] F. M. Hocaoğlu, Agent Based Simulation: Lecturer Notes, Istan-
time points. In quantitative function sign algebra based bul University, Istanbul, Turkey, 2014.
analysis, for the variable, deining the function time advance [7] R. Ingalls, D. Morrice, and A. Whinston, “Interval time clock
request is computed depending on the irst function and implementation for qualitative event graphs,” in Proceedings of
the second derivation solution points. Bringing simulation the Winter Simulation Conference, pp. 574–580, Lake Buena
steps together with common-sense reasoning is another Vista, FL, USA, 1999.
important property provided by the approach. Because at [8] Y. Leow-Sehwail and R. Ingalls, “Qualitative Discrete Event
each simulation step a qualitatively meaningful system state Simulation,” in Proceedings of the Winter Simulation Conference,
pp. 648–653, Orlando, FL, USA, 2005.
is reached, the execution trajectory gives a concise, close to
human reasoning, and meaningful result. [9] Y. Leow-Sehwail and R. G. Ingalls, “Estimating the probability
of an event execution in Qualitative Discrete Event Simulation,”
in Proceedings of the 2010 Winter Simulation Conference - (WSC
Appendix 2010), pp. 1133–1144, Baltimore, MD, USA, December 2010.
[10] B. Zeigler and S. Chi, “Symbolic discrete event system speciica-
Filtering Spurious Behaviors tion,” IEEE Transactions on Systems, Man, and Cybernetics, vol.
6, no. 22, pp. 1428–1443, 1992.
From �0 to �1 , the behavior trajectory for amount is given [11] R. G. Ingalls, D. J. Morrice, and A. B. Whinston, “he imple-
in Figure 5. he same representation can be envisioned for mentation of temporal intervals in qualitative simulation
the rest of the variables. Filtering spurious behaviors that graphs,” ACM Transactions on Modeling and Computer Simu-
violate model constraints is achieved by using mathematical lation, vol. 10, no. 3, pp. 215–240, 2000.
properties of the model constraints for the time point �1 and [12] G. Garani and G. K. Adam, “Qualitative Modelling of Manu-
this is shown in Tables 6 and 7. he mathematical properties facturing Machinery,” in Proceedings of the IECON 2006 - 32nd
Modelling and Simulation in Engineering 13

Annual Conference on IEEE Industrial Electronics, pp. 3591–


3596, Paris, France, November 2006.
[13] F. M. Hocaoğlu, “A Comparison between Qualitative Simulation
and Traditional Simulation?: Bridging the Conceptual Gap,” in
AI, Simulation Planning in High Autonomy Systems-AIS2002,
Lisbon, Portugal, 2002.
[14] D. J. Murray-Smith, Continuous System Simulation, University
of Glasgow, Glasgow, UK, 1995.
[15] T. Eldabi, Z. Irani, R. J. Paul, and P. E. Love, “Quantitative and
qualitative decision-making methods in simulation modelling,”
Management Decision, vol. 40, no. 1, pp. 64–73, 2002.
[16] J. Bucklew, Introduction to Rare Event Simulation, Springer, S.
University of Wisconsin, Madison, Wis, USA, 2004.
[17] J. Nutaro, P. T. Kuruganti, V. Protopopescu, and M. Shankar,
“he split system approach to managing time in simulations of
hybrid systems having continuous and discrete event compo-
nents,” Simulation: Transactions of the Society for Modeling and
Simulation International, vol. 3, no. 88, pp. 281–298, 2011.
International Journal of

Rotating
Machinery

International Journal of
The Scientiic
(QJLQHHULQJ Distributed
Journal of
Journal of

Hindawi Publishing Corporation


World Journal
Hindawi Publishing Corporation Hindawi Publishing Corporation
Sensors
Hindawi Publishing Corporation
Sensor Networks
Hindawi Publishing Corporation
http://www.hindawi.com Volume 201 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

Journal of

Control Science
and Engineering

Advances in
Civil Engineering
Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

Submit your manuscripts at


https://www.hindawi.com

Journal of
Journal of Electrical and Computer
Robotics
Hindawi Publishing Corporation
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

VLSI Design
Advances in
OptoElectronics
,QWHUQDWLRQDO-RXUQDORI

International Journal of
Modelling &
Simulation
$HURVSDFH
Hindawi Publishing Corporation Volume 2014
Navigation and
Observation
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
in Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
(QJLQHHULQJ
+LQGDZL3XEOLVKLQJ&RUSRUDWLRQ
KWWSZZZKLQGDZLFRP 9ROXPH
Hindawi Publishing Corporation
http://www.hindawi.com
http://www.hindawi.com Volume 201-

International Journal of
International Journal of Antennas and Active and Passive Advances in
Chemical Engineering Propagation Electronic Components Shock and Vibration Acoustics and Vibration
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014

You might also like