An Introduction to Modeling and Simulation with DEVS

Slides:



Advertisements
Similar presentations
2 Introduction A central issue in supporting interoperability is achieving type compatibility. Type compatibility allows (a) entities developed by various.
Advertisements

The 20th International Conference on Software Engineering and Knowledge Engineering (SEKE2008) Department of Electrical and Computer Engineering
Systems development using M&S based on the DEVS formalism Gabriel A. Wainer Department of Systems and Computer Engineering. Carleton University. Ottawa,
Timed Automata.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
Ch 3 System Development Environment
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
1 Coven a Framework for High Performance Problem Solving Environments Nathan A. DeBardeleben Walter B. Ligon III Sourabh Pandit Dan C. Stanzione Jr. Parallel.
DEVS-Based Simulation Web Services for Net-Centric T&E Saurabh Mittal, Ph.D. Jose L. Risco-Martin*, Ph.D. Bernard P. Zeigler, Ph.D. Arizona Center for.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Advanced Real-Time Simulation Laboratory Prof. Gabriel A. Wainer Dept. of Systems and Computer Engineering
Establishing the overall structure of a software system
© Copyright Eliyahu Brutman Programming Techniques Course.
DEVS and DEVS Model Dr. Feng Gu. Cellular automata with fitness.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Course Instructor: Aisha Azeem
System Integration Management (SIM)
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Review. A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A Ball_A Ball_B CFSM Player_A  : X  S  S X A = {Ball_A}
Introduction to Computer and Programming CS-101 Lecture 6 By : Lecturer : Omer Salih Dawood Department of Computer Science College of Arts and Science.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
PLC introduction1 Discrete Event Control Concept Representation DEC controller design DEC controller implementation.
Chapter 1 Introduction to Simulation
DEVS Today: Recent Advances in Discrete Event - Based Information Technology Bernard P. Zeigler Professor, ECE Arizona Center for Integrative Modeling.
An approach to Intelligent Information Fusion in Sensor Saturated Urban Environments Charalampos Doulaverakis Centre for Research and Technology Hellas.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
DEVS Namespace for Interoperable DEVS/SOA
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
EEL Software development for real-time engineering systems.
High Performance Embedded Computing © 2007 Elsevier Chapter 1, part 2: Embedded Computing High Performance Embedded Computing Wayne Wolf.
Salim Hariri HPDC Laboratory Enhanced General Switch Management Protocol Salim Hariri Department of Electrical and Computer.
Simulating Human Agropastoral Activities Using Hybrid Agent- Landscape Modeling M. Barton School of Human Evolution and Social Change College of Liberal.
© 2012 xtUML.org Bill Chown – Mentor Graphics Model Driven Engineering.
Parallel and Distributed Simulation Introduction and Motivation.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Previous experience n Background (Carleton / Ottawa U / Special ?) –Systems/Computer Engineering –Computer Science –Electronic/Electrical Engineering –Industrial/Mechanical.
By Ezequiel Glinsky Research Assistant, University of Buenos Aires, Argentina Supervisor: Prof. Gabriel A. Wainer SCE, Carleton University Thursday, November.
Why building models? n Cannot experience on the real system of interest n Cost n Danger n The real system does not exist Why using simulation? n Reduced.
A Context Model based on Ontological Languages: a Proposal for Information Visualization School of Informatics Castilla-La Mancha University Ramón Hervás.
Modelling DEVS applications The CD++ tool
Unifying Discrete and Continuous Simulation with Discrete Events: DEVS as the Next Modeling Standard Bernard P. Zeigler Arizona Center for Integrative.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Modeling with Parallel DEVS Serialization in DEVS models Select function Implicit serialization of parallel models E-DEVS: internal transition first,
Abstract A Structured Approach for Modular Design: A Plug and Play Middleware for Sensory Modules, Actuation Platforms, Task Descriptions and Implementations.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
DEVS and SES as a Framework for Modeling and Simulation Tool Development Bernard P. Zeigler Arizona Center for Integrative Modeling and Simulation University.
SOFTWARE ENGINEERING. Objectives Have a basic understanding of the origins of Software development, in particular the problems faced in the Software Crisis.
Internet of Things. IoT Novel paradigm – Rapidly gaining ground in the wireless scenario Basic idea – Pervasive presence around us a variety of things.
Transforming DEVS to Non-Modular Form For Faster Cellular Space Simulation Arizona Center for Integrative Modeling and Simulation Electrical and Computer.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
DEVS-based Modeling and Simulation References: 1.B. P. Zeigler, Hessam S. Sarjoughian, Introduction to DEVS Modeling and Simulation with JAVA: Developing.
Lecture VIII: Software Architecture
Approach and Techniques for Building Component-based Simulation Models Bernard P. Zeigler, Ph.D. Hessam S. Sarjoughian, Ph.D. Arizona Center for Integrative.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Extension du formalisme SES pour l’intégration de la hiérarchie d’abstraction et la granularité temporelle au sein de la modélisation et la simulation.
Copyright 1999 G.v. Bochmann ELG 7186C ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
Introduction To Modeling and Simulation 1. A simulation: A simulation is the imitation of the operation of real-world process or system over time. A Representation.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
Marilyn Wolf1 With contributions from:
Definition CASE tools are software systems that are intended to provide automated support for routine activities in the software process such as editing.
IP – Based Design Methodology
Model-Driven Analysis Frameworks for Embedded Systems
Approach and Techniques for Building Component-based Simulation Models
GENERAL VIEW OF KRATOS MULTIPHYSICS
A GUI Based Aid for Generation of Code-Frameworks of TMOs
DEVS Background DEVS = Discrete Event System Specification
Presentation transcript:

An Introduction to Modeling and Simulation with DEVS Gabriel A. Wainer Department of Systems and Computer Engineering Carleton University. Ottawa, ON. Canada. http://www.sce.carleton.ca/faculty/wainer Que voy a contar: . De donde vengo: transparencia de las cosas jerarquicas . Decir que estamos haciendo cosas en c/u de estos niveles . Un nivel: Cell-DEVS . Voy a contar que es Cell-DEVS . Voy a comparar con CA . Voy a mostrar algunos ejemplos de aplicacion, enfocando en los resultados - Fuego de Muzy - AVI del fuego de Muzy - Alguna 3D

Outline Problem characterization DEVS formalism The CD++ tool Modeling complex systems using DEVS Examples of application Some of the slides here presented are part of Prof. B. Zeigler’s collection (with permission!) http://www.acims.arizona.edu

Motivation Analysis of complex natural/artificial real systems. Continuous systems analysis Different mathematical formalisms Simulation: solutions to particular problems under certain experimental conditions of interest Classical methods for continuous systems simulation Based on numerical approximation Require time discretization Inefficient in terms of execution times Complex composition; difficulties in integration, multiresolution models

Evolution in simulation technology Reduced cost of modern computers Enhanced tools Statistical packages; application libraries Ease to use, flexibility Ease of analysis tasks Parallel/Distributed systems Enhanced visualization tools Standards (graphics, runtime support, distributed software)

Discrete-Event M&S Based on programming languages (difficult to test, maintain, verify). Beginning ’70s: research on M&S methodologies Improvement of development task Focus in reuse, ease of modeling, development cost reductions

Non-behavioral analysis (Performance analysis) DE Modeling and Simulation Example Safeness, Liveness Throughput Model type Untimed DES model Timed DES model Required information State sequence Timed state sequence Behavioral analysis (Func. Veri/logical analysis) Non-behavioral analysis (Performance analysis) Logic base Temporal Logic Genralized Semi- Markov process Min-Max algebra Process algebra CSP CCS FSM Petri net Automata Timed FSM Timed-PN Set/Bag theory DEVS formalism (Prof. T. G. Kim, KAIST, Korea)

Separation of concerns in DEVS Experimental Frame Device for executing model Real World Simulator Data: Input/output relation pairs simulation relation modeling relation Conditions under which the system is experimented with/observed Model Each entity formalized as a Mathematical Dynamic System (mathematical manipulations to prove system properties) Structure generating behavior claimed to represent real world

Current needs Interoperability: computer-based and non-computer-based systems support a wide range of models and simulations hybrid interoperability Reuse: model and simulation reuse (computer-based and otherwise) centralized and distributed data and model repositories Performance: Computational (local to each simulation) Communication (among multiple simulations)

Current practices Ad-hoc techniques, ignorance of previous recommendations for software engineering. Tendency to encapsulate models/simulators/experimental frames into tightly coupled packages, (written in programming languages such as Fortran, C/C++, Java). Difficulties: testing, maintainability of the applications, integration, software reuse. Relatively few examples of storing previously developed simulation infrastructure commodities such that they can be adapted to developing interoperability test requirements

DEVS M&S methodology DEVS can be used to solve the previously mentioned issues: Interoperability and reuse Hybrid systems definition Engineering-based approach Facilities for automated tasks Reduced life cycles High performance/distributed simulation

