Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds.

Similar documents
MODELING AND SIMULATION OF THRESHOLD ANALYSIS FOR PVFS IN WIRELESS SENSOR NETWORKS

Integration of analytic model and simulation model for analysis on system survivability

DEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems

An XML-based DEVS Modeling Tool to Enhance Simulation Interoperability

Methodology for Automatic Synthesis of Wargame Simulator using DEVS

Framework for Component-based Modeling/Simulation of Discrete Event Systems

DEVS and DEVS Model. Dr. Xiaolin Hu. Dr. Xiaolin Hu

Parametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology

CoSMoS: A Visual Environment for Component-Based Modeling, Experimental Design, and Simulation

DEVSJAVA: Basis for a DEVS-based Collaborative M&S Environment

Modeling State-Based DEVS Models in CD++

Lect 7: DEVS Model Reuse and Schedule Conflict

A PROPOSAL OF USING DEVS MODEL FOR PROCESS MINING

Integrating Simulation Capabilities in SysML using DEVS

Support for Hierarchical Modular Component-based Model Construction in DEVS/HLA 1

Multifaceted Modeling and Simulation Framework for

Editing/Creating FDDEVS model Couplings using System Entity Structures

A CO-DESIGN MODELING APPROACH FOR COMPUTER NETWORK SYSTEMS

AN OBJECT-ORIENTED VISUAL SIMULATION ENVIRONMENT FOR QUEUING NETWORKS

Sungkyunkwan University, Suwon 16419, Republic of Korea 2 College of Software Sungkyunkwan University Suwon 16419, Republic of Korea

Implementation of the DEVS Formalism over the HLA/RTI: Problems and Solutions 1

Interoperability among Parallel DEVS Simulators and Models Implemented in Multiple Programming Languages

MULTI-FORMALISM MODELING APPROACH FOR SEMICONDUCTOR SUPPLY/DEMAND NETWORKS. Karl G. Kempf

UML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT

Towards a Formal Standard for Interoperability in M&S/System of Systems Integration. Outline

Advanced M&S Methodologies: Multimodels and Multisimulations*

A DEVS LIBRARY FOR LAYERED QUEUING NETWORKS

MULTI-FORMALISM MODELING APPROACH FOR SEMICONDUCTOR SUPPLY/DEMAND NETWORKS. Karl G. Kempf

Fault Tolerant Framework in MPI-based Distributed DEVS Simulation

SYSTEM ENTITY STRUCTURES FOR SUITES OF SIMULATION MODELS

OPTIMIZING PRODUCTION WORK FLOW USING OPEMCSS. John R. Clymer

A DEVS-BASED FRAMEWORK FOR SIMULATION OPTIMIZATION: CASE STUDY OF LINK-11 GATEWAY PARAMETER TUNING

DEVS modeling of Traffic in AToM3. Presented by Ximeng Sun April 11, 2005

AGENT-BASED DISCRETE-EVENT HYBRID SPACE MODELING APPROACH FOR TRANSPORTATION EVACUATION SIMULATION. Wai Kin (Victor) Chan

Virtual Plant for Control Program Verification

An integrated framework for automated simulation of SysML models using DEVS

eudevs: Executable UML with DEVS Theory of Modeling and Simulation

Concepts for Model Compilation in Hardware/Software Codesign

DEVSML 2.0: The Language and the Stack

BEHAVIORAL MODEL SPECIFICATION TOWARDS SIMULATION VALIDATION USING RELATIONAL DATABASES. Shridhar Bendre

DEVS-ON A-CHIP: IMPLEMENTING DEVS IN REAL-TIME JAVA ON A TINY INTERNET INTERFACE FOR SCALABLE FACTORY AUTOMATION

Causal Block Diagrams: Compiler to LaTeX and DEVS

A Practical Agent-Based Approach for Pattern Layout Design 1

DEVS: Past, Present, Future

DEFINING MODELS OF URBAN TRAFFIC USING THE TSC TOOL. Gabriel Wainer

PARTIAL-MODULAR DEVS FOR IMPROVING PERFORMANCE OF CELLULAR SPACE WILDFIRE SPREAD SIMULATION. Yi Sun Xiaolin Hu

BFS-DEVS: A General DEVS-Based Formalism For Behavioral Fault Simulation

The Relational Data Model and Relational Database Constraints

Advanced IDE for Modeling and Simulation of Discrete Event Systems

Modeling Crisis Management System With the Restricted Use Case Modeling Approach

Implementation of a Formal Standard for Interoperability in M&S/Systems of Systems Integration with DEVS/SOA

Data Hiding on Text Using Big-5 Code

DISTRIBUTED SUPPLY CHAIN SIMULATION IN A DEVS/CORBA EXECUTION ENVIRONMENT

Chapter 5. Relational Model Concepts 5/2/2008. Chapter Outline. Relational Database Constraints

Composability Test of BOM based models using Petri Nets

Chapter 5. Relational Model Concepts 9/4/2012. Chapter Outline. The Relational Data Model and Relational Database Constraints

An Agent Modeling Language Implementing Protocols through Capabilities

A Component-based Approach to Verified Software: What, Why, How and What Next?

Informal DEVS Conventions Motivated by Practical Considerations

Static Deadlock Detection in MPI Synchronization Communication

RESOURCE GRAPHS FOR MODELING LARGE-SCALE, HIGHLY CONGESTED SYSTEMS

Modeling and Verification of Networkon-Chip using Constrained-DEVS

Constructing distributed applications using Xbeans

