4
EDEVS : A Scalable DEVS Formalism for Event-Scheduling Based Parallel and Distributed Simulations Gang Liu, Yiping Yao, Shaoliang Peng School of Computer Science National University of Defense Technology Changsha, P.R. CHINA [email protected], [email protected], [email protected] Abstract—Scalability is very important for parallel and distributed simulations. Several techniques have been proposed to develop scalable synchronization strategies, communication services or fundamental algorithms, while little has been seen to deal with the modeling stage of the application. Learning from the HPC (High Performance Computing) lesson, it is clear that the time spent in developing a simulation application must be considered in evaluating the scalability of the application. There are many discrete event simulation platforms built for large parallel and distributed simulations, such as SPEEDES (Synchronous Parallel Environment for Emulation and Discrete Event Simulation), GTW (Georgia tech Time Warp), and YHSUPE, etc. They take Event-Scheduling as their modeling paradigm and have achieved great runtime performance, but lack in providing efficient modeling methods. To deal with this issue, a component-based specification, which can support hierarchical decomposition of large models and facilitate model reuse, is presented. This paper extends the DEVS (Discrete Event simulation specification) and proposes a component-based formalism, called EDEVS (Event- Scheduling Discrete Event simulation Specification) for the existing Event-Scheduling parallel and distributed simulation platforms. Key Words: Parallel and Distributed simulations, Event- Scheduling, Component-based Modeling, DEVS, Formalism I. INTRODUCTION Scalability is one of the major concerns in building large parallel and distributed simulations. To construct a scalable distributed simulation, we have to face following issues [1]: x Scalable synchronization strategies and logical correctness x Scalable communication services that portable to a wide variety of network configurations x Fundamental algorithms such as proximity detection and modeling environmental effects x Modeling methods that scale in terms of complexity and maintenance while providing maximal reusability The first three of the issues deal with runtime performance and the last one cope with modeling efficiency. Learning from the HPC lesson, it’s widely noticed that modeling efficiency is crucial to the scalability of simulations: efficient modeling methods will greatly reduce the time to construct simulations and speed up the simulation process, but inefficient ones will do the opposite. Efficient modeling methods for large parallel and distribute simulation should at least have the ability to: x Decompose large, complex models into small and simple ones hierarchically Large and complex systems are familiar in distributed simulations (environment, C4I weapon system .etc) and decomposing them hierarchically is the most effective way to do the modeling. x Provide simulations with composability Composability is the capability to select and assemble simulation components in various combinations into simulation systems to satisfy specific user requirements [2]. This ability enables the rapid, efficient, and flexible assembly of large simulation systems from simple components. x Provide models with self-contained characteristic The models of large simulations come from different companies, and are supposed to be developed separately and independently. To increase reusability and protect the manufacturer’s rights, models must be self- contained, so that they can be encrypted into .libs or .dlls independently. There are many widely used discrete-event simulation platforms built for large parallel and distributed simulations, such as SPEEDES [3, 4], GTW [5, 6] and YHSUPE [7], etc. They take Event-Scheduling as their modeling paradigm and have achieved great runtime performance, but fail to provide an easy way to achieve the goals mentioned above. To accommodate this issue, this paper provides a component- based DEVS formalism called EDEVS which can format Event-Scheduling paradigm into a component-base one, making the construction of large simulations easier and more efficient. There are many existing modeling related theories, including DEVS [8], semantic descriptors [9], Base Object Models [10], denotational semantics [11], model-based systems engineering [12], interoperability analysis [13], and semantic composability theory [14, 15]. The difference between EDEVS and the theories mentioned above is that EDEVS aims at providing a component-based modeling specification for the existing Event-Scheduling based 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications 1550-6525/09 $26.00 © 2009 IEEE DOI 10.1109/DS-RT.2009.27 239

[IEEE 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications - Singapore, Singapore (2009.10.25-2009.10.28)] 2009 13th IEEE/ACM International

Embed Size (px)

Citation preview

Page 1: [IEEE 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications - Singapore, Singapore (2009.10.25-2009.10.28)] 2009 13th IEEE/ACM International

EDEVS : A Scalable DEVS Formalism for Event-Scheduling Based Parallel and Distributed Simulations

Gang Liu, Yiping Yao, Shaoliang Peng School of Computer Science

National University of Defense Technology Changsha, P.R. CHINA

[email protected], [email protected], [email protected]

