Group Title: Department of Computer and Information Science and Engineering Technical Reports
Title: OOPM/RT : a multimodeling methodology for real-time simulation
CITATION PDF VIEWER THUMBNAILS PAGE IMAGE ZOOMABLE
Full Citation
STANDARD VIEW MARC VIEW
Permanent Link: http://ufdc.ufl.edu/UF00095423/00001
 Material Information
Title: OOPM/RT : a multimodeling methodology for real-time simulation
Series Title: Department of Computer and Information Science and Engineering Technical Reports
Physical Description: Book
Language: English
Creator: Lee, Kangsun
Fishwick, Paul A.
Affiliation: University of Florida
University of Florida
Publisher: Department of Computer and Information Sciences, University of Florida
Place of Publication: Gainesville, Fla.
Copyright Date: 1998
 Record Information
Bibliographic ID: UF00095423
Volume ID: VID00001
Source Institution: University of Florida
Holding Location: University of Florida
Rights Management: All rights reserved by the source institution and holding location.

Downloads

This item has the following downloads:

1998276 ( PDF )


Full Text











OOPM/RT: A Multimodeling Methodology for

Real-Time Simulation


Kangsun Lee
University of Florida
and
Paul A. Fishwick
University of Florida



When we build a model of real-time systems, we need ways of representing the knowledge about
the system and also time requirements for simulating the model. Considering these different
needs, our question is "How to determine the optimal model that simulates the system by a
given deadline while still producing valid outputs at an acceptable level of detail?" We have de-
signed OOPM/RT(( ,i.,.. 1 Oriented Physical I .il;....1.1. i F.. Real-Time Simulation) methodol-
ogy. OOPM/RT framework has three phases: 1) Generation of multimodels in OOPM using both
structural and behavioral abstraction techniques, 2) Generation of AT (Abstraction Tree) which
organizes the multimodels based on the abstraction relationship to facilitate the optimal model
selection process, and 3) Selection of the optimal model which guarantees to deliver simulation re-
sults by the given amount of time. A more detailed model (low abstraction model) is selected when
we have enough time to simulate, while a less detailed model (high abstraction model) is selected
when the deadline is immediate. The basic idea of selection is to trade structural information for
a faster runtime while minimizing the loss of behavioral information. We propose two possible
approaches for the selection: integer programming based-approach and search-based approach.
By systematically ..... ii;.. simulation deadlines while minimizing the modeler's interventions,
OOPM/RT provides an efficient :.-..I. i i; environment for real-time systems.

Categories and Subject Descriptors: 1.6.5 [Simulation and Modeling]: Model Development
General Terms: I- .... i;1-- Methodology, Real-Time Simulation
Additional Key Words and Phrases: Model Abstraction, Model Selection, Real-Time Systems




1. INTRODUCTION
Real-time .o '.... refer to -- -I. i- that have hard real-time requirements for inter-
acting with a human operator or other agents with similar time-scales. An Ith 1. !I
simulation of real-time -. I I requires a model that is accurate enough to accom-
plish the simulation objective and is computationally I!. 1. I' [Garvey and Lesser
1993b; Garvey and Lesser 1993a; Lee and 1 !-Il- i. !: 1998]. We define model ac-

Address: CISE P.O. Box 116120, University of Florida, FL 32611-6120