The DEVS M&S Framework (Zeigler, 1976/84/90/00) DEVS = Discrete Event System Specification Formal M&S framework Supports full range of dynamic system representation capability Supports hierarchical, modular model development (Zeigler, 1976/84/90/00)

The DEVS M&S Framework Separates Modeling from Simulation Derived from Generic Dynamic Systems Formalism Includes Continuous and Discrete Time Systems Provides Well Defined Coupling of Components Supports Hierarchical Construction Stand Alone Testing Repository Reuse Enables Provably Correct, Efficient, Event-Based, Distributed Simulation

A Layered view on M&S Applications Models Simulators (single/multi CPU/RT) Middleware/OS (Corba/HLA/P2P; Windows/Linux/RTOS…) Hardware (PCs/Clusters of PC/HW boards…)

A Layered view on M&S Applications Models Simulators (single/multi CPU/RT) Middleware/OS (Corba/HLA/P2P; Windows/Linux/RTOS…) Hardware (PCs/Clusters of PC/HW boards…)

Advantages of DEVS Models/Simulators/EF: distinct entities with their own software representations. Simulators can perform single host, distributed and real-time execution as needed (DEVS simulators over various middleware such as MPI, HLA, CORBA, etc.). Experimental frames appropriate to a model distinctly identified; easier for potential users of a model to uncover objectives and assumptions that went into its creation. Models/ frames developed systematically for interoperability Repositories of models and frames created and maintained (components for constructing new models). Models/frames stored in repositories with information to enable reuse.

DEVS Toolkits ADEVS (University of Arizona) CD++ (Carleton University) DEVS/HLA (ACIMS) DEVSJAVA (ACIMS) GALATEA (USB – Venezuela) GDEVS (Aix-Marseille III, France) JDEVS (Université de Corse - France) PyDEVS (McGill) PowerDEVS (University of Rosario, Argentina) SimBeams (University of Linz – Austria) New efforts in China, France, Portugal, Spain, Russia. 1/25

KAIST DEVSim- Agent HDEVSim DEVS formalism Hierarchical Modular DEVS M&S Environ. for Hybrid System DEVS M&S Environ for Mobile Agent DEVS formalism Hierarchical Modular Theory of DEVS M&S D-DEVSim++ Distributed DEVSim++ DEVSimHLA HLA-Compliant DEVSim++ DEVS-Scheme OO DEVS M&S Environment Using Scheme (LISP Dialect) DEVSim++ C++ based DEVS M&S Environment DEVSimJava Web based DEVS M&S Environment RT- DEVSim++ Real-time DEVSim++ DEVSim- COM Component-based DEVS M&S Env 1976 1984 1986 1992 1995 1997 1998 2000 1999 2001 Ph.D. Thesis M.S. Thesis Developed at KAIST Public S/W Technology transfer

DEVS Formalism (cont.) Discrete-Event formalism: time advances using a continuous time base. Basic models that can be coupled to build complex simulations. Abstract simulation mechanism

DEVS atomic models semantics y (3) x (5) s’ = d ext (s,e,x) (6) l (s) (2) D(s) (1) s s’ = d int (s) (4) DEVS = < X, S, Y, dint , dext , D, l >

DEVS atomic models semantics y (3) x (5) s’ = d ext (s,e,x) (6) l (s) (2) D(s) (1) s s’ = d int (s) (4) DEVS = < X, S, Y, dint , dext , D, l >

Coupled Models Components couplings Internal Couplings External Input Couplings External Output Couplings repair shop out sent finished repaired faulty generator (genr) transducer (transd) report stop start

Closure Under Coupling DN < X , Y, D, {Mi }, {Ii }, {Zi,j }> DEVS < X, S, Y, dint, dext, dcon, ta, l > Every DEVS coupled model has a DEVS Basic equivalent DEVS < X, S, Y, dint, dext, dcon, ta, l >

The CD++ toolkit Basic tool following DEVS formalism. Extension to include Cell-DEVS models. High level specification language for model definition.

CD++ simulator Independent simulation mechanisms (“Abstract” simulator) . Hierarchical . Flat . Distributed/Parallel . Real-Time

Auto-Factory DEVS model

DEVS Graphs Modeling environment