Abstract—Scalability is very important for parallel and distributed simulations. Several techniques have been proposed to develop scalable synchronization strategies, communication services or fundamental algorithms, while little has been seen to deal with the modeling stage of the application. Learning from the HPC (High Performance Computing) lesson, it is clear that the time spent in developing a simulation application must be considered in evaluating the scalability of the application. There are many discrete event simulation platforms built for large parallel and distributed simulations, such as SPEEDES (Synchronous Parallel Environment for Emulation and Discrete Event Simulation), GTW (Georgia tech Time Warp), and YHSUPE, etc. They take Event-Scheduling as their modeling paradigm and have achieved great runtime performance, but lack in providing efficient modeling methods. To deal with this issue, a component-based specification, which can support hierarchical decomposition of large models and facilitate model reuse, is presented. This paper extends the DEVS (Discrete Event simulation specification) and proposes a component-based formalism, called EDEVS (Event-Scheduling Discrete Event simulation Specification) for the existing Event-Scheduling parallel and distributed simulation platforms.

Key Words: Parallel and Distributed simulations, Event-Scheduling, Component-based Modeling, DEVS, Formalism

I. INTRODUCTION Scalability is one of the major concerns in building large

parallel and distributed simulations. To construct a scalable distributed simulation, we have

to face following issues [1]: Scalable synchronization strategies and logical

correctness Scalable communication services that portable to a

wide variety of network configurations Fundamental algorithms such as proximity detection

and modeling environmental effects Modeling methods that scale in terms of complexity

and maintenance while providing maximal reusability

The first three of the issues deal with runtime performance and the last one cope with modeling efficiency. Learning from the HPC lesson, it’s widely noticed that

modeling efficiency is crucial to the scalability of simulations: efficient modeling methods will greatly reduce the time to construct simulations and speed up the simulation process, but inefficient ones will do the opposite.

Efficient modeling methods for large parallel and distribute simulation should at least have the ability to:

Decompose large, complex models into small and simple ones hierarchically

Large and complex systems are familiar in distributed simulations (environment, C4I weapon system .etc) and decomposing them hierarchically is the most effective way to do the modeling. Provide simulations with composability Composability is the capability to select and assemble simulation components in various combinations into simulation systems to satisfy specific user requirements [2]. This ability enables the rapid, efficient, and flexible assembly of large simulation systems from simple components. Provide models with self-contained characteristic The models of large simulations come from different companies, and are supposed to be developed separately and independently. To increase reusability and protect the manufacturer’s rights, models must be self-contained, so that they can be encrypted into .libs or .dlls independently.

There are many widely used discrete-event simulation platforms built for large parallel and distributed simulations, such as SPEEDES [3, 4], GTW [5, 6] and YHSUPE [7], etc. They take Event-Scheduling as their modeling paradigm and have achieved great runtime performance, but fail to provide an easy way to achieve the goals mentioned above. To accommodate this issue, this paper provides a component-based DEVS formalism called EDEVS which can format Event-Scheduling paradigm into a component-base one, making the construction of large simulations easier and more efficient.

There are many existing modeling related theories, including DEVS [8], semantic descriptors [9], Base Object Models [10], denotational semantics [11], model-based systems engineering [12], interoperability analysis [13], and semantic composability theory [14, 15]. The difference between EDEVS and the theories mentioned above is that EDEVS aims at providing a component-based modeling specification for the existing Event-Scheduling based

2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications

1550-6525/09 $26.00 © 2009 IEEEDOI 10.1109/DS-RT.2009.27

239

Page 2: [IEEE 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications - Singapore, Singapore (2009.10.25-2009.10.28)] 2009 13th IEEE/ACM International

simulation platforms (GTW, SPEEDES, and YHSUPE), improving their scalability in the construction of large simulations, and EDEVS can be mapped to Event-Scheduling paradigm easily and directly.

The paper is structured as follows: Section 2 reviews Event-Scheduling world view. Section 3 presents the EDEVS formalism. Section 4 gives an example of modeling with EDEVS. Finally, conclusions will be made with an indication of future work.

II. EVENT-SCHEDULING WORLD VIEW Event-Scheduling is another world view which can be

used to construct DES (Discrete Event Simulation) models, and yields efficient implementations quite straightforwardly when the model is to be written in a lower level language. DES works by advancing simulated time directly from one event to another. Intervals of time between events are of no interest, because by definition nothing is happening during those intervals [16].