Proceedings of the 2018 Winter Simulation Conference M. Rabe, A. A. Juan, N. Mustafee, A. Skoogh, S. Jain, and B. Johansson, eds.

A Design Method for Composition and Reuse Oriented Weaponry Model Architecture Meng Zhang1, a, Hong Wang1, Yiping Yao1, 2

A new approach to describe DEVS models using both UML State Machine Diagrams and Fuzzy Logic

Methodology for Efficient Design of Continuous/Discrete Co-Simulation Tool

The Study of Genetic Algorithm-based Task Scheduling for Cloud Computing

Cyber Physical System Verification with SAL

Grand Challenges in Modeling and Simulation: What Can DEVS Theory Do To Meet Them? Parts 1 and 2

DEVS-Based Simulation Web Services for Net-Centric T&E

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

CASE BASED REASONING A SHORT OVERVIEW

APPLICATION OF COMBINED DISCRETE-EVENT SIMULATION AND OPTIMIZATION MODELS IN SEMICONDUCTOR ENTERPRISE MANUFACTURING SYSTEMS. Hessam Sarjoughian

SIMULATION. Graphical modeling and simulation of discrete-event systems with CD++Builder

Simulating a Finite State Mobile Agent System

A Structured Approach to Simulation Modeling of Manufacturing Systems

Creating Ontology Chart Using Economy Domain Ontologies

Unit 1 Introduction to Software Engineering

Modeling & Simulation-Based Data Engineering

PROPOSED METHODOLOGY FOR COMPARING SCHEDULE GENERATION SCHEMES IN CONSTRUCTION RESOURCE SCHEDULING. Jin-Lee Kim

Denotational Semantics. Domain Theory

Model-based Run-Time Software Adaptation for Distributed Hierarchical Service Coordination

Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds.

AN ARCHITECTURAL FRAMEWORK FOR DISCRETE EVENT SIMULATION USING KNOWLEDGE-BASED REASONING. Lisa Winkler

DEVSView: A tool for visualizing CD++ simulation models

Modeling and Verification of Deadlock Potentials of a Concurrency Control Mechanism in Distributed Databases Using Hierarchical Colored Petri Net

Parallel DEVS and Process-Oriented Modeling in Modelica

Chapter 5. The Relational Data Model and Relational Database Constraints. Slide 5-١. Copyright 2007 Ramez Elmasri and Shamkant B.

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 5-1

AN AUTOMATED METHODOLOGY FOR NEGOTIATION BEHAVIORS IN MULTI-AGENT ENGINEERING APPLICATIONS

Design Patterns

PLATFORM INDEPENDENT SPECIFICATION OF SIMULATION MODEL COMPONENTS

CS:2820 (22C:22) Object-Oriented Software Development

HAI ZHOU. Evanston, IL Glenview, IL (847) (o) (847) (h)

21. Document Component Design

AN APPROACH FOR LOOSELY COUPLED DISCRETE EVENT SIMULATION MODELS AND ANIMATION COMPONENTS

Proceedings of the 2015 Winter Simulation Conference L. Yilmaz, W. K. V. Chan, I. Moon, T. M. K. Roeder, C. Macal, and M. D. Rossetti, eds.

THEORETIC INTERPLAY BETWEEN ABSTRACTION, RESOLUTION, AND FIDELITY IN MODEL INFORMATION. Il-Chul Moon Jeong Hee Hong

Formal Analysis of the ACE Specification for Cache Coherent Systems-On-Chip

Transcription:

Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds. A STRUCTURED DEVS MODEL REPRESENTATION BASED ON EXTENDED STRUCTURED MODELING Yunping Hu Jun Xiao Gang Rong Institute of Cyber-Systems and Control State Key Laboratory of Industrial Control Technology, Zhejiang University Hangzhou, Zhejiang 310027, P.R.C Xiaolin Hu Department of Computer Science Georgia State University Atlanta, GA 30303, USA ABSTRACT Developing a simulation model needs lots of costs. If the model elements can be reused in newly developed models of the same physical system, the modeling costs will be reduced. Traditional DEVS model representations depend on programming languages. A modeler is difficult to identify the DEVS semantics of model elements, which limits the reuse of existing models. In this paper, the structured modeling technology is used to represent DEVS models. A DEVS model is represented as a structured model. An atomic model can be represented as a genus graph and a modular tree, and a coupled model can be represented as elemental detailed tables. Based on the visual representation, models can be stored, maintained and reused easily. Two cases for the application of structured DEVS model representation are also presented. 1 INTRODUCTION Simulation modeling is a process of abstraction with consideration of some objective. Reuse of existing models can significantly reduce the modeling costs and improve the quality of simulation when developing new models for the same physical system.if a model can be represented as a structured format, where the model elements and the relations between elements can be represented visually, the model reusability will be improved significantly. In this paper, we focus on the reuse of existing models in the Discrete Event System Specification (DEVS) formalism (Zeigler, Praehofer, and Kim 2000), which has been used in discrete event simulation for more than 30 years. Traditional DEVS implementations, like DEVSJava (Sarjoughian and Zeigler 1998) and CD++ (Wainer 2002), are mainly developed in the object-orientation(oo) programming languages. An atomic DEVS model is usually represented by an OOP class, and the DEVS behaviors are modeled as methods of this class. The OO model representations have better usability and can be executed by simulators implemented in the same OO programming languages. However, it is difficult to identify the DEVS semantics of source codes in the programming environments, which influences the model reusability. 978-1-4799-7486-3/14/$31.00 2014 IEEE 2812