Engine Assembly Atomic Model EngineAssem::EngineAssem(const string &name):Atomic(name), in_piston(addInputPort( "in_piston") ), in_engineBody(addInputPort( "in_engineBody") ), done(addInputPort("done") ), out( addOutputPort("out")), manufacturingTime( 0, 0, 10, 0 ) { } // Model constructor Model &EngineAssem::externalFunction( const ExternalMessage &msg ) { if( msg.port() == in_piston ) { // parts received one by one elements_piston.push_back( 1 ) ; if( elements_piston.size() == 1 && elements_engineBody.size()>=1) holdIn(active, manufacturingTime ); for(int i=2;i<=msg.value;i++) //pushback if more than 1 received } if( msg.port() == in_engineBody ) { ... Model &EngineAssem::internalFunction( const InternalMessage & ) { passivate(); Model &EngineAssem::outputFunction( const InternalMessage &msg ) { sendOutput( msg.time(), out, elements.front());

Auto Factory execution X/00:000/top/in/2 to chassis X/00:000/top/in/2 to body X/00:000/top/in/2 to trans X/00:000/top/in/2 to enginesubfact D/00:000/chassis/02:000 to top D/00:000/body/02:000 to top D/00:000/trans/02:000 to top X/00:000/enginesubfact/ in/2 to piston X/00:000/enginesubfact/ in/2 to enginebody ... Y/02:000/chassis/out/1 to top D/02:000/chassis/... to top X/02:000/top/done/1 to chassis X/02:000/top/in_chassis/1 to finalass ... */02:000/top to enginesubfact */02:000/enginesubfact to enginebody Y/02:000/enginebody/out/1 to enginesubfact D/02:000/enginebody/... to enginesubfact X/02:000/enginesubfact/done/1 to enginebody X/02:000/in_enginebody/1 to engineassem D/02:000/enginebody/02:000 to enginesubfact D/02:000/engineassem/02:000 to enginesubfact ...

Auto Factory

DEVS Success Stories Prototyping and testing environment for embedded system design (Schulz, S.; Rozenblit, J.W.; Buchenrieder, K.; Mrva, M.) Urban traffic models (Lee, J.K.; Lee, J-J.; Chi, S.D.; et al.) Watershed Modeling (Chiari, F. et al.) Decision support tool for an intermodal container terminal (Gambardella, L.M.; Rizzoli, A.E.; Zaffalon, M.) Forecast development of Caulerpa taxifolia, an invasive tropical alga (Hill, D.; Thibault, T.; Coquillard, P.) Intrusion Detection Systems (Cho, T.H.; Kim, H.J.) Depot Operations Modeling (B. Zeigler et al. U.S. Air Force)

DEVS Success Stories Supply chain applications (Kim, D.; Cao H.; Buckley S.J.) Solar electric system (Filippi, J-B.; Chiari, F.; Bisgambiglia, P.) M&S activities at the Army base of Fort Wachuka, AZ (B. Zeigler, J. Nutaro et al.) Representation of hardware models developed with heterogeneous languages (Kim, J-K.; Kim, Y.G.; Kim, T.G.) DEVS/HLA Research funded by DARPA received Honorable Mention in 1999 DMSO Awards

DEVS Bus Concept Discrete Time Discrete Systems Diff Eq. Event Systems Formalisms Diff Eq. Systems DEVS HLA message message DEVS HLA DEVS message HLA RTI

Joint MEASURE Overview Scenario Specification - Runtime Visualization/Animation - Data Analysis

UA/Lockheed distributed experimentation JM: Detailed Surface Ship Models Sub/Surface Enemy Assets JM: Space Based Sensors Space Based Communication Land/Air Enemy Assets Space Manager and Logger: Space Manager and Logger: Medusa: Hi Fidelity Radar / Weapon Scheduling Pragmatic Event Cue Emission Propagation (with acoutics) Pragmatic Event Cue Emission Propagation DEVS/HLA quantization predictive filtering GIS/aggregation LMMS -- CA LMGES -- NJ

Component Model Reuse Matrix Command Control Model Laser Model Space Based Discrimination Space Based Laser Missile Defense (Theater / National) Waypoint & Heading Nav Model Orbital Propagate Model Integrated System Center Common Aero Vehicle Joint Composite Tracking Network Ballistic Trajectory Model Weather Model Earth & Terrain Model Comm. Model Missile Model IR Sensor Model Radar Model Space Operations Vehicle Coast Guard Deep Water Arsenal Ship Global Positioning System III Critical Mobile Target Project

Middleware (HLA,CORBA,JMS) U. of New Mexico Virtual Lab for Autonomous Agents V-Lab: DEVS M&S environment for robotic agents with physics, terrain and dynamics (Mars Pathfinders for NASA). IDEVS SimEnv DEVS Simulator Middleware (HLA,CORBA,JMS) Computer Network Reported gains in development times thanks to the use of DEVS