Every event has the form of , , ,T S R M , where T is the time indicates when this event will occur, S indicates the dispatcher of this event, R indicates who will handle this event, M is the information carried in this event.

When receives an event, the event handler just have to update the relevant states and schedule the corresponding events. Specification of a DES model therefore consists of Defining the state variables Defining the state transitions corresponding to events Defining the scheduling relationships between events

During the construction of a large simulation, it’s impossible to draw the relationships out at one time, we need to split it into small models, build these models separately, and then put them together to form the simulation and make them reusable for other simulations. So a component-based specification is needed.

DEVS is a component formulism borrows from systems theory. It takes its advantage in Modeling and Simulation (M&S) area for two reasons. First, it has a natural software reuse view when regarding the component as a basically reuse element. Second, it has the ability to model complex systems by recursively dividing the initial system into smaller sub-systems [17]. But put time and money into consideration, it is unadvisable to modify the existing simulation platforms to obey the simulator specification of DEVS. Extending DEVS to fit the existing simulation platform’s Event-Scheduling world view is preferred.

III. EDEVS FORMALISM EDEVS formalism is defined as follows:

A. Atomic model of EDEVS A basic EDEVS is a structure

m m m ie con eid, , , , , , , , , where{( , ) | , }

is the set of input ports and values{( , ) | , }

is the set of output ports and values

m p

m p

M X Y K S Init f eaX p v p IPorts v X

Y p v p OPorts v Y

={"cancelOP"}{( , ) | " ", int or , }

is the set of inner ports and values( ) (int) is an id generator for

the next risk output to t

m p

eid

InnerPorts OtherPortsK p v p cancelOP v p OtherPorts v K

f OPorts OtherPortshe port in

the "cancelOP" port takes an id generated by and cancel theoutput specified by the id immediately

eid

OPorts OtherPortsf

ie {( , ) | ,0 }is a set of init events : ( ) is the state transition function

: ( ) is the confluent transition function

: ( ) ( ) is the output function

: (

m

m m

bcon m m

bm m m m

m

Init p t p K tX K S S

X K S S

X K S K Y

ea K 0,) is the time advance function of the eventmY S R

IPorts InnerPortsIPorts OPortsOPorts InnerPorts

Unlike PDEVS, a basic EDEVS system has three kinds of ports: input ports, inner ports and output ports, with the inner ports private to the system. At any time the system is at some state s. If any event occurs (external event from any input port or inner event from any inner port), the system changes to state s’= (x,s) .After this change, it schedules its outputs to some inner ports or output ports according to (x, s’). If the schedule is not canceled, the target ports will receive the outputs at some simulation time computed by function ea (target port, s’).

B. Coupled model of EDEVS A coupled model is an interconnection of existing atomic

or coupled models. Formally, it is a structure N defined as , , D ,{ | } , , ,dN X Y M d D E IC EO C IC , where

X is the set of input ports and values. Y is the set of output ports and values. D is the names of subcomponents. Md is the EDEVS model of the subcomponent d. EIC is the external input coupling connects external inputs to component inputs. EOC is the external output coupling connects component outputs to external outputs. IC is the internal coupling connects component outputs to component inputs. Coupling is actually based on port interconnections. An

external input coupling, for instance, is a binding from an input port of the coupled model to a matching input port of an internal component, and so forth. In the case an internal component is itself a coupled model, composition naturally generates a hierarchical model.

IV. EXAMPLE OF MODELING WITH EDEVS Take the modeling of a destroyer as an example. The

destroyer may receive there kind of signals: signal from the air warning radar (short for awr), signal from naval warning

240

Page 3: [IEEE 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications - Singapore, Singapore (2009.10.25-2009.10.28)] 2009 13th IEEE/ACM International

radar (short for nwr) and signal from sonar (short for son), the C4I system of the destroyer will take the signals and decide whether it have to, and when to fire ship-to-air missiles (short for sam), anti-ship missiles (short for asm) or torpedoes (short for tpd). For simplicity, suppose the C4I model is provided by its manufacturer, and is encrypted into

a .dll file with three functions (AwrHandler, NwrHandler and SonHandler) exposed to users. These functions will handle awr, nwr and son respectively and separately. What we need to do is call the functions to see whether and when to fire the sam, asm or tpd, and then make the right outputs.

The description of the model using EDEVS is in Table 1.