From the structured view, these model representations are structured with elements of package, class, attribute and method in the programming aspect. They are not structured in the DEVS aspect because their elements for representation have no clear DEVS semantics. Recently, some new DEVS modeling tools, which try to represent models in methods independent on sources codes, have been developed. In Component-based System Modeler (CoSMo), a system is modeled through three model types: template models, instance template models and instance models (Sarjoughian and Elamvazhuthi 2009). CoSMo visualizes the model structure as a tree, where each node corresponds to a port, a model or a component. AutoDEVS uses constrained natural language (NL) to define FDDEVS models and then elaborate models using source codes (Salas and Zeigler 2009). For better mode compositionality, AutoDEVS uses system entity structure (SES) to represent the model structure. However, SES cannot describe the model behavior. From the structured view, CoSMo and AutoDEVS both have a structured representation for the model structure, while they do not support a structured model behavior. Their representations of the model behavior depend on sources codes or are limited by FDDEVS. In this paper, we use Extended Structured Modeling (ESM) to represent a DEVS model as a structured model. For the atomic DEVS formalism, a specific ESM model schema for a general atomic model is proposed. For the coupled DEVS formalism, a specific ESM model schema for a coupled model class is proposed. In these two model schemas, a set of ESM genera and modules with clear DEVS semantics are defined. This model representation not only has a structured model structure, but also has a structured model behavior. Modelers can manage the model elements visually and can modify or reuse models conveniently. The remaining of this paper is structured as follows. In Section 2, we introduce ESM as the background knowledge. Section 3 describes the structured DEVS model representation based on ESM in detail. Applications and benefits of this representation are shown in Section 4, and conclusions and future work are discussed in Section 5. 2 EXTENDED STRUCTURED MODELING Structured Modeling (SM) is a kind of model representation based on discrete mathematics in the management science/operations research community (Geoffrion 1989). It uses a hierarchically organized, partitioned and attributed acyclic graph to represent a model. SM has five element types: 1. A primitive entity element is to represent any identifiable entity. 2. A compound entity element is a segmented tuple of primitive entity elements and/or other compound entity elements. 3. An attribute element, which may be constant or variable, is a segmented tuple of entity elements together with a value in some range. 4. A function element is a segmented tuple of elements together with a rule that calculate a particular value based on the attribute elements of the same tuple. 5. A test element is like a function element, except that its value is only true or false. However, SM focuses on the representation of static models vis-a-vis dynamic models. ESM (Lenard 1992, Lenard 1993) extends SM for representing discrete event simulation (DES) models and proposes three new elements: 1. A random attribute element is to represent a random variable. 2. An action element is to represent a change in a model element. 3. A transaction element is a combination of action elements associated with a control structure. The segmented tuple portion of an element is called its calling sequence. If one element appears in another calling sequence, the former is said to call the latter. ESM has been used to DES models in the event-oriented world view. Unfortunately, ESM has not been used to represent DEVS models. 2813

3 DEVS MODEL REPRESENTATION BASED ON ESM A structured model has two parts: a model schema and a model instance. A model instance is composed of elements and is represented as elemental tables. The elements with similarity can be treated as a genus. A model schema is composed of genera and is represented as a genus graph, where the genera are connected by calling sequences. A model schema can also be represented as a modular structure tree, where the rooted node and the intermediate nodes are modules and the leaves are genera. The structured DEVS model representation is developed based on ESM and the DEVS formalism, as shown in Figure 1. In this version, we focus on the Classic DEVS formalism. ESM Atomic DEVS ESM Coupled DEVS ESM modular level (modular tree) Atomic model template physical system genus level (genus graph) model schema Atomic Model Coupled model class initial states input sets physical system elemental level (elemental graph or elemental detail tables) model istance Simulation behavior of the atomic model Coupled Model Figure 1: The framework of the DEVS representation based on ESM An atomic model uses a series of variables (input or output variable, state variable) and rules (state transition function, output function) to represent a physical system. The simulation process of an atomic model describes the physical system completely in a time period. This process of a model is different, if the initial states or input events are different. Therefore, in the ESM view, various simulation initial states, input sets and results of an atomic model are treated as model instances, while the atomic model is treated as a model schema. Different atomic models in the DEVS formalism have some common features. In this paper, we develop an atomic model template which contains common genera for representing various atomic models. An atomic model of some physical system can be represented according to the template. The model instance of an atomic model is to represent the event-driven simulation behavior. A coupled DEVS model has no model behavior. In the genus and modular level, various coupled model share the same model schema. Using ESM, we develop a specific model schema for representing the coupled model class. A coupled model of some physical system is only an instance of this model schema. In the following, for describing the model schemas, three formats are used: Structuring Modeling Language (SML), genus graph and modular tree. SML is a kind of textual modeling language to represent a model schema in detail(geoffrion 1992a, Geoffrion 1992b). The model instances are represented as elemental tables. 3.1 Atomic DEVS Model Representation Based on ESM For representing the atomic DEVS model template, the SML schema is shown in Figure 2. It explains the modules and genera of the atomic DEVS model template in detail. The simulation process of an atomic DEVS model is event-driven. For describing the dynamic behavior, an EVENT primitive set is defined. Each event occurs in some time point and may cause the update of state variables. So each EVENT element has attributes of TIME VALUE, TIME ELAPSED VALUE, CURRENT STATE, CURRENT PHASE, CURRENT TIME ADVANCE, NEXT STATE, NEXT PHASE 2814