Usinor -- world’s largest producer of steel products, DEVS framework for control of steel production Sachem = large-scale monitor/diagnose control system for blast furnace operation Usinor -- world’s largest producer of steel products, Problems for conventional control and AI: Experts’ perception knowledge: implicit Reasoning of a control process expert: difficult to model. Lack of models for blast furnace dynamics Solution: time-based perception and discrete event processing for dealing with complex dynamical systems

Effective analysis and control of the DEVS framework for control of steel production quanti zation signal events signal pheno mena process pheno mena Large Scale: Conceptual model contains 25,000 objects for 33 goals, 27 tasks,etc. Approximately 400,000 lines of code. 14 man-years: 6 knowledge engineers and 12 experts One advantage of DEVS is compactness: high reduction in data volume Effective analysis and control of the behavior of blast furnaces at high resolution

Examples of Application Models of an Intel 8086 CPU and DSP processors (VoIP). Simple Digital systems (vending machine, alarm clock, plant controller, robot path finder). Interpreter of VHDL and nVHDL Simple Military systems: Radar, Unmanned vehicles, CC-130 Loads Monitoring System, static target seeker, mine seeker. Computer communication: routing protocols for LANs, IP6, client/server models, simple protocols. Physical: excitable media, particle collision, flow injection. Geographical/Ecological : fire spread, plant growth, watershed formation, erosion, ant foraging. Biosystems: mythocondria, heart tissue, bacteria spread.

a-1 simulated computer

Physical Systems Heat Spread Surface Tension Binary solidification

Fire Spread Modeling

Watershed modeling

Pursuer/evader modeling

Vibrio Parahaemolyticus bacteria Temperature Bacteria concentration Initial After 1.5 hr After 4 hrs

Ants following pheromone paths Ants seeking food Ants found pheromone path t=1 t=2 t=3 t=4 Sources of food Ants returning to nest

Path Planning Evolution (b) (c) (d) Different phases of the algorithm: (a) Configuration of obstacles, (b) Boundary detection, (c) Information for CA Expansion, (d) Optimal collision-free path

Flow Injection Analysis (FIA) P pumps carrier solution A into valve I that connects to reactor R By turning valve I, sample B is injected into R Reactions in R between A and B are sensed by detector D FIA manifold. P: pump; A,B: carrier and reagent lines; L: sample injection; I: injection valve; R: reactor coil; D: flow through detector; W: waste line.

Heart tissue behavior Heart muscle excitable; responds to external stimuli by contracting muscular cells. Equations defined by Hodgkin and Huxley Every cell reproducing the original equations Discrete time Discrete event approximation G-DEVS, Q-DEVS

Test cases: a heart tissue model Automated discretization of the continuous signal

A Watershed model

Flow Injection Analysis Model

ATLAS SW Architecture

Modelling a city section 24-line specification 1000 lines of CD++ specifications automatically generated

Describing a city section

Defining a city section in MAPS

Exporting to TSC

Visualizing outputs

Modeling AODV routing Variant of the classical Lee’s Algorithm. S: node; D: a destination; black cells: dead. S broadcasts RREQ message to all its neighbors (wave nodes). Wave nodes re-broadcast, and set up a reverse path to the sender. The process continues until the message reaches the destination node D. Shortest path is selected

Simulation results

Execution results

Internetworking Routing 3D Cell-DEVS model Plane 1: wireless network, Plane 2: wired.

Maze solving (1) (2) (3)

Simulated results Creation of a 3D version of the simulation Interpreted by the MEL scripts

Path plane

3D Simulation

Advantages of DEVS Reduced development times Improved testing => higher quality models Improved maintainability Easy experimentation Automated parallel/real-time execution Verification/Validation facilities

Difficulties of DEVS Legacy (current experience of modelers) Building DEVS models is not trivial Petri Nets, FSA, etc. more successful Training Differential Equations State machines Programming

Where to go from now Bridging the gap between Academic world and actual Application users DEVS ready to take the leap Critical mass of knowledgeable people Large amount of tools/researchers Ready to go from Research to Development Standardization of models Building libraries/user-friendly environments Further research required; open areas.

Partial

Concluding remarks DEVS formalism: enhanced execution speed, improved model definition, model reuse. Hierarchical specifications: multiple levels of abstraction. Separation of models/simulators/EF: eases verification. Experimental frameworks: building validation tools Modeling using CD++: fast learning curve Parallel execution of models: enhanced speed The variety of models introduced show the possibilities in defining complex systems using Cell-DEVS. User-oriented approach. Development time improvement: test and maintenance. Incremental development

Current work and a research roadmap http://www.sce.carleton.ca/faculty/wainer