sam sam asm asm tpd tpd

ie

{"awr","nwr","son"}, {"sam","asm","tpd"}, {( , ) | , }

{( , ) | , }, {Time ,Target ,Time ,Target ,Time ,Target }

, first come first service(

m p

m p

con

IPorts OPort X p v p IPorts v X

Y p v p OPorts v Y S

Init

sam sam asm asm tpd tpd

t awr tar awr asm asm tpd tpd fire awr

sam sam

Time ,Target ,Time ,Target ,Time ,Target , ("awr",signal) )

P ( (signal)),P ( (signal)),Time ,Target ,Time ,Target if P ( (signal))=true =

Time ,Target ,Time

f f f

asm asm tpd tpd

sam sam asm asm tpd tpd

sam sam t nwr tar nwr tpd tpd fi

,Target ,Time ,Target else

( Time ,Target ,Time ,Target ,Time ,Target , ("nwr",signal) )

Time ,Target ,P ( (signal)),P ( (signal)),Time ,Target if P=

f f re nwr

sam sam asm asm tpd tpd

sam sam asm asm tpd tpd

sam sam asm as

( (signal))=true

Time ,Target ,Time ,Target ,Time ,Target else

( Time ,Target ,Time ,Target ,Time ,Target , ("nwr",signal) )

Time ,Target ,Time ,Target=

f

m t son tar son fire son

sam sam asm asm tpd tpd

sam sam asm asm tpd tpd

,P ( (signal)),P ( (signal)) if P ( (signal))=true Time ,Target ,Time ,Target ,Time ,Target else

( Time ,Target ,Time ,Target ,Time ,Target , ("awr"

f f f

sam fire awr

sam sam asm asm tpd tpd

sam

sam sam asm asm tpd tpd

,signal) )

<"sam",Target if P ( (signal))=true=

else("sam", Time ,Target ,Time ,Target ,Time ,Target )

Time( Time ,Target ,Time ,Target ,Time ,Target ,

f

ea

asm fire nwr

sam sam asm asm tpd tpd

asm

sam sam asm asm tpd

("nwr",signal) )

<"asm",Target if P ( (signal))=true=

else("asm", Time ,Target ,Time ,Target ,Time ,Target )

Time( Time ,Target ,Time ,Target ,Time ,Targe

f

ea

tpd

tpd fire awr

sam sam asm asm tpd tpd

tpd

awr nwr son

t , ("son",signal) )

<"tpd",Target if P ( (signal))=true=

else("tpd", Time ,Target ,Time ,Target ,Time ,Target )

Time

where , , are the functions handling

f

ea

f f f

t

tar

fire

the signalsP is the projection on "time" denotes the delay before fireP is the projection on "target to fire"P is the projection on a boolean value denotes "fire or not"

Table 1 EDEVS description of the Destroyer

241

Page 4: [IEEE 2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications - Singapore, Singapore (2009.10.25-2009.10.28)] 2009 13th IEEE/ACM International

To facilitate the use of EDEVS we have developed a graphic editor for it recently, see Fig 1.

Figure 1 graphic editor for EDEVS atomic model

In the graphic editor, every element in EDEVS is represented by a corresponding graphic element. Users can construct the model by simple drag and drop, and fill in some information, such as the name of the ports, the name of the states, and the type of the states, etc. When the model is completed, it will be saved in an xml file, and we can use it to generate code for different Event-Scheduling platforms by implementing corresponding interpreters.

V. CONCLUTION AND FUTURE WORK Scalability is very important for parallel and distributed

simulations. There are tow points concerning to scalability, one is runtime performance scalability, the other is modeling scalability. On one side, much work has been done related to building simulations with highly scalable runtime performance, for example, building scalable synchronization strategies and logical correctness, constructing scalable communication services that portable to a wide variety of network configurations and creating fundamental algorithms such as proximity detection and modeling environmental effects. On the other side, modeling scalability has been neglect for a long time, and many Event-Scheduling based simulation platforms with high runtime performance but poor modeling scalability have been built, and unfortunately they have been widely used (GTW, SPEEDES and YHSUPE, etc). As simulations become larger and more complex, it is gradually realized that in order to construct large simulations efficiently, a modeling specification is needed to provide an easy way to decompose large, complex models into small and simple ones hierarchically, provide models with self-contained characteristic and provide simulations with composability. DEVS is a good component-based specification, but making the existing platforms conform to DEVS simulator specification is a huge work, and is error-proneness, so we developed EDEVS. To facilitate the use of EDEVS we have developed a graphic editor. This editor provides some graphic elements to construct EDEVS models, and save them in xml files. Our