event STATE module t 0 t 1 t 2 t 3 t 4 t EVENTe /pe/ There is a list of EVENTS. TIME_VAL (EVENTe) /va/ : Int Every EVENT point has a TIME VALUE. E_VAL (EX_EVENTe) /va/ : Int Every EVENT point has a TIME ELAPSED VALUE. CUR_STATE (EVENTe) /va/ Every EVENT point has a CURRENT STATE. NXT_STATE (EVENTe) /va/ Every EVENT point has a NEXT STATE. CUR_PHASE (EVENTe) /va/ Every EVENT point has a CURRENT PHASE. NXT_PHASE (EVENTe) /va/ Every EVENT point has a NEXT PHASE. CUR_SIGMA (EVENTe) /va/ : Int Every EVENT point has a CURRENT TIME ADVANCE. NXT_SIGMA (EVENTe) /va/ : Int Every EVENT point has a NEXT TIME ADVANCE. EXTERNAL_TRANSITION module external event internal event t 0 t 3 t 4 INTERNAL_TRANSITION module t 1 t 2 t 3 t t INPUT_PORTip /pe/ There is a list of INPUT PORTs. EX_EVENT (EVENTe, INPUT_PORTip) /ce/ Select An EXTERNAL EVENT means an event from some input port. INPUT_VAL (EX_EVENTe,ip) /va/ {EX_EVENT} EXTERNAL_EVENT has an INPUT VALUE. EX_STATE_UPD (INPUT_VALe,ip, E_VALe,ip, CUR_STATEe, CUR_PHASEe, CUR_SIGMAe, NXT_STATEe, NXT_PHASEe, NXT_SIGMAe) /ac / {EX_EVENT} A EX_EVENT may result an EXTERNAL STATE UPDATE action, which is to calculate the value of NXT_STATE, NXT_PHASE or NXT_TIME based on INPUT_VAL, E_VAL, CUR_STATE, CUR_PHASE, CUR_SIGMA. EX_TEST (INPUT_VALe,ip, E_VALe,ip, CUR_STATEe, CUR_PHASEe, CUR_SIGMAe) /t/ {EX_EVENT} Before executing an EX_STATE_UPD, an EXTERNAL TEST OF INPUT VALUE, TIME ELAPSED VALUE and CURRENT STATE may be executed when an EX_EVENT comes. EX_TRANS (EX_STATE_UPDe,ip, EX_TESTe,ip) /tr/ {EX_EVENT} An EXTERNAL EVENT may result an EXTERNAL TRANSITION transaction which may call EX_STATE_UPD, EX_TEST in the same EX_EVENT point. IN_EVENT (EVENTe) /ce/ Select There is a list of INTERNAL EVENTs, a subset of EVENTs. IN_STATE_UPD (NXT_STATEe, NXT_PHASEe, NXT_SIGMAe, CUR_STATEe, CUR_PHASEe, CUR_SIGMAe) /ac / {IN_EVENT} An IN_EVENT may result an INTERNAL STATE UPDATE action, which is to calculate the value of NXT_STATE, NXT_PHASE, or NXT_SIGMA based on CUR_STATE, CUR_PHASE, CUR_SIGMA. IN_STATE_TEST (CUR_STATEe, CUR_PHASEe, CUR_SIGMAe ) /t/ {IN_EVENT} Before executing an IN_STATE_ UPD, an INTERNAL CURRENT STATE TEST may be executed as a condition when an IN_EVENT comes. IN_TRANS (IN_STATE_UPDe, IN_STATE_TESTe) /tr/ {IN_EVENT} An IN_EVENT may result an INTERNAL TRANSITION transaction which may call IN_STATE_UPD and IN_STATE_TEST in the same IN_EVENT point. output event OUTPUT module t 1 t 2 t 3 t OUTPUT_PORTop /pe/ There is a list of OUTPUT PORTs. OUTPUT_EVENT (IN_EVENTe, OUTPUT_PORTop) /ce/ Select There is an OUTPUT EVENT, if a model output is sent to some OUTPUT_PORT when an IN_EVENT occurs. OUTPUT_VAL (OUTPUT_EVENTe,op) /va/ {OUTPUT_EVENT} Every OUTPUT_EVENT has an OUTPUT VALUE. OUTPUT_STATE_TEST (CUR_STATEe, CUR_PHASEe, CUR_SIGMAe) /t/ {OUTPUT_EVENT} Before executing an OUTPUT_ASS, an OUTPUT CURRENT STATE TEST may be executed as a condition when an IN_EVENT comes. OUTPUT_ASS (OUTPUT_VALe,op, CUR_STATEe, CUR_PHASEe, CUR_SIGMAe) /ac / {OUTPUT_EVENT} A INTERNAL EVENT may result an OUTPUT ASSIGNMENT action, which is to get an OUTPUT_VAL value based on CUR_STATE, CUR_PHASE, CUR_SIGMA. OUTPUT_FUNC (OUTPUT_ASSe,op, IN_STATE_TESTe,op) /tr/ {OUTPUT_EVENT} A IN_EVENT may result an OUTPUT FUNCTION which may call OUTPUT_STATE_TEST and OUTPUT_ASS in the same OUTPUT_EVENT point. Figure 2: SML schema for the atomic DEVS model template 2815