This work is supported by (1) GRCI (Incorporated 1812-96-20 (Gregg Liming) and Rome Labora-
tory (Steve Farr, Al Sisti) for web-based simulation and ..... ii ...i. i i;. (2) NASA/Jet Propulsion
Laboratory 961427 (John Peterson and Bill I- IT.., ii;,' for web-based :.....I. i;... of I.... .i
and mission design, and (3) Department of the Interior under ATLSS Project contract 14-45-
0009-1544-154 (Don D( '.-,. i University of Miami) for techniques for both code and model
integration for the across-trophic-level Everglades ecosystem.












2 K. Lee and P.A. Fishwick


(., ., in terms of the ability of a model to capture the -- -. i,, at a right level
of detail and to achieve the simulation objective within an allowable error bound.
Computational. !, t. i. involves the satisfaction of the real-time requirements to
simulate the -1. i, in addition to the. -!, i. t i of model computation. In exist-
ing applications, it is a user's responsibility to construct the model appropriate for
the simulation task. This is a .1h 11i [LII error-prone, and time-consuming ;~,11 i
requiring skilled and experienced engineers.
Most CASE tools [Digital 1989] try to help the modeling process by providing an
extensive library of functions, which allow a modeler to specify numerous aspects
of an application's architecture. These tools deal with static models suitable for
producing design documents, with limited facilities for simulating the models, ana-
lyzing the results of such simulations, running what-if questions, or translating the
paper models to prototype code. However, these tools do not provide support for
-I",. i f- the real-time constraints of an application's functions [Lark, J. S., Lee
D. Erman, M,. pli !, .- Forrest and Kim P. Gostelow 1990; Burns, A. and Wellings,
A. J. 1994].
Our objective is to present a modeling ,ii. -!,l,'1l_-- with which the real-time
-1. i- can be modeled h II !II to meet the given simulation objective and time
requirements.
One of the contributions of our research is that, with the ability to select an
optimal model for a given deadline, we provide a semi-automatic method to handle
real-time constraints for a simulation. In particular, we handle a time constraint
out of the modeling processes; therefore, modelers are relieved from considering
constraints that are not supposed to be part of modeling. Another contribution
is that by generating a set of multiple methods through abstraction techniques
and selecting the optimal abstraction degree to compose a model for the real-time
simulation, we meet not only the real-time constraints, but also the perspective
which modelers see the -- -. i, for a given time-constraint situation. We expect
that the proposed method can provide better sources of multiple methods for real-
time computing groups.
This paper is organized as follows : In Section 2, we discuss several related
research activities. We propose the OOPM/RT modeling framework in Section 3.
In Section 4, we present our abstraction ii,. 1L.-.. .1. .- to generate a set of models
for a -. i i, at .!it.l i. i I levels of detail. In Section 5, we show how to organize the
models in a way that facilitates the selection process. Two optimal model selection
algorithms are presented in Section 6. A complete process from model generation
to the selection of the optimal abstraction level is illustrated in Section 7 through
an example. We conclude in Section 8.

2. MODELING OF REAL-TIME SYSTEMS
Real-time - I i i- l!!. i from traditional data processing -- -*. in- in that they are
constrained by certain non-functional requirements (e.g., dependability and tim-
ing). Although real-time -.i i can be modeled using the standard structured
design methods, these methods lack explicit support for expressing the real-time
constraints [Kopetz, H., Zainlinger, R., Fohler, G., Kantz, H., Puschner, P. and
Schutz, W. 1991; Lark, J. S., Lee D. Erman, ,. pI, ,i, Forrest and Kim P. Gostelow
1990; Burns, A. and Wellings, A. J. 1994]. '1 ',,[ ,,[ structured design methods












A Modeling Framework for Real-Time Systems 3


incorporate a life cycle model in which the following activities are recognized:
(1) Requirements Definition an authoritative specification of the -I. i ', required
functional and non-functional behavior is produced.
(2) Architectural Design a top-level description of the proposed -1 11, is devel-
oped.
(3) Detailed Design the complete -1. 11, design is specified.
(4) Coding the -1. is implemented.
(5) Testing the. ti of the -1. !1i is tested.
For hard real-time -1. this has the significant disadvantage that timing prob-
lems will be recognized only during testing, or worst after .1 1!1..- !i. ii! [Burns, A.
and Wellings, A. J. 1994]. Researchers have pointed out that the time requirements
should be addressed in the design phase [Burns, A. and Wellings, A. J. 1994; Lark,
J. S., Lee D. Erman, "i. pI !i,. Forrest and Kim P. Gostelow 1990].
Two activities of the architectural design are defined [Burns, A. and Wellings,
A. J. 1994]: 1) the logical architecture design activity, and 2) the /, 1..,' l archi-
tecture design activity. The logical architecture embodies commitments that can
be made '../. P.. ./. i,"i, of the constraints imposed by the execution environment,
and is primarily aimed at ,iJ-f ;!h- the functional requirements. The 11!i -1, ,1 ar-
chitecture takes these functional requirements and other constraints into account,
and embraces the .....--f.I. '..., I requirements. The '1. -;1 1 architecture forms the
basis for asserting that the application's non-functional requirements will be met
once the detailed design and implementation have taken place. The i'1! -;' 1 archi-
tecture design activity addresses timing (e.g. responsiveness, orderliness, temporal
predictability and temporal controllability) and dependability requirements (e.g.,
,1 l. li- ,- r I and security), and the necessary schedulability i 1-i -- that will
ensure that the I -1. 11 once built will function correctly in both the value and time
domains. Appropriate scheduling paradigms are often integrated to handle non-
functional requirements [Burns, A. and Wellings, A. J. 1994]. The following issues
arise :
-How to capture the logical aspects of the real-time -- -i. i-"
-How to assess duration and ,i1 l associated with each model?
-How to resolve timing constraints?
-How to support both logical and i'1! -1; 1 activities under one modeling and sim-
ulation framework so that the resulting model is guaranteed to function correctly
in both the value and time domains?
Several areas of research relate to these issues. Real-time scheduling focuses on
how to deal with the 11! -1 i,1 requirements of the -- -I. i The main interest is to
determine a schedule that defines when to execute what task to meet a deadline.
Typical approaches to real-time scheduling assume that task priorities and resource
needs are completely known in advance and are unrelated to those of other tasks, so
that a control component can schedule tasks based on their individual characteris-
tics. If more tasks exist than the -1. 1i can process, the decision about which tasks
to ignore is simple and local, usually based only on task priority [Ramamritham,
K. and 1i ,I:..- i. J. A. 1984; 1 i I:.,- J. A., Ramamritham, K. and ('I !- S.












4 K. Lee and P.A. Fishwick


I' ,-] Our claim is that the resulting schedule of tasks does not reflect the real
objective of the simulation when the selection is made based solely on task priority.
Real-Time Artificial Intelligence studies problem-solving methods that ",. ii a
time bound, dynamically construct and execute a problem solving procedure which
will (probably) produce a reasonable answer within (approximately) the time avail-
able." [D'Ambrosio, B. 1989] Examples of this -I '- are found in chess programs.
Virtually all performance chess programs in existence f -l- use full-width, fixed-
depth, alpha-beta minimax search with node ordering, quiescence, and iterative-
deepening for the real time problem solving. They make very high !,iL ,1i- move
decisions under real-time constraints by properly controlling the depth of search
(or move) and having a good heuristic function that guides the search (or move).
Research on the real-time problem solving through search methods can be found in
Refs. [Korf 1990; Barr and Feigenbaum 1981].
The key to these approaches is to have single problem solving method that
achieves a better result as the method is given more time. One of the problems is
that these approaches rely on the existence of iterative refinement algorithms that
produce incrementally improving solutions as they are given increasing amounts of
runtime. ('I. ,! I, such algorithms exist for some problem cases, but also there are
problems that will be t, I ,, L[i to solve in an incremental fashion [Garvey and Lesser
1993b; Garvey and Lesser 1993a]. An alternative to this approach is to have multi-
ple methods to model the -- -I. i, which make tradeoffs in cost versus ,L ,1 i- and
i!! have different performance characteristics in different environment situations.
Garvey and Lesser proposed the Design-to- I !. [Garvey and Lesser 1993a; Garvey
and Lesser !'' i'.] method, which is related to our approach. Design-to-time assumes
that one has multiple methods for the given tasks and tries to find a solution to
a problem that uses all available resources to maximize solution 1, i1 i- within
the available time. They present an algorithm for finding optimal solutions to a
real-time problem under task tree graph and task relationships [Garvey and Lesser
' i',.] The algorithm generates all sets of methods that can solve the problem and
prunes those superseded by other sets of methods that generate greater or equal
,l!i Il11- in equal or less time. Design-to-time has a single model I I"- and multiple
methods are generated through approximation techniques; therefore, it concerns
only the behavioral aspects of the -- -. i, In order to model a complex -1. 1i it's
better to have [l!! i! i> model I- i to ItI. ii,1 characterize the 1!!! ii I aspects
of the complex - -1. i

3. OOPM/RT : A MODELING METHODOLOGY FOR REAL-TIME SIMULATION
We have built OOPM/RT(Object-Oriented P1! -i' ,1 Multimodeling for Real-Time
Simulation) for aiding the user to meet arbitrary time and !it li I constraints im-
posed upon the simulation. OOPM/RT adopts a Ii1i1 .-,'i1!. of rigorous engineer-
ing design, an approach which requires the -1. I model to guarantee the -1. i'
timeliness at design time [Lark, J. S., Lee D. Erman, M,. pl iii,.. Forrest and Kim
P. Gostelow 1990]. OOPM/RT uses OOPM for the logical architecture design
,1i i- OOPM is an implementation of OOPM (Object-Oriented P1! -1. i1 Multi-
!. ,,. 1 i! _I [i -!;- I. !: 1997], an approach to modeling and simulation which promises
not only to tightly couple a model's human author into the evolving modeling and
simulation process through an intuitive HCI (Human Computer Interface), but also
















A Modeling Framework for Real-Time Systems 5


Model Author




HCI

Modeler

Structural Behavioral Scenario
Abstracter Abstracter


LIBRARY



MMR,MOS,Abstraction Library
I-----------------------

Back End
r---- ------------ I - - - - - -


Structural Behavioral
Model Model Engine
Translator Translator


-------------------------- t-------------------------.




:------------------------------- '-------------------------------
Decision Supporting Tool


Duration/ Abstraction Optimal Optimal
Quality ree Abstraction Model
Tree Level
Estimator Builder Selecter Composer





Fig. 1. OOPM/RT : OOPM is used for the logical architecture design activity. The Decision
Supporting Tool is integrated to handle the physical architecture design activity. The three
components of OOPM (HCI, Library, and Back End) are shown as boxes with dashed lines. Parts
within each component are shown outlined with solid boxes: HCI (Human Computer Interface)
appears within Modeler and Scenario; Back End appears within Translator and Engine; Library
appears within MMR (OOPM Model Repository) and MOS (OOPM (li.d.. I Store). Principal
interactions are shown with arrows. The model author interacts with both parts of the HCI. The
Decision supporting tool interacts with OOPM being hidden from a model author












6 K. Lee and P.A. Fishwick


to help a model author to perform ,ii~ or all of the following objectives [Cubert
and I i-l!;- !1: 1997]:

-to think clearly about, to better understand, or to elucidate a model
-to participate in a collaborative modeling effort
-to repeatedly and painlessly refine a model with heterogeneous model I" as
required, in order to achieve adequate fi 1. I- at minimal development cost
-to painlessly build large models out of existing working smaller models
-to start from a conceptual model which is intuitively clear to domain experts,
and to unambiguously and automatically convert this to a simulation program
-to create or change a simulation program without being a programmer
-to perform simulation model execution and to present simulation results in a
meaningful way so as to facilitate the prior objectives

By using OOPM for the sources of creating methods, we can model a -- -I 11,
. Iti. ii with different model I- !" together under one structure. For time-critical
i-, ,- we 11i prefer models that produce less accurate results within an allowable
time, over models that produce more accurate results If,. .. a given deadline. The
key to our method is to use an abstraction technique as a way of handling real-time
constraints given to the -1, i We generate a set of methods for the -1 i, at
different levels of abstraction through a model abstraction ii,. 1I 1. .1. -. When the
constructed model cannot be executed for a different simulation condition, such as
a tighter deadline, we change the abstraction degree of the model to deliver the
simulation results by the given amount of time. The decision supporting tool is
added to OOPM in order to take these constraints into account and determine the
optimal abstraction degree for a given simulation deadline. Based on the determined
abstraction degree, the optimal model is composed. The decision process is placed
out of the modeling process, therefore modelers are relieved from considering time
constraints that are not supposed to be part of modeling. The OOPM/RT structure
is shown in I ,Iii 1.
OOPM/RT is useful in the problem domain where

-Sacrificing solution [!,L l1 I can be tolerated so that the -l, i,- can be mod-
eled by multiple solution methods that produce tradeoffs in solution !L ,i Ml- and
execution time
-Duration and !Ili l- associated with a method is fairly predictable

Our method has three phases :

(1) Generating a set of models at different abstraction levels.
(2) Arranging a set of models under the abstraction relationship and assessing the
'! i l- /cost for each model
(3) Executing model selection algorithms to find the optimal model for a given
deadline

In the first phase, a set of methods is generated at a different degree of detail us-
ing an abstraction in. I 1. .1.. -. The second phase is to assess the expected !ii L Ili
and runtime of each method and organizes a set of methods in a way to facilitate












A Modeling Framework for Real-Time Systems 7


the selection process. Related research has been done for the estimation of run-
time/. !iI 11i- [. !i. 1 G. Harmon and Walley 1994; Horst F. Wedde and Huizinga
1994; Rutledge !I'i'.] Our focus is not to propose a new estimation method. In-
stead, we assume that the execution time of each method is proposely measured by
the available methods. In the third phase, we select an optimal model among the
alternatives when the constructed model cannot be executed for a given amount of
time. The selection is made by deciding the optimal abstraction level to simulate
the -- -I. i, within a given amount of time. A more detailed model (low abstrac-
tion level) is selected when we have enough time, while a less detailed model (high
abstraction level) is used when there is an imminent time constraint.

4. MODEL GENERATION
We generate a set of methods for the -I. i by using model abstraction tech-
niques. Model abstraction is a method (-i! !li~. i, transformation) that derives a
"-!!li .1. model from a more complex model while maintaining the validity (con-
sistency within some standard of comparison) of the simulation results with respect
to the behaviors exhibited by the simpler model. The simpler model reduces the
' .i 1.1. '.i as well as the ., il l,- of the model's behavior [Caughlin and Sisti 1997].
The proper use of abstraction provides computational savings as long as the valid-
ity of the simulation results is guaranteed. Our approach is to use the abstraction
method when we need to reduce the simulation time to deliver the simulation results
by a given deadline. A set of models are generated through abstraction techniques
with .t l. i. iii degrees of abstraction; each model simulates the -- -I. i- within a
different amount of time, while describing the -- -I. with a .t It i. iiI perspective.
Therefore, a model that is selected for a given real-time simulation is useful not
just because it meets a given deadline, but also because it suggests a perspective
with which modelers view the -- -1. i for a given time-constraint situation.
We have studied abstraction techniques available in 11i i- disciplines and created
an unified taxonomy for model abstraction where the techniques are structured with
the ,Lii l. !1- i characterization of a general approach [Lee and I i -!!;- !1: 1996; Lee
and I i -!i- i! : 1997a]. Our premise is that there are two .t h!I i. !i approaches to
model abstraction: structural and behavioral. S, .,, ~., .,, abstraction is the process
of abstracting a -- -1 11, in terms of the structure using refinement and homomor-
phism [Zeigler 1976; Zeigler 1990]. SI i I, i I abstraction provides a well-organized
abstraction hierarchy on the -- -I. i, while behavioral abstraction focuses only on
behavioral aspects of the -- -I. i without structural preservation. We organize the
S-1. i hierarchically through the structural abstraction phase and construct an
abstraction hierarchy with simple model 1- 1" first, refining them with more com-
plex model I- i" later. Our structural abstraction provides a way of structuring
different model i" together under one framework so that each I- i"'- performs
its part, and the behavior is preserved as levels are mapped I i -!-. !: 1'' II] The
resulting structure becomes a base model which has the highest resolution to model
the -1. ii, The problem is that selecting one -I. 11i component from an abstrac-
tion level is dependent on the next lowest level due to the hierarchical structure.
Each component cannot be executed at a random abstraction level, though it can
be viewed independently. Behavioral abstraction is used when we want to simulate
the base model at a random abstraction level. We isolate an abstraction level by












8 K. Lee and P.A. Fishwick


approximating the lower levels behavior and replacing them with a behavioral ab-
straction method. The method discards structural information of the lower levels,
but the behavioral information is preserved in some level of f1l. li- Possible tech-
niques for behavioral abstraction are -I. 11, identification, neural networks, and
wavelets ., ,-I. 1' ',] Since our method involves less computation time by dis-
carding lower levels structural information, it will be used when there is too little
time to simulate the -- -I. i in detail. The abstraction mechanism is implemented
in OOPM, and the models produced by OOPM become the sources of methods for
performing the real-time simulation. More detailed discussions on our abstraction
i!l. b,..,,1....-_ are found in Refs.[Lee and I i-!!;- 1: 1996; Lee and I i-I!- !: 1997a;
Lee and I i-l!- !. !: 1997b].

5. CONSTRUCTION OF THE ABSTRACTION TREE
AT (Abstraction Tree) extends the tree structure to represent 1) all the methods
that comprise the base model and 2) refinement/homomorphism relationship among
the methods. Every method that comprises the base model is represented as a
node. Each node takes one of three I" : Mi1, Ai or Ii.
-MA High resolution method. It takes the form of dynamic or static meth-
ods of OOPM. We have I I;. (Functional Block Model), 1 S. (I i!l.-. .i ,1..
Machine), SD (System Dynamics), FQM (i.1I 1~I, ,1 Model), and RBM (Rule-
Based Model) choices for the dynamic method, and the CODE method for the
static method
-Ai Low resolution method. It takes the form of a neural network or a BJ (Box-
Jenkins) ARMA (AutoRegressive Moving Average) model
-Ii Intermediate node to connect two different resolution methods, MAl and Ai.
Ii appears where a method i has been applied to behavioral abstraction, and
the corresponding behavioral abstraction method has been generated for a low
resolution method to speedup the simulation
The Refinement/Homomorphism relationship is represented as an edge. If a
method Ml, is refined into NI, N2. ,N3 .N, Nk., kan '. I' ., Nj), for j = 1, 2,...,k, is
added to the AT. AND/OR information is added on the edge to represent how to
execute MAl for a given submethod Nj, for j = 1, 2,..., k.
-AND Mi is executed only if Nj is executed, V j, j = 1, 2, ..., k
-OR Mi is executed only if ;,ii Nj, j = 1, 2,..., k, is executed
The decision of AND/OR is made based on 1) the node l- !" of MAl and 2) the
model -I i.- of Mi.
(1) Node I I"- : An intermediate node IJ is executed either by Hi or Li, where Hi
is a high resolution method and Li is the corresponding low resolution method.
Therefore, IJ is connected with the OR relationship.
(2) Model I- i". : If a method Ml, takes the form of an FBM, and each of the
block that comprises Mli is refined into B1, B2,..., Bk, then the execution of Mli
is completed when Bj, V j, j = 1,2,..., k, are executed. Therefore, an FBM
method Ml, is connected with the AND relationship. Other examples of the
AND relationship are SD, IEQM, and CODE method. However, other model












A Modeling Framework for Real-Time Systems 9


SI" can take the OR relationship. If a method M1, takes the form of an 1 S., I
and each state of the 1 S. I is refined into S1, S2,..., Sk, then the execution of
MAi is completed when ,!i Sj, j = 1, 2,..., k, is executed. The decision of j is
made according to the predicate that the 1 S. I method, MAi, satisfies at time
t. Therefore, 1 S. I method M, is executed with the OR relationship. RBM is
another example of the OR relationship.
Each node, T, in AT has duration D(T) and quality Q(T). Q(T) summarizes
three properties of the [Ii I' associated with node T.
(1) QA(T) Degree of abstraction. Degree of abstraction represents how much
information would be lost if the execution occurs at node T. The base model
will not be executed at the associated leaf nodes when the method T is selected
for the behavioral abstraction. QA(T) is defined by how 11ii i~ methods are
being discarded if behavioral abstraction occurs at node T, comparing to the
case where no behavioral abstraction is applied to the base model.
(2) QI(T) Degree of interest loss. A modeler ii ,- have certain nodes that he/she
wants to see with a special interest; If there are two nodes, A1 and A2 in a
given AT, and a modeler has a special interest in A1, it is preferable to take
A2 for behavioral abstraction. QI(T) is defined by how !1i! i interesting nodes
are being discarded if behavioral abstraction occurs at node T, comparing to
the case where no behavioral abstraction is applied to node T.
(3) QP(T) Degree of precision loss. Degree of precision loss represents how ac-
curately the behavioral abstraction method approximates the high resolution
method for node T. The precision can be assessed by testing the trained neural
network or Box-Jenkin's ARMA model. Several techniques for estimating er-
ror rates have been developed in the fields of statistics and pattern recognition,
which include hold out, leave one out, cross validation, and bootstrapping [Weiss,
S. M. and Kapouleas, I. 1989]. We use holdout method which is a single train-
and-test experiment where a data set is broken down into two .1i -i..- i subsets,
one used for training and the other for testing. QP(T) is estimated through
the testing phase of holdout.
Based on the three 1''t 11li properties, Q(T) is defined by :


N(T)
QA(T) = (T)
N
QI(T) = NT)
Ni
QP(T) = E(T)
Q(T) QA(T) + QI(T) + QP(T)
(Tl) =
q

where N(T) for the number of nodes in a subtree that has T as a root node, Ni(T)
for the number of interesting nodes in a subtree that has T as a root node, Ni for the
total number of interesting nodes in a given AT, and N for the total number of node
in a given AT. E(T) is the normalized error rate of behavioral abstraction method












10 K. Lee and P.A. Fishwick


for node T. N(T) of QA(T) is set to 1 for a leaf node. q represents the number of
'!L liI properties specified for a node, T (1 < q < 3). For an intermediate node,



Q(I1) = Q (Hi) Q(Li)
where Hi is the high resolution method for node Ii, while Li is the low resolution
method for node Ii. D(T) is defined based on 1) AND/OR relationship and 2) node
I I" For a node I- Ii, and the corresponding two i!!. i. I resolution methods,
Hi and Li,


D(1i) = D(Hi) D(Li) + 0
where 0 is the .,! factor; 0 considers if the target simulation platform is li!. I. i!-
from the environment in which the execution time has been measured. Therefore,
D(Ii) represents the amount of speedup by replacing the high resolution model Hi
with the behavioral abstraction model Li, in ;i i platform. For other node I- i, -
the duration of a node is defined based on its AND/OR relationship. For an AND
related node,

k
D(T) = Nj + 1)+0
j=1
For an OR related node,

D(T) = Max (NI,N2,...,Nk) + k 1 ) +0

where Nj, for j = ,..., k, is the method that T calls to complete its high res-
olution execution. k is the number of refined methods for T. I' ) is the amount
of time that method T takes for its own execution. For example, in the case of
an 1 S. !I checking the current state and determining the next state based on the
predicates might take ,I ) time, while the execution of each state is assessed in
the summation term. 0 is a -- -'I. i factor as in the case of Ii node. D(T) of an
OR node is set to the worst case execution time by taking the maximum duration
of the possibilities. This worst case assignment securely guarantees the resulting
model's timeliness. The 1,il- l, and duration function are constructed recursively,
until individual methods at the leaf level are reached.
I !,i. 2 shows an example of an AT. M21 is an AND related method that calls
Mi3 and then M32 followed by M33. M22 is an AND related method that calls
M34 and then MAN5. A method Mjj calls M21 and then M22. We suppose that
behavioral abstraction methods {A, A12, ..., -1 -.} have been generated for each of
the corresponding high level method Mij. Each Aij ii ,- take [ it 1l i! I model I-
according to the behavioral abstraction technique. The intermediate nodes relate
a high resolution method to a corresponding behavioral abstraction. These nodes
are i,1i..1 !. .1 by {11,112, ., *135}. If all {11, 12, *...,35} are executed by high
resolution methods only, the resulting structure is the base model which has been
constructed through the structural abstraction process. The I, li I- and duration of












A Modeling Framework for Real-Time Systems


220

M11 240 All 20

121 110 122 90

130\ 20
M21 A21 A2220 M2211

131 132 133 134 135
A 10 0 \ 0 20 050
M31 A31 M32 A32 M33 A33 M34 A34 M35 A35
30 20 60 20 40 20 40 20 70 20


Fig. 2. Example Abstraction Tree

each node is determined by recursively *I I 1! i i- the 1L ,11 i and duration equations.
6 and 0 are assumed to be 0 for each internal node.

6. SELECTION OF THE OPTIMAL ABSTRACTION MODEL
A Task is a granule of computation treated by the scheduler as a unit of work
to be allocated processor time [Liu and ('!ii!!, i.i 1991]. The scheduling problem
is to select a task set each of which meets the given deadline. Partial orderings
of the tasks should be met in the resulting schedule. Related research has shown
the NP-completeness of this problem [Liu and ('CI i.! 1 1991; Garey and Johnson
1979]. Task corresponds to method that comprises the base model, which has been
constructed from the model generation phase. The problem of finding the optimal
abstraction level translates to the scheduling problem, which is to find a schedule
for a set of methods that yields maximal iit ,l for a given amount of time, while
preserving the partial temporal orderings among the given methods. In the fol-
lowing sections, we define three approaches for optimal abstraction level selection.
An optimal abstraction model is built based on the determined optimal abstraction
degree.

6.1 IP (Integer Programming)- Based Selection
Operations research (OR) is a field that is concerned with deciding how to best
design and operate -1. I under conditions requiring the allocation of scarce re-
sources. Our optimal level selection problem falls under the OR umbrella, since
the selection should be made for the best model that has an optimal abstraction
level to simulate a given -- -1. i under conditions requiring the allocation of scarce
resources, such as time and accuracy. The essence of the OR ;, lI if- lies in the
construction and use of the mathematical models. The term linear programming
defines a particular class of programming problems when the problem is defined
by a linear function of the decision variables (referred to as the objective function),
and the operating rules governing the process can be expressed as a set of linear
equations or linear inequalities (referred to as the constraint set). IP refers to the


11













12 K. Lee and P.A. Fishwick


class of linear programming problems wherein some or all of the decision variables
are restricted to integers [Ravindran and Solberg 1987]. Pure integer programming
is a category where all the decision variables are restricted to be integer values. Our
problem is a special case of integer I' -' i i- where the decision variables take
binary values to indicate whether or not to select the examining node of a given AT
for the behavioral abstraction. We formulate the problem as two IP models: IP1
and IP2. A simple example is given to i,1- ,-! the IP models.

6.1.1 Formulation of IP-Based Selection. Let a binary integer variable Lij denote
the decision to select or not to select the node Iij for the behavioral abstraction.

S1 if behavioral abstraction occurs at the Iij node
Lij 0 otherwise

Then, the objective function for IPI selection is defined in equation 1
I ni
Minimize Y Y Liy (1)
i=1 j=1
-,l.i. l to

i nt

aijLj a. (2)
i=1 j=l


tijLj > tc (3)
i=1 j=
and, for each parent node Lik of a given AT


SLi+1,k < n i(- Lik), for each i (4)
k=l
where I is the maximum level of the AT and ni is the number of nodes at level i. aij
represents the accuracy loss and tij represents the expected duration. a, defines the
accuracy constraint given to the -- -I. i while tc is the amount of desired speedup
to meet a given deadline, D. Therefore, tc = execution time of the base model D.
The objective function of IP1 reflects the fact that the smaller number of behav-
ioral abstraction methods is desirable as long as the resulting model satisfies the
given time deadline and the accuracy constraint.
The objective function for IP2 selection is defined in equation 5

Minimize Y Y aijLij (5)
i=1 j=l
S. to



tji=1 j > t (6)
i=1 j=1












A Modeling Framework for Real-Time Systems


and, for each parent node Lik of a given AT


SLi+1,k < ni(- Lik), for each i (7)
k=l
The objective function of IP2 minimizes the .!,L ,1 loss while ,r;-f" ;,- the
timing constraint defined in equation 6. IP2 does not minimize the number of
behavioral abstraction methods as long as the resulting model minimizes the accu-
racy loss. For instance, if a model, A, that cuts out three structural components,
is expected to produce more accurate results than a model, B, that cuts out only
one structural component IP2 keeps A for a candidate of the optimal abstraction
model.

6.1.2 .1 ... f ,' of IP-Based Selection. Consider AT in I ,..- 2. We associate
each Iij node with a binary variable Lij discussed in the previous section. Then
the objective function of IP1 for a given AT is defined as :


Minimize (L11 + L21 + L22 + L31 J L32 + L33 + L34 + L35) (8)

For I-di,. .i I we assume that i behavioral abstraction method takes 20 units.
0 is assumed to be 0, which means real-time simulation will be performed in the
same platform with which the expected duration has been measured. Then, (t11,
t21, t22, t31, t32, t33, t34, t35) is defined as (220, 110, 90, 10, 40, 20, 20, 50),
respectively.
For the 1! I.1 ;1 of illustration, we consider only QA(Iij) to assess the .!1,L ,1i
loss, aij, when the corresponding node Iij is selected for the behavioral abstraction.
Then, aij is simplified as follows:


Caij = N Ci+
N

where Cij is the number of children that Liy has. Since the behavioral abstraction
at this level discards all the structural information of the lower levels, we believe
that the accuracy loss is proportional to the number of descendants that a node
has. The right hand side of aij is to find out the number of descendants that node
Lij has. For a given AT in I ,!.- 2, (all, a21, a22, a31, a32, a33, a34, a35) is defined
as (7/8, 3/8/, 2/8, 1/8, 1/8, 1/8, 1/8, 1/8), respectively.
For a given accuracy loss, ac, the accuracy constraint of IP1 is defined as :


(a11L11 + a21L21 + a22L22 + a31L31 a32L32 + a33L33 + a34L34 + a35L35) < a(9)


Also, for a given deadline, t,, the speedup constraint is defined as :


(tilLi1 t21L21 + t22L22 + t31L31 + t32L32 + a33L33 + a34L34 + a35L35) > t(10)


13













14 K. Lee and P.A. Fishwick


24 A 11A 20



%30 20 A 20 090
A22







L31 L32 13 3 3(13 L2)







L34 L35 > 2(1 L22) (11)
M311 M32 A32 M33 A33 2(1 L







Then, the IP1 selection of the optimal abstraction level for a given AT is to solve
30 20 60 20 40 20 4
-- 20 70 20







Fhe objective pfnctionon ee decided from the integer programmints defined inapproach






equations 9- 11.
To define parent and child relationships in when we hae 120 units for a deadline (t 120) and
for al l the child nodes of the given AT.
L31 + L32 +L33 3(l 21)
L34 +L35 2(1 L22) (11)
L21 +L22 > 2(1 L11)



Then, the oral abstra selection at and of4 gives he optimal abstraction level for a given AT is to solve
the objective function defined in equation 8 -,.1. i P to the constraints defined in
equations 9- 11.
1 !, Ln!- 3 shows the result when we have 120 units for a deadline (t, = 120) and
(-.I-C) for an accuracy constraint (ac = 0.5). The resulting AT concludes that
:I'l ; i,- behavioral abstraction at 12, and 134 gives the optimal abstraction level
which simulates the -- -, ii within a given deadline and the accuracy constraint
with the minimum loss of the structural information. 121 node is executed by its
behavioral abstraction method, A21. Also, 134 node is executed by its behavioral
abstraction method, .1 i instead of the high resolution method, AM34. Other in-
termediate nodes (135, I22, I1) are executed by the high resolution methods. The
intermediate nodes, I31, 132, and 133 are not considered since the behavioral ab-
straction occurs at the parent node, I21, as defined in equation 11. The execution
time of the AT is saved by the speedup amount that A21 and .1 i yield. The ex-
ecution of IP2 is same to IP1 with the objective function and the time constraint
defined as :


Minimiz(e(a11L1 + a21L21 + a22L22 + a31L31 + a32L32 + a33L33 + a34L34 + a35L35)

.tl "i. I to

(t11ll1 + t21L21 + t22L22 + t31L31 + t32L32 + a33L33 + a34L34 + a35L35) > tc

6.2 Search Based Selection
Our 1i I .,1!, -i is that as we need tighter time constraints, we tend to .r.1...l, more
behavioral abstraction methods. We increase the number of behavioral abstraction













A Modeling Framework for Real-Time Systems 15


Algorithm 1. Optimal Abstraction Level Selection
1: nodes = at.Constr. I! ,'
2: baseCost '- "" 0
3: if baseCost < deadline then
4: return(0)
5: endif
6: at.CollectOrNodes(nodes,orNodes)
7: size = at.SelectOneByDeadline(orNodes,deadline)
8: if size > 0 then
9: at.SelectBy .. ... I
10: OptimalAbstraction .. .... i .. 1 I ..... )
11: else
12: degree < Ol ... I .1- I,, .. 1 .., .odes,deadline,baseCost)
13: if degree == -1 then
14: return(-1)
15: else
16: 01 .1 i... Oi 1 ~ i.... ombination(ornodes,deadline,baseCost,degree)
17: O0 .... ost = O il ... ..
18: 01, ...; ,,, ,i;i Loss <= 't ... 1 1 i drloss
19: end if
20: end if
21: return(0)



methods as we require more stringent deadlines for the heuristics. The selection
algorithm starts from one behavioral abstraction. If this abstraction satisfies the
time constraint, we stop and do not go further to examine other possibilities, with
the hope that increasing the number of behavioral abstraction methods will result
only in a less accurate model. If the time cannot be met by one behavioral abstrac-
tion method, we examine how 11ii, i behavioral abstraction methods will be needed
for a given time constraint. This is done by examining r fast behavioral abstrac-
tion methods. If combining r fast behavioral abstraction methods satisfies the time
constraint, then the optimal abstraction level will be determined by r behavioral
abstraction methods. At this point, we start to pick r behavioral abstraction func-
tions until the most accurate combination is found while still ,Ii-f. i the given
time constraint. Algorithm 1 shows the overall method in detail.
This algorithm reads abstraction information about a given base model. The
information contains methods, parent/child relationships between the nodes, and
duration/! 1 i- information for each method. Based on the given information,
the algorithm constructs an AT as in Line 1. The execution time of the base
model that has no behavioral abstraction methods is calculated in Line 2. Lines 3
- 5 examine whether we need to i l1 ,. behavioral abstraction methods to meet a
given deadline. If the calculated duration of the base model is less than equal to the
given deadline, we don't have to i!!1 '.1 behavioral abstraction methods; thus, the
algorithm terminates. If the duration of the base model is greater than the given
deadline, then it becomes necessary to use behavioral abstraction methods. Upon
recognizing the !i. .. --i of behavioral abstraction methods, the algorithm collects
OR nodes that contain the information about the behavioral abstraction methods
and then starts to increase the number of behavioral abstraction methods. Line
8 examines whether one behavioral abstraction method will resolve the timeliness












16 K. Lee and P.A. Fishwick


requirement. If the returned size is greater than 0, as in Line 9, we know that one
behavioral abstraction is enough to meet a given deadline. Then, the algorithm
looks up the most accurate method to ensure that the selected method will have
the best .' !i l I while 1r- i the given deadline. If one behavioral abstraction is
not enough to achieve the given deadline (size < 0), the algorithm determines how
i ii ~i behavioral abstraction methods can achieve the given deadline. We know that
behavioral abstraction methods will bring more savings to the execution time of
the resulting model. Our objective is to minimize the use of behavioral abstraction
methods as long as the resulting model meets the given deadline. A simple method
defining degree in line 12 is :

(1) i = 2
(2) select i behavioral methods that will bring the maximum time savings to the
given base model;
(3) if the use of i behavioral methods cannot resolve the required speedup, increase
i by 1 and go to step 2;

At this point, the algorithm knows how 11i ii behavioral abstraction methods
will be needed for a given deadline. If the returned degree is -1, it means the
given deadline cannot be met even if we use all available behavioral abstraction
methods. Lines 16 18 look for the best combination that will lead to the most
accurate model. The algorithm examines all nCr combinations, where n represents
the number of behavioral abstractions available to the given base model and r is
the calculated degree in Line 13.

6.3 Experiments
We implemented the proposed integer programming solutions with solver on Excel.
For a small problem space as in the case of I i, i,-. 2, solver of Excel might be a
good choice. However, if the problem size is large, we can use CPLEX [CPLEX
I' 'I.] which is an optimization callable library designed for large scale problems.
For the exact solution method, we use the branch and bound method, which is a
classical approach to find exact integer solutions. The branch and bound method
is an. tin i enumeration procedure for examining all possible integer feasible
solutions [Ravindran and Solberg 1987; CPLEX I',',I] Through the branch and
bound method, the binary variable Lij is either 0 or 1. Table 1 shows some results
from the experiments of IP1, IP2 and search-based approach.
When the base model meets a given deadline, as in case 1, no behavioral ab-
straction is suggested. Also, when a given deadline is immediate, the entire AT
is behaviorally abstracted into one method as in case 12. Other cases i!.1.. one
or two behavioral abstraction methods to meet a given accuracy constraint while
- .-" ii_- a time constraint. Note that IP2 selects equal or more number of nodes
comparing to IP1. Case 7 shows that the objective of IP1 is to meet both accuracy
and time constraint, while minimizing the loss of structural abstraction methods.
Case 11 shows that the objective of IP2 is to minimize the expected !i, .1,li loss
rather than to minimize the loss of structural abstraction methods.
Given an optimal abstraction level determined by the selection algorithms, the
Optimal Abstraction Model Composer looks at the method names which comprise













A Modeling Framework for Real-Time Systems


Table 1. Experiment results from IP1, IP2 and search-based approach
No Deadline a, tc IP1 IP2 Search
1 240 0.5(50%) 0 n/a n/a n/a
2 220 0.5(50%) 20 L34 L34 L34
ac = 0.125(13%) ac = 0.125(13%) ac = 0.125(13%)
deadline = 220 deadline = 220 deadline = 220
3 200 0.5(50%) 40 L35 L35 L35
ac = 0.125(13%) ac =0.125(13%) a, =0.125(13%)
deadline = 190 deadline = 190 deadline = 190
4 180 0.5(50%) 60 L22 L32, L34 L22
a, = 0.25(25%) a, =0.25(25%) a, = 0.25(25%)
deadline = 150 deadline = 180 deadline = 150
5 160 0.5(50%) 80 L22 L22 L22
a, = 0.25(25%) ac = 0.25(25%) a, = 0.25(25%)
deadline = 150 deadline = 150 deadline = 150
6 140 0.5(50%) 100 L21 L22, L33, L35 L21
a, = 0.375(38%) a, = 0.375(38%) a, = 0.375(38%)
deadline = 130 deadline = 80 deadline = 130
7 120 0.5(50%) 120 L21, L34 L22, L32 L22, L32
a, = 0.5(50%) a, = 0.375(38%) a, = 0.375(38%)
deadline = 110 deadline = 110 deadline = 110
8 100 0.5(50%) 140 L21, L35 L22, L32, L33 L21, L35
a, = 0.5(50%) a, = 0.5(50%) a, = 0.5(50%)
deadline = 80 deadline = 90 deadline = 80
9 80 0.5(50%) 160 L21, L35 L21, L35 L21, L35
a, = 0.5(50%) a, = 0.5(50%) a, = 0.5(50%)
deadline = 80 deadline = 80 deadline = 80
10 60 0.7(70%) 180 L21, L22 L21, L22 L21, L22
a, = 0.625(63%) a, = 0.625(63%) a, = 0.625(63%)
deadline = 40 deadline = 40 deadline = 40
11 40 0.9(90%) 200 L1 L21, L22 L11
a, = 0.875(88%) a, = 0.625(63%) ac = 0.875(88%)
deadline = 20 deadline = 40 deadline = 20
12 20 0.9(90%) 220 L L11 L1
a, = 0.875(88%) a, = 0.875(88%) ac = 0.875(88%)
deadline = 20 deadline = 20 deadline = 20


17













18 K. Lee and P.A. Fishwick


IBI I_ I ITu hin l Fnl _P Irul
F--,
















Fig. 4. Conceptual model of FULTON: FULTON is modeled within OOPM Conceptual model
is designed in terms of classes, attributes, methods (dynamic method and static method) and
relationships of classes (inheritance and ...... ....i

the optimal abstraction level for a given AT. The optimal abstraction model is
composed by observing the partial temporal orderings of the selected methods.

7. FULTON EXAMPLE
Consider a steam-powered propulsion ship model, named FULTON. In FULTON,
the furnace heats water in boiler: when the fuel valve is 01'1.'\, fuel flows and
the furnace heats; when fuel valve is CLOSi.1), no fuel flows and the furnace is at
ambient temperature. Heat from the furnace is added to the water to form high-
pressure steam. The high-pressure steam enters the turbine and performs work by
expanding against the turbine blades. After the high-pressure steam is exhausted in
the turbine, it enters the condenser and is condensed again into liquid by circulating
sea water [Gettys and Keller 1989]. At that point, the water can be pumped back
to the boiler.

7.1 Model Generation
A conceptual model is constructed on OOPM. It is designed in terms of classes,
attributes, methods, and relationships between classes (inheritance and composi-
tion). I i,oi,. 4 shows the class hierarchy of FULTON, which follows the I'!i -1 l1
composition of a steamship. ('I -- are connected by a composition relationship as
denoted by the rectangular boxes in I !,.!- 4. V denoted in the white box specifies
1 for the cardinality of the associated class. In 1 ,,. !- 4, ,!. 1' has a Boiler, a I.,' -
bine, a Condenser, and a Pump. ('I ,-- Boiler has a Pot and a Knob. Each class
has attributes and methods to specify its dynamic behaviors.

7.1.1 i,. .,. ., Abstraction of FULTON. I !,ILi. 5, 6, and 7 show structural
abstractions of FULTON. Since FULTON can be configured with 4 distinct i 1! -;. 1
components and a functional .1i, - i. i. .11li we start with FBM. The FBM is located
in class s!. p, as shown in I !,.iw- 5. 1 it ,i- 5 has 4 blocks: Li for the function of













A Modeling Framework for Real-Time Systems

-I FUNCTIONAL BLOCK MODELER(SteamShip::sail)
rile Edd Fbni Link Help









S1 /


Fig. 5. !,- level : structural abstraction for FULTON




i: tali I i


posiiIonwwa&tellmpomtur.'1
PosillooI 0

Cold I




position il89 Iempemlure4=2t3
'ooi positron 0


19


Fig. 6. Structural abstraction of Aiy: FSM has 4 states (Cold (A113), C....1;.. (A114), Heat-
ing (M15) and F...I;... (M16))


a boiler, L2 for turbine, L3 for condenser, and L4 for pump. Boiler assembly (Li)
has distinct states according to the temperature of the water. Li is refined into :

(1) B1 : method of class Knob, M6, which provides fuel to the boiler
(2) B2 : I ., MAI1, in I ,, .i. 6, which determines the temperature of the boiler
and makes state transitions according to the temperature

(3) B3 : provides high-pressure steam, defined in a CODE method, M8

Each state of I i,o..- 6 (Cold (M13), Heating (M14), Boiling (M15), and Cool-
ing (M16)) is refined into an algebraic equation, which calculates the temperature
based on the position of the knob (Open, Closed). Each state of B2 is refined into
a CODE method that defines the temperature equations with C++ !i ,-.












20 K. Lee and P.A. Fishwick






Exlhauting steam lntlo 0 Walidng

-.,tm^nl :o-


(a) Structural abstraction of Aflo (b) Structural abstraction of Al12


Fig. 7. Structural abstraction of Aflo and All2



L2 is refined into two functional blocks: M9 and M10. M9 gets the high pres-
sure steam from the boiler. M10 is decomposed into two temporal phases: Ex-
hausting (M17) and Waiting (M18). If there is no steam to exhaust, M10 resides
in the waiting state. Otherwise, M10 exhausts steam to generate the work of the
steamship. i ,,..i- 7 shows the 1 S. I of the turbine. L3 is also refined into two
functional blocks: M11 and M12. M11 gets the exhausted steam from the turbine.
M12 has two distinct temporal phases: C,..,., .1 '. ", (M19) and Cooldown (M20),
in I o,.i!.- 7. Condenser decreases the temperature in Cooldown state, waiting for
the turbine to send more steam. Otherwise, M12 resides in C1.,., .-'.'i state
where the steam from the turbine turns into liquid again.

7.1.2 Behavioral Abstraction of FULTON. We start with the observed data set of
(input, output) from the simulation of the base model. \\ !i I this prior knowledge,
the method of behavioral abstraction is to generate a C++ procedure which encodes
the input/output functional relationship using a neural network model (MADA-
LINE, Backpropagation) or a Box-Jenkins model.
We abstract the multimodel method of M7, M10 and M12 with Box-Jenkins
models. Given three behavioral abstraction methods for M7, M10 and M12, 8 (23)
new models can be generated with different degrees of abstraction. Table. 2 shows
the possible combinations of the behavioral abstraction methods. For example, C6
uses two behavioral abstraction methods for M7 and M12. Therefore, the struc-
tural information associated with M7 and M12 methods, which are both I S. !-
are abstracted.
When modelers create a behavioral abstraction method, they pick the dynamic
function to abstract. i ,,..i- 8 shows the Box-Jenkins abstraction process for M7.
Based on the learning parameters of the Box-Jenkins, we learn the input/output
functional relationship of M7. Once the performance of the Box-Jenkins model
is accurate enough, we generate a behavioral abstraction method based on the
resulting weight and offset vector.


oDM Dn I iMM HD j

Condensing ColD

sonsia':a















A Modeling Framework for Real-Time Systems


Table 2. New multimodels of FULTON with behaviorally abstracted componentss: A capital
letter represents a full-resolution model, while a small letter represents a low-resolution model.
The low resolution model is generated through behavioral abstraction


no Model Abstracted
Method
C1 BTCP N/A
C2 BTcP AM12
C3 BtCP Af10
C4 BtcP Af10, Al12
C' bTCP A17
C( bTcP Af7, Al12
C7 btCP Af7, Af10,
Cs btcP Af7, Af10, Af12


Abstracted
Component
N/A
Condenser
Turbine
Turbine, Condenser
Boiler
Boiler, Condenser
Boiler, Turbine
Boiler, Turbine, Condenser


S. .. .L.... i 1 .
.ii, iF -,-,----..__- L -r l.n n


I,..

C 1. 11


H --s.M.--- Fhnl ~ 1 -00


'Log Window, ..i


Log Window


u 7 L F

S. . I, I-


Learning Parameters for
Box-Jenkins model


Fig. 8. Behavioral abstraction : The user selects a dynamic function to abstract, Pot::HeatPot,
which is an FSM. States and their transitions will be lost, but behavioral information will be
preserved to some level of fidelity. In the learning process, the user gives several parameters, for
example, lag for input and output variables


21














22 K. Lee and P.A. Fishwick


Re time ,meauremet of mutimtde
x 10 Accuracy loss of multmodels wth abstraction
45,





I
3 5







2 3 4 8 9 10
Su i-Tir Tr
Simulation Time

(a) Execution time of multimodels (b) Accuracy loss of multimodels


Fig. 9. Execution time/ accuracy loss of models: Behavioral abstraction yields shorter elapsed
times. As we increase the level of abstraction by using more behavioral abstraction methods,
the model execution time decreases. Accuracy is lost as we increase the number of behavioral
abstraction methods in the base model


7.2 Construction of the Abstraction Tree

The model sets in Table 2 provide alternatives that vary in the expected accuracy
and in the computation time; it thus allows us to investigate the effects of model
structure on model accuracy and on computation time. We measured the execution
time of each model by !- ;i 1 the simulation logical clock from 50 to 500 using
a time step of 50. As shown in I !,..i!- 9, the most detailed model, C1, takes the
longest time, and the least detailed model, C8, runs faster than the other models.
The cumulative accuracy loss of each model is also measured in I ,,..i- 9. The
accuracy loss of the Box-Jenkins model is measured by examining the sum of the
squared error through the Box-Jenkins testing process. As simulation proceeds, the
cumulative accuracy loss increases for each model. The least detailed model, Cs,
has the maximum accuracy loss, while C2 shows the minimum accuracy loss over
time.
i ,,i.- 10 shows the AT of FULTON. We applied the Box-Jenkins behavioral
abstraction technique to three methods, (M7, M10, M12), and produced (A7,
A10, A12), respectively. i, node is positioned where the two associated hli!. i. iI
resolution methods reside. Intermediate nodes ij are connected to the children by
the OR relationship.
The execution time of leaf methods can be measured by extensive experimenta-
tion [Lark, J. S., Lee D. Erman, Si. p iii .. Forrest and Kim P. Gostelow 1990], or
assessed by available execution time prediction techniques -.1 1i iH G. Harmon and
Walley 1994; Horst F. Wedde and Huizinga 1994]. To simplify the illustration, we
assume that the execution time of each leaf method (M6, M13, M14, M15, M16,
M8, M9, M17, M18, Mll, M19, M20, M5) in the AT is properly assessed to
(2,2,8,4,6,2,2,4,3,2,2,4,2), respectively by using the available ;!i i1- Il tools. Also,













A Modeling Framework for Real-Time Systems


Ml



M2 M3 M4 M5


M6 7 M8 M9 A0 M1il 2


M7 A7 M10 A10 M12 12


M13 M14 M15 M16 M17 M18 M19 M20

Fig. 10. Abstraction Tree of the FULTON example: Intermediate node IJ is introduced to con-
nect the high resolution method AMi and low resolution method (behavioral abstraction method),
Ai

we assume that (A7, .1,, A12) takes (4,2,2), respectively. Non-leaf nodes iteratively
look for child's execution time and calculate its own execution time by; 1, 1 i the
execution time assessment equations discussed in Section 5. System factor, 0, is
assumed to be 0; therefore, the target platform in which the model will be executed
is the same one in which the model execution time is measured. We assume that
there is no special interesting class for the simulation. The precision loss of A7 is
assumed to be 0.4, while (.1,,, A12) is assumed to be (0.1, 0.2), respectively. Then,
the !, 1i l- loss of each method, a7, alo, and a12 is defined by 0.325,0.125, and
0.175, respectively.

7.3 Selection of the Optimal Abstraction Model
The base model of FULTON takes 26 units to complete the simulation. Suppose we
have 20 units for a deadline. Upon receiving the time constraint, we immediately
know that the behavioral abstraction is needed to make the simulation faster. The
optimal abstraction level is determined by IP1, IP2 and the search-based algorithm
discussed in Section 6.2.
For a given AT in I ,o,.- 10, the objective function of the IP1 is defined as:


NMinimize (17 + Ilo + 112) (12)
,tnl i. to


a077 + aloloo + a12112 < ca

t717 + t10o10 + t12112 > tc

a7 = 0.375, alo = 0.125, a12 = 0.175 (13)


t7 = 4, tio = 2, t12 = 2


23












24 K. Lee and P.A. Fishwick


Then, the IP1 selection of the optimal abstraction level is to solve the objective
function defined in equation 12 with the constraints defined in equation 13. Since
the desired speedup to be achieved for a given deadline is 26 20 = 6, we assign 6
to t,. To find out the most accurate combination, we assign 1.0 to a,. Therefore,
the accuracy is not constrained to a certain bound.
The objective function of the IP2 approach is defined as :

Minimize (17 07 + Io1 alo + I12 (12) (14)
-tl i. to


t717 + t10o10 + t12112 > tc

a7 = 0.375, alo = 0.125, a12 = 0.175 (
(15)
t7 =4, tio = 2, t12 = 2

Then, the IP2 selection of the optimal abstraction level is to solve the objective
function defined in Equation 14 with the constraints defined in Equation 15.
The search-based algorithm increases the number of behavioral abstraction meth-
ods to be used for the deadline. The algorithm examines whether one behavioral
abstraction method will resolve the time constraint. Neither of the candidates
meets the deadline. Therefore, the algorithm increases the number of behavioral
abstraction methods to use for the simulation. The fastest behavioral abstraction
A7 achieves the deadline if either of .1,,, or A12 is combined with A-. Therefore,
the algorithm concludes that using 2 behavioral abstraction methods will resolve
the timeliness requirement. At this point, the algorithm starts to find the most
accurate combination. (A7, .I,,,) meets the deadline with the maximum accu-
racy. Therefore, the algorithm declares (A7, ,,,) as the optimal abstraction degree
for a given AT and a deadline of 20. 1 !,..ii- 11 shows the optimal abstraction
level of the given AT. The execution of (17,110,112) is made by (A7,.t,,, M12),
respectively. Then, the optimal abstraction model is composed of the sequence
(Me, A7, M, M9.,,, IMn, M12, M5). Note that the 1 S. I models of Boiler and
l., ./ .,. are cut off to save simulation time. The corresponding scheduling diagram
is shown in I ,. L i. 12.
Table 3 shows other selection examples. IP2 produces a !. I~ answer for a
deadline of 22. IP1 and the search-based methods minimize the number of behav-
ioral abstraction methods in order to minimize the loss of structural information.
When modelers want to minimize the loss of structural information (to preserve
the base model structure as much as possible), behavioral abstraction occurs at 17.
However, if the simulation objective is to minimize the expected [iiL Jl,- loss, we
apply behavioral abstraction at o10 and '12, as suggested from IP2.

8. CONCLUSIONS
We demonstrated a semi-automated ri 1 ~1 l.1..- to build a model that is right for
the simulation objective and real-time constraints. The key to our method is to
use the model abstraction technique to generate multiple methods of the -1. 11i















A Modeling Framework for Real-Time Systems


M2 M3 M4 M5


M6 17 M8 M9 Tin. M11 117


Fig. 11. Optimal abstraction level for a deadline of 20





Base Model
M6 M7, M9 M10 M1 M12 M5


2 4 6 8 10 12 14 16 18 20 22 24 26


Optimal Abstraction Model for deadline = 20
M6 M8 M9 M11 M12 M5


2 4 6 8 10 12 14 16 18 0 22 24 26

A7 A10 deadline


Fig. 12. :. 1,..i,,1 ,.. 1; .._ .... for a deadline of 20







Table 3. Selection examples of three algorithms for FULTON


deadline 20 22 24
IP1 17, lo0 17 Ilo
ac = 0.5 a, = 0.375 ac = 0.175
IPS 17, 110 11o, 12 110
ac = 0.5 ac = 0.3 ac = 0.175
Search 17, Ilo 17 Ilo
a, = 0.5 ac = 0.375 ac = 0.175


25













26 K. Lee and P.A. Fishwick


which involve tradeoffs in runtime versus accuracy. Modelers construct the abstrac-
tion hierarchy through a structural abstraction phase, and we use the abstraction
hierarchy for the source of information where the optimal abstraction degree is
determined. By I,,i, 'l i,!- the proposed algorithms that determine the optimal ab-
straction level to simulate the -- i! for a given deadline, we find positions) where
the behavioral abstraction technique is applied. Behavioral abstraction yields time
savings of the simulation by discarding detailed structural information, though ac-
curacy is sacrificed. The resulting model simulates the -- -I. i, at an optimal level
of abstraction to satisfy the simulation objective for a given deadline so as to maxi-
mize the tradeoff of model execution time for accuracy. One of our assumptions was
that !, 11 l- and execution time of the abstraction methods are fairly predictable.
Predicting the execution time is possible, in general, by using the available research
on runtime estimation techniques; however, assessing the method's !,L ,1-i is dif-
ficult. Especially, when the result from a method decreases the .!iL ,1i1 of other
methods, the estimation becomes more complicated. One of the possible solutions
is to monitor the selected model's execution under the real-time simulation [Garvey
and Lesser 1993b]. When the selected model takes longer time than expected, or
the solution ,L ,i l1 is lower than expected during the real-time simulation, it is re-
ported to the monitor to take an action. Then, the appropriate actions can be taken
to ,lii -I the problems that have been caused by under-estimated/over-estimated
duration or .'i 1l -


ACKNOWLEDGMENTS
We would like to thank the following funding sources that have contributed towards
our study of modeling and implementation of the OOPM multimodeling simula-
tion environment: (1) GRCI Incorporated 1812-96-20 (Gregg Liming) and Rome
Laboratory (S.4 - Farr, Al Sisti) for web-based simulation and multimodeling;
(2) NASA/Jet Propulsion Laboratory 961427 (John Peterson and Bill McLaughlin)
for web-based modeling of spacecraft and mission design, and (3) Department of
the Interior under ATLSS Project contract 14-45-0009-1544-154 (Don DeAngelis,
University of Miami) for techniques for both code and model integration for the
across-trophic-level Everglades .. --. it, \\ i !i. L their help and encouragement,
our research would not be possible.


REFERENCES
BARR, A. AND FEIGENBAUM, E. A. 1981. The Handbook of Artificial Intelligence. William
Kaufmann.
BURNS, A. AND WELLINGS, A. J. 1994. Hrt-hood: A structured design method for hard
real-time systems. Real-Time Systems 6, 73-114.
CAUGHLIN, D. AND SISTI, A. 1997. A summary of model abstraction techniques. In Pro-
ceedings of SPIE97 (1997), pp. 2-13.
CPLEX. 1995. Using the CPLEX Callable i CPLEX Optimization, Inc.
CUBERT, R. M. AND FISHWICK, P. A. 1997. Moose: An object-oriented i....;i ..... and
simulation ;..I.1i. .i'... framework. Simulation 6.
D'AMBROSIO, B. 1989. Resource bounded-agents in an uncertain world. IJCAI.
DIGITAL. 1989. CASE for Real-Time Systems Symposium. Digital C(.... ih;. Andover,
MA.















A Modeling Framework for Real-Time Systems


FISHWICK, P. A. 1995. Simulation Model Design and Execution: I ... L' . Worlds.
Prentice Hall.
FISHWICK, P. A. 1997. A Visual ( .i.-.. Oriented I ull ....... i ... Design Approach for Phys-
ical ....I. l,- I of Florida Technical Report 9.
GAREY, M. R. AND JOHNSON, D. S. 1979. Computers and intractability. W.H. Freeman and
company.
GARVEY, A. J. AND LESSER, V. R. 1993a. Design-to-time real-- ;... .l.,li;... IEEE Trans-
actions on Systems, Man and Cybernetics 23, 6, 1491-1502.
GARVEY, A. J. AND LESSER, V. R. 1993b. A survey of research in deliberative real-time
artificial -i. II-. .... UMass Computer Science Technical Report 93-84.
GARVEY, A. J. AND LESSER, V. R. 1995. Design-to-time 1. .1,.i; ill uncertainty. UMass
Computer Science Technical Report 95-03.
GETTYS, E. AND KELLER, F. 1989. \ McGraw-Hill.
HORST F. WEDDE, B. K. AND HUIZINGA, D. M. 1994. Formal timing analysis for distributed
real-time programs. Real-Time Systems 7,1, 58-90.
KOPETZ, H., ZAINLINGER, R., FOHLER, G., KANTZ, H., PUSCHNER, P. AND SCHUTZ, W. 1991.
The design of real-time systems: from I... .ii..n to implementation and verification.
Software Engineering 6, 72-82.
KORF, R. E. 1990. D. I.li i;,,,..1 search for real-time problem solving. Real-Time Sys-
tems 2, 7-24.
LARK, J. S., LEE D. ERMAN, STEPHANIE FORREST AND KIM P. GOSTELOW. 1990. Concepts,
methods, and languages for i.l;i.;,,I timely 1;.1 ii; ,I systems. Real-Time Systems 2, 127-
148.
LEE, K. AND FISHWICK, P. A. 1996. Dynamic Model Abstraction. In Proceedings of Winter
Simulation Conference (1996), pp. 764-771.
LEE, K. AND FISHWICK, P. A. 1997a. A semi-automated method for dynamic model ab-
straction. In Proceedings of AeroSense 97 (1997), pp. 31-41.
LEE, K. AND FISHWICK, P. A. 1997b. A methodology for dynamic model abstraction. Trans-
actions of the society for computer simulation international 13, 4, 217-229.
LEE, K. AND FISHWICK, P. A. 1998. Generation of multimodels and selection of the optimal
abstraction level for real-time simulation. In AeroSense 1998 (1998), pp. 164-175.
LIu, S. AND CHINGAND, Z. 1991. Algorithms for .1.. ,Li;1. imprecise computations. IEEE
Computer 24, 5, 58-68.
MARIN G. HARMON, T. B. AND WALLEY, D. B. 1994. A retargetable technique for i.. ;. i';
execution time of code segments. Real-Time Systems 7, 2, 130-159.
MASTERS, T. 1995. Neural, Novel and Hybrid i. for Time Series Prediction. John
Wiley and Sons, Inc.
RAMAMRITHAM, K. AND STANKOVIC, J. A. 1984. Dynamic task .i.. .li;. in distributed
hard real-time systems. IEEE Software 1, 3, 65-75.
RAVINDRAN, D. P. AND SOLBERG, J. J. 1987. Operations Research. John Wiley and Sons.
RUTLEDGE, G. W. 1995. Dynamic selection of models. Ph.D Dissertation, Department of
Medical Information Sciences, Stanford '
STANKOVIC, J. A., RAMAMRITHAM, K. AND CHENG, S. 1985. Evaluation of a flexible task
1I.. i1,,i. algorithm for distributed hard real-time systems. IEEE Transactions on Com-
puters 34, 12, 1130-1143.
WEISS, S. M. AND KAPOULEAS, I. 1989. An experimental comparison of pattern :...
neural nets, and machine learning classification methods. In In Proceedings of IJCAI-89
(1989), pp. 781-787.
ZEIGLER, B. P. 1976. of Modelling and Simulation. John Wiley and Sons.
ZEIGLER, B. P. 1990. ('.. Oriented Simulation with Hierarchical, Modular Models: In-
telligent Agents and Endomorphic Systems. Academic Press.


27




University of Florida Home Page
© 2004 - 2010 University of Florida George A. Smathers Libraries.
All rights reserved.

Acceptable Use, Copyright, and Disclaimer Statement
Last updated October 10, 2010 - - mvs