next work is to build an interpreter to generate code for YHSUPE from the xml file created by the editor.

ACKNOWLEDGMENT This work has been funded by the Foundation of

Doctoral Scholarship in china (No. 200899980004), the National Science Foundation of China (No. 60773019).

REFERENCES [1] Steinman Jeff, “Scalable Distributed Military Simulations Using the

SPEEEDS Object-Oriented Simulations Framework,” In the proceedings of the Object-Oriented Simulation Conference(OOS’98), pages 3-23, 1998.

[2] E. W. Weisel, M. D. Petty, and R. R. Mielke, “A Comparison of DEVS and Semantic Composability Theory,” Proceedings of the Spring 2005 Simulation Interoperability Workshop, San Diego CA, April 3-8 2005.

[3] Steinman Jeff, “SPEEDES: Synchronous Parallel Environment for Emulation and Discrete Event Simulation,” in proceedings of Advances in Parallel and Distributed Simulation, Pages 95-103, 1991.

[4] Bailey Chris, McGraw Robert, Steinman Jeff, and Wong Jennifer, “SPEEDES: A Brief Overview,” In proceedings of SPIE,Enabling Technologies for Simulation Science V, Pages 190-201, 2001.

[5] Kalyan S.Perumalla and Richard.M.Fujimoto, “GTW++ An Object-oriented Interface in C++ to the Georgia Tech Time Warp System,” Georgia Institute of Technology, 1996.

[6] Richard.M.Fujimoto, S.R.Das, and K.S.Panesar, “Georgia Tech Time Warp programmer’s manual,” Technical report, College of Computing, Georgia Institute of Techmology, Atlanta, GA, july 1994.

[7] YAO Yi-ping, ZHANG Ying-xing, “Solution for Analytic Simulation Based on Parallel Processing,” journal of system simulation, vol.20, no.24 , Pages 6617-6621, 2008.

[8] B.P.Zeigler, H. Praehofer, and T. G. Kim, “Theory of Modeling and Simulation,” 2nd ed. Academic Press, 2000.

[9] S. Kasputis, I. Osvalt, R. McKay, and S. Barber, “Semantic Descriptors of Models and Simulations”, Proceedings of the Spring 2004 Simulation Interoperability Workshop, Arlington VA, April 18-23 2004.

[10] Simulation Interoperability Standards Organization, “Base Object Model (BOM) Template Specification Volume I – Interface BOM, SISO-STD-003.1-TRIAL-USE-V0.9,” July 23 2004, On-line at http://www.boms.info/spec/BOM_VolI_v0_9_trialuse.pdf.

[11] P. D. Mosses, “Denotational semantics,” in J. van Leeuwen (Ed.), Handbook of Theoretical Computer Science, Vol. B - Formal Models and Semantics, Elsevier, Amsterdam The Netherlands 1990, pp. 573-631.

[12] W. Wymore, “Model-Based Systems Engineering,” CRC Press, Boca Raton FL, 1993.

[13] S. Y. Harmon, “Interoperability between Distributed Simulations I: Interacting Models of Physical Processes,” Proceedings of the 15th Workshop on the Interoperability of Distributed Interactive Simulation, Orlando FL, September 16-20 1996.

[14] M. D. Petty, E. W. Weisel and R. R. Mielke, “A Formal Approach to Composability,” Proceedings of the 2003 Interservice/Industry Training,Simulation and Education Conference, Orlando FL, December 1-4 2003, pp. 1763-1772.

[15] M. D. Petty and E. W. Weisel, “A Formal Basis for a Theory of Semantic Composability,” Proceedings of the Spring 2003Simulation Interoperability Workshop, Orlando FL, March 30-April 4 2003, pp. 416-423.

[16] Paul.J.Sanchez, “AS SIMPLE AS POSSIBLE,BUT NO SIMPLER:A GENTLE INTRODUCTION TO SIMULATION MODELING,” in proceedings of the winter simulation conference,2006,pp.2-10.

[17] Olivier Dalle MASCOTTE project, “Component-based Discrete Event Simulation Using the Fractal Component Model,” inria-00141624, version 1-13, Apr 2007.

242