and NEXT TIME ADVANCE. The phase variable and the time advance variable are inherent state variables in each atomic model. All events in a simulation are divided into external events and internal events. When an input comes into a model from outside, an external event occurs and the external transition function is called to update the state variables based on the present state, the input value and the time elapsed in the current state. Therefore, we define an EXTERNAL EVENT set, which is a compound set combining the EVENT set with the INPUT PORT set. Each EXTERNAL EVENT has the attributes of INPUT VALUE, actions of EXTERNAL STATE UPDATE and tests of EXTERNAL TEST. The EXTERANL TRANSITION transaction calls these actions and tests when an external event occurs. When the elapsed time equals to the time advance in the current state, an internal event occurs and the internal transition function is called to update the state variables based on the present state. We define an INTERNAL EVENT set, a subset of the EVENT set. An INTERNAL EVENT may have INTERNAL STATE UPDATE actions and the INTERNAL CURRENT STATE TESTs. The INTERANL TRANSITION transaction calls these actions and tests when an internal event occurs. When an internal event occurs, the output function will be called to send out message before the internal transition function is called. So, each internal event is also an output event which associates with an output port. We define an OUTPUT EVENT set which is a compound set combining the INTERNAL EVENT set with the OUTPUT PORT set. Each OUTPUT EVENT has an attribute of OUPUT VALUE and an OUTPUT ASSIGNMENT action and may have an OUTPUT CURRENT STATE TEST. The OUTPUT FUNCTION calls the action and the test when an output event occurs. In classic ESM, each attribute has a value range in consideration of the mathematical aspect. However, each attribute here has a simple or complex data type. Because the DEVS implementations depend on programming languages, the data type property is necessary for an attribute. For visualizing the atomic DEVS model template, the genus graph is shown in Figure 3. and the modular tree is shown in Figure 4. In this genus graph, the genera are connected as a directed graph through calling sequences. In this modular tree, the rooted node is the ATOMIC MODEL module and the intermediate notes have four module types: STATE, EXTERNAL TRANSITION, INTERNAL TRANSITION and OUPUT. tr: EX_TRANS tr: IN_TRANS tr: OUTPUT_FUNC ac: EX_STATE_UPD t: EX_TEST ac: IN_STATE_UPD t: IN_STATE_TEST t: OUTPUT_STATE_TEST ac: OUTPUT_ASS INPUT_VAL EX_EVENT E_VAL NXT_STATE NXT_PHASE NXT_SIGMA CUR_STATE CUR_PHASE CUR_SIGMA TIME_VAL IN_EVENT OUTPUT_VAL OUTPUT_EVENT INPUT_PORT EVENT OUTPUT_PORT Figure 3: Directed genus graph for the atomic DEVS model template Furthermore, the modular tree here explains how to represent an atomic model of some physical system based on the model template. A specific atomic model may have other state variable in addition to the phase variable and the time advance variable. So in the STATE module, specific CUR STATE attributes and NXT STATE attributes may be added. Each EXTERNAL TRANSITION module corresponds to an input port. The reason is that an atomic model may have different rules (actions and transactions) to change the state for different input ports. If an atomic model has more than one input ports, more than one EXTERNAL TRANSITION modules are needed. The OUTPUT module is similar with the EXTERNAL TRANSITION module and each OUTPUT module corresponds to only one output port. 2816

Module ATOMIC_MODEL Module STATE EXTERNAL_TRANSITION 1 EXTERNAL_TRANSITION 2... EXTERNAL_TRANSITION m INTERNAL_TRANSITION OUTPUT 1 OUTPUT 2... OUTPUT n Genus EVENT TIME_VAL E_VAL CUR_SIGMA NXT_SIGMA CUR_PHASE NXT_PHASE CUR_STATE: cur_var1, cur_var2,... NXT_STATE: var1, var2,... INPUT_PORT: inport1 EX_EVENT: inport_event1 INPUT_VAL: in_var1 EX_TEST: ex_t1, ex_t2,... EX_STATE_UPD: ex_upd1, ex_upd2,... EX_TRANS: ex_tr1, ex_tr2,... IN_EVENT IN_STATE_TEST: in_t1, in_t2,... IN_STATE_UPD: in_upd1, in_upd2,... IN_TRANS: in_tr1, in_tr2,... OUTPUT_PORT: outport1 OUTPUT_EVENT: output_event1 OUTPUT_VAL: out_var OUTPUT_STATE_TEST: out_t1, out_t2,... OUTPUT_ASS: out_a1, out_a2,... OUTPUT_FUNC: out_tr1, out_tr2,... Figure 4: Modular tree for the atomic DEVS model template A model instance of the model schema for the atomic model template can be represented as elemental detail tables, as show in Table 1. These tables only contain entities and value-based elements including primitive entities, compound entities, attributes and tests. The column names of these tables come from the model schema for the atomic model template. For an atomic model of some physical system, these elemental tables may be extended in terms of the extension of the model template. Table 1: Elemental detail tables for the model instance of the atomic DEVS model template Table Name EVENT INPUT PORT EX EVENT IN EVENT OUT PORT OUTPUT EVENT Column Name EVENT INTERP TIME VAL CUR STATE NXT STATE CUR PHASE NXT PHASE CUR SIGMA NXT SIGMA E VAL INPUT PORT INTERP EVENT INPUT PORT IN VAL EX TEST EVENT IN STATE TEST OUTPUT PORT INTERP EVENT OUTPUT PORT OUT VAL OUTPUT STATE TEST 3.2 Coupled DEVS Model Representation Based on ESM A coupled DEVS model only has elements of model structure. We define a series of primitive sets and compound sets in the model schema for the coupled DEVS model class. The SML representation of the coupled model class is show in Figure 5. A coupled model is composed of components, each of which associates with an atomic or coupled model. So, we define two primitive sets of MODEL and and a compound MODEL set. The ATOMIC MODEL set and the COUPLED MODEL set are both compound sets, subsets of the MODEL set. The components in a coupled model are connected by couplings: internal couplings (ICs), external input couplings (EICs) and external output couplings (EOCs). Therefore, we define three compound sets of IC, EIC and EOC. The select function can be represented as a set of ordered pairs, each element in which has one prioritized component and one or more than one concurrent components. So, we define a SELECT compound set which has two member COMPONET sets. 2817

MODELm /pe/ There is a list of MODELs. C_MODEL (MODELm) /ce/ Select There is a list of COUPLED MODELs, a subset of MODELs. A_MODEL (MODELm) /ce / Select There is a list of ATOMIC MODELs, a subset of MODELs. MODEL_INPUT_PORT (MODELm, INPUT_PORTip) /ce/ Select {MODEL} {INPUT_PORT} A MODEL INPUT PORT means that a MODEL has zero or more INPUT_PORTs. MODEL_OUTPUT_PORT (MODELm, OUTPUT_PORTop) /ce/ Select {MODEL} {OUTPUT_PORT} A MODEL OUTPUT PORT means that a MODEL has zero or more OUTPUT_PORTs. /pe/ There is a list of s. MODEL_ /ce/ Select {MODEL} {} A MODEL means that a associates with a MODEL. EOC (C_MODELm, OUTPUT_PORTop, c, OUTPUT_PORTop) /ce/ Select {C_MODEL} {OUTPUT_PORT} {} {OUTPUT_PORT} A EXTERNAL OUTPUT COUPLING represents a output coupling between a and a COUPLED_MODEL. EIC (C_MODELm, INPUT_PORTip, c, INPUT_PORTip) /ce / Select {C_MODEL} {INPUT_PORT} {} {INPUT_PORT} A EXTERNAL INPUT COUPLING represents a input coupling between a and a COUPLED_MODEL. IC (c, OUTPUT_PORTip, c, INPUT_PORTop) /ce/ Select {} {OUTPUT_PORT} {} {INPUT_PORT} A INTTERNAL COUPLING represents a internal coupling between a and another. SEL (c, c) /ce/ Select A SELECT FUNCTION has a set of ordered pairs where the first elements are prioritized components and the second elements are concurrent components. Figure 5: SML schema for the coupled DEVS model class Based on the SML schema for the coupled DEVS model class, the genus graph is shown in Figure 6 and the modular tree is shown in Figure 7. The rooted node of the modular tree is COUPLED MODEL, which has three intermediate nodes: MODEL, and COUPLING. The elemental detail tables for a coupled model are shown in Table 2. Modelers can write the coupled model elements for some physical system into these tables. EIC SEL IC EOC INPUT_PORT C_MODEL A_MODEL OUTPUT_PORT MODEL_INPUT_PORT MODEL_ MODEL MODEL_OUTPUT_PORT Figure 6: Directed genus graph for the coupled DEVS model class 4 CASES Based on the structured DEVS model representation, we can represent specific DEVS models. In this section, we use two cases to test the model representation and discuss the benefits using this method. 4.1 The Structured Representation of an Atomic Model We have defined an atomic model template based on ESM. In this section, we use the template to represent the processor model. The formal specification of the processor model is shown in Figure 8 The modular tree and the genus graph for the processor model is shown in Figure 9. There is a state variable named job in the processor model. Therefore, in the STATE module, specific CURRENT 2818

Module COUPLED_MODEL Module DEVS_MODEL COUPLING Genus MODEL A_MODEL C_MODEL INPUT_PORT OUTPUT_PORT MODEL_INPUT_PORT MODEL_OUTPUT_PORT MODEL_ EIC EOC IC SEL Figure 7: Modular tree for the coupled DEVS model class Table 2: Elemental detail tables for the model instance of the atomic DEVS model template Table Name MODEL A MODEL C MODEL INPUT PORT MODEL INPUT PORT OUTPUT PORT MODEL OUTPUT PORT EIC EOC IC SEL Column Name MODEL INTERP MODEL MODEL INPUT PORT INTERP MODEL INPUT PORT OUTPUT PORT INTERP MODEL OUTPUT PORT INTERP MODEL INPUT PORT INPUT PORT OUTPUT PORT MODEL OUTPUT PORT OUTPUT PORT INPUT PORT = <X, Y, S,δ ext,δ int,λ, ta> Where InPorts = { in }, where X in = R 0 + X = {(p,v) p InPorts, v X p } is the set of input ports and values OutPorts = { out }, where Y out = R 0 + Y = {(p,v) p OutPorts, v Y p } is the set of Output ports and values S = {phase, sigma, job} = { passive, active } R 0 + R 0 + ext( msg: type ExternalMessage ) { cur_job = job; cur_phase = phase; cur_sigma = sigma; if( msg.port== in ) { injob = msg.value; job = injob; if( cur_phase == passive ) { phase = active; sigma = 5;} else sigma = cur_sigma e; } int( msg: type InternalMessage ) { cur_phase = phase; cur_sigma = sigma; phase = passive; sigma = Inf; } ( msg: type InternalMessage ) { cur_job = job; outjob = cur_job; send outjob to out port; } ta( passive ) = ta( active ) = 5 Figure 8: The formal specification of the processor model 2819

STATE named cur job and specific NEXT STATE named job are defined. Because there is only one input port and one output port, there is one EXTERNAL TRANSITION module and one OUTPUT module in the modular tree. In the EXTERNAL TRANSITION module, the tr1 transaction genus calls the phase t test, the job ac1 action, the sigma ac1 action and the sigma ac3 action with the if-else control structure. There is no transaction in the OUTPUT module because there is only one action named outjob ass. In the INTERNAL TRANSITION module, the tr2 transaction calls the sigma ac2 action and the phase ac2 action with the sequential control structure. After simulation, we can get the model instance for the processor Module ATOMIC_MODEL: processor Module STATE EXTERNAL_TRANSITION 1 INTERNAL_TRANSITION OUTPUT 1 tr: tr1 EX_TRANS Genus EVENT TIME_VAL E_VAL CUR_SIGMA NXT_SIGMA CUR_PHASE NXT_PHASE CUR_STATE: cur_job NXT_STATE: job INPUT_PORT: in EX_EVENT: in_ex_event INPUT_VAL: injob EX_TEST: phase_t EX_STATE_UPD: phase_ac1, job_ac1, sigma_ac3 EX_TRANS: tr1 IN_EVENT IN_STATE_UPD: phase_ac2, sigma_ac2 IN_TRANS: tr2 OUTPUT_PORT: out OUTPUT_EVENT: out_output_event OUT_VAL: outjob OUTPUT_ASS: outjob_ac EX_TEST phase_t: CUR_PHASE == passive; EX_STATE_UPD job_ac1: job = injob; phase_ac1: NXT_PHASE = busy; sigma_ac1: NXT_SIGMA = 5; sigma_ac3: NXT_SIGMA = EX_TRANS CUR_SIGMA - E_VAL; tr1: if phase_t then job_ac1, sigma_ac1, phase_ac1 else sigma_ac3; IN_STATE_UPD phase_ac2: NXT_PHASE = passive; sigma_ac2: NXT_SIGMA = Inf; IN_TRANS tr2: sigma_ac2, phase_ac2; OUTPUT_ASS outjob_ac: outjob = cur_job; tr: tr2 IN_TRANS ac: job_ac1 EX_STATE_UPD t: phase_t EX_TEST ac: sigma_ac3 EX_STATE_UPD ac: phase_ac1 EX_STATE_UPD ac: sigma_ac1 IN_STATE_UPD ac: phase_ac2 IN_STATE_UPD ac: sigma_ac2 IN_STATE_UPD ac: out_ac OUTPUT_ASS injob INPUT_VAL E_VAL CUR_SIGMA CUR_PHASE job NXT_STATE NXT_PHASE cur_job CUR_STATE NXT_SIGMA outjob OUTPUT_VAL in_ex_event EX_EVENT out_output_event OUTPUT_EVENT in INPUT_PORT EVENT IN_EVENT out OUTPUT_PORT Figure 9: The modular tree and the genus graph for the processor model model. The initial states and input sets have been set before simulation. The initial phase is passive, the initial time advance is infinite and the initial value of the job variable is 0. There are three input events in the time points of 1 and 4. The elemental detail tables of this model instance are shown in Figure 10. There are several benefits for the structured representation of DEVS models. The modular tree and genus graph can represent an atomic model in a visual format. If the modeler does not use some variable in a newly developed model, the variable can be deleted and the actions and transaction calling the variable will be deleted automatically in the genus graph. The model instance shows the simulation results in detail. The modeler can choose corresponding tables to look at the state updates, input events or output events. 2820

Table Name: EVENT EVENT INTERP TIME_VAL CUR_PHASE NXT_PHASE CUR_SIGMA E_VAL NXT_SIGMA e1 in job 1 1 passive active Inf 1 5 e2 in job 2 4 active active 5 3 2 e3 out job 1 6 active passive 2 0 Inf cur_job job 0 12 12 12 12 12 Table Name: INPUT_PORT INPUT_PORT INTERP in Table Name: OUTPUT_PORT OUTPUT_PORT INTERP in job port out out job port Table Name: IN_EVENT EVENT e3 Table Name: in_ex_event EVENT INPUT_PORT injob phase_t e1 in 12 true e2 in 17 false Table Name: out_output_event EVENT OUTPUT_PORT e3 out outjob 12 Figure 10: Elemental detail tables for the processor model 4.2 The Structured Representation of an Coupled Model We have defined the coupled model class based on ESM. In this section, we use the model class to represent the EFP (Experiment Frame and ) model, as shown in Figure 11. The EFP model is a coupled DEVS model and has three components:, and. Each component associates with an atomic DEVS model. For example, is a component of the genr model. instop (genr) outjobg outjob (proc) outjobp inarriv (transd) insolved outstop Figure 11: EFP coupled model The EFP coupled model is represented as a model instance of the coupled model class. The elemental detail tables for this model instance are shown in Figure 12. The model elements of the EFP model are all listed in these tables. 5 CONCLUSION In this paper, we use the ESM to represent a DEVS model as a structured model. For the atomic DEVS formalism, we propose an atomic DEVS model template represented as an ESM model schema. This template contains basic modules and genera for the representation of various specific atomic models. The model instance for an atomic model is to represent the simulation behavior in some initial states and input sets. For the coupled DEVS formalism, we propose a coupled model class represented as an ESM model schema. A specific coupled model is a model instance of this model schema. The structured representation of DEVS models provides a visual format to build and maintain models. An atomic model can be represented as a modular tree or a genus graph. The modeler can add or delete model elements visually. Furthermore, the simulation behavior of an atomic model is represented as elemental detail tables in detail. The user can observe the simulation results conveniently. The model elements of a coupled model are stored in a series of tables, where they can be edited clearly. We are planning to develop a DEVS modeling platform to support the ESM model representation. A DEVS model is firstly represented as an ESM model, and then is transformed into a model executed by CD++ or DEVSJava. The DEVS models are created and maintained in a structured format in this platform. The Java language and the data base technology are used in developing this platform. 2821

Table Name: MODEL MODEL INTERP genr a generator atomic model proc a processor atomic model transd a transducer atomic model Table Name: INPUT_PORT INPUT_PORT INTERP instop stop job port injob in job port inarriv arrive job port insolved solved message port Table Name: ATOMIC_MODEL MODEL genr proc transd Table Name: OUTPUT_PORT OUTPUT_PORT outjobg outjobp outstop INTERP out job port out job port stop message port Table Name: INTERP a genr component a proc component a transd component Table Name: MODEL_INPUT_PORT MODEL INPUT_PORT genr instop proc injob transd inarriv transd insolved Table Name: MODEL_OUTPUT_PORT MODEL OUTPUT_PORT genr outjobg proc outjobp transd outstop Table Name: MODEL_ MODEL genr proc transd Table Name: IC OUTPUT_PORT INPUT_PORT outjobg outjobg injob inarriv outjobp outstop insolved injob Table Name: SEL Figure 12: Elemental detail tables for the EFP model ACKNOWLEDGEMENTS The financial supports from the National High Technology R&D programs of China (2012BAE05B03 & 2013AA040701) are gratefully acknowledged. REFERENCES Geoffrion, A. 1989. The Formal Aspects of Structured Modeling. Operations Research 37 (1): 30 51. Geoffrion, A. 1992a. The SML Language for Structured Modeling: Levels 1 and 2. Operations Research 40 (1): 38 57. Geoffrion, A. 1992b. The SML Language for Structured Modeling: Levels 3 and 4. Operations Research 40 (1): 58 75. Lenard, M. L. 1992. Extending the Structured Modeling Framework for Discrete-event Simulation. In Proceedings of the 25th Hawaii International Conference, 494 503. Los Alamitos, California: Institute of Electrical and Electronics Engineers, Inc. Lenard, M. L. 1993. A Prototype Implementation of a Model Management System for Discrete-Event Simulation Models. In Proceedings of the 25th Conference on Winter simulation, edited by G. W. Evans, M. Mollaghasemi, E. Russell, and W. Biles, 560 568. Los Angeles, California: Association for Computing Machinery. Salas, M. C., and B. P. Zeigler. 2009. AutoDEVS: a Methodology for Automating Modeling and Simulation Software Development and Testing of Interoperable Systems. The Journal of Defense Modeling and Simulation: Applications, Methodology, Technology 6 (1): 33 52. Sarjoughian, H. S., and V. Elamvazhuthi. 2009. CoSMoS: a Visual Environment for Component-based Modeling, Experimental Design, and Simulation. In Proceedings of the 2nd International Conference on Simulation Tools and Techniques, edited by O. Dalle, G. Wainer, L. Perrone, and G. Stea, 1 9. Rome, Italy: ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering). 2822

Sarjoughian, H. S., and B. P. Zeigler. 1998. DEVSJAVA: Basis for a DEVS-based Collaborative M&S Environment. In Proceedings of the International Conference on Web-based Modeling & Simulation, edited by P. Fishwick, D. Hill, and R. Smith, 29 36. San Diego, California: Society for Computer Simulation International. Wainer, G. 2002. CD++: a Toolkit to Develop DEVS Models. Software - Practice and Experience 32 (13): 1261 1306. Zeigler, B. P., H. Praehofer, and T. G. Kim. 2000. Theory of Modeling and Simulation: Integrating Discrete Event and Continuous Complex Dynamic Systems. 2nd ed. Academic Press. AUTHOR BIOGRAPHIES Yunping Hu is a doctor candidate of Control Science and Engineering at Zhejiang University in Hangzhou, China. He holds a M.S. in Control Science and Engineering from Nanjing University of Technology in Nanjing, China. His research interests include modeling & simulation, model management and decision support system. His email address is yphu@iipc.zju.edu.cn. Jun Xiao is a master candidate of Control Science and Engineering at Zhejiang University in Hangzhou, China. He earned his Bachelor s degree in Automation from Wuhan University in Wuhan, China. His research interests include DEVS modeling & simulation and mathematical knowledge management. His email address is jxiao@iipc.zju.edu.cn. Gang Rong is Professor of Control Science and Engineering at Zhejiang University in Hangzhou, China. His research interests cover modeling, simulation & optimization, data-ming, data visualization and enterprisecontrol system integration in process industries. He holds a Ph.D. in Control Science and Engineering from Zhejiang University in Hangzhou, China. His email address is grong@iipc.zju.edu.cn and his web page is http://mypage.zju.edu.cn/en/rglab. Xiaolin Hu is an Associate Professor in the Computer Science Department at Georgia State University, Atlanta, Georgia. He received his PhD degree from the University of Arizona, MS degree from the Chinese Academy of Sciences, and BS degree from the Beijing Institute of Technology in 2004, 1999, and 1996, respectively. His research interests include modeling and simulation theory and application, agent and multi-agent systems, and complex systems science. He has served as program chairs for several international conferences/symposiums in the field of modeling and simulation, and is an associate editor for Simulation: Transaction of The Society for Modeling and Simulation International. Dr Hu is a National Science Foundation (NSF) CAREER Award recipient. His email address is xhu@cs.gsu.edu. 2823