discrete-event modeling and simulation: past, present … - gabriel... · discrete-event modeling...

46
Discrete - Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and Computer Engineering Carleton University Ottawa, ON, CANADA http://cell-devs.sce.carleton.ca

Upload: vuongmien

Post on 07-Jul-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Discrete-Event Modeling and

Simulation: Past, Present and Future

Gabriel Wainer

Department of Systems and Computer Engineering

Carleton University

Ottawa, ON, CANADA

http://cell-devs.sce.carleton.ca

Page 2: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: DEVS simulators

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 3: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: DEVS simulators

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 4: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Analytical Modeling

EquationsResults

ExperimentExperimental

FrameEntity

Results

QueryModel's Exp.

FrameModel

Analytical:

– Based on reasoning

– Symbolic

– General solutions to existing systems

– Impossible to define

– Impossible to solve

– Simplifications

x

Tkqx

Page 5: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Numerical Approximation

Approximation

Results

Experiment

Experimental

FrameEntity

Query

Model's Exp.

FrameModel

Approximate

Results

Computed

Query

Computation

Exp. FrameCompute

1

1

1

1

1

L

Kh

TL

KhT

T

o

x

Tkqx

Page 6: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Artificial Systems Modeling

Examples– Communication networks

– Distributed control

– Manufacturing

– Air Traffic controllers

– Defence applications

Human-made

Naturally concurrent

Non-linear

No accurate analytic solution

No transformation method

Complexity: analytical solutions cannot be provided.

Differential equations and approximations: inadequate tools

Page 7: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Modeling Artificial Systems

G Y R G:

45s

Y:

10s

R:

55s

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120

YELLOW

GREEN

RED

GREEN

Page 8: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Automata Simulation

Approximation

Results

Experiment

Experimental

FrameEntity

Query

Model's Exp.

FrameModel

Approximate

Results

Computed

Query

Computation

Exp. FrameCompute

G Y R

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120

YELLOW

GREEN

RED

GREEN

Page 9: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Computer Simulation

1950’s: simulation

– Particular solutions for a given problem

– Controlled experimentation

– Time compression

– Solving numerical methods more efficiently

– Conducting a large number of experiments in a controlled

fashion at a low cost

Page 10: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Discrete-Event Dynamic Systems

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120

YELLOW

GREEN

RED

GREEN

Pedestrian

button

pressed at

37.32722

Page 11: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Experiment

Building a Simulator

ProgramResults

ExperimentExperimental

FrameEntity

Results

Simulator

•Enhanced tools/languages•Statistical packages; libraries•Ease to use, flexibility•Parallel/Distributed systems•Enhanced visualization tools•Standards

Page 12: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Discrete-Event M&S formalisms

Discrete-Event M&S methodologies and theory(FSM, FSA, Markov Chains, Petri Nets, CCS, CSP,

Timed FSM, etc.)

Formalization of DE modeling concepts

Improvement of development task– Reuse

– Ease of modeling

– Development cost reductions

DEVS: Discrete-Event Systems Specifications (Zeigler 1976/84/90/2000).

Page 13: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

The DEVS Formalism

Discrete-Event formalism: time advances due to occurrence of

events (improved performance when compared with time-

based approaches).

Basic models that can be hierarchically coupled to build

complex simulations.

Atomic Models:

M = < X, S, Y, int, ext, , D >.

Coupled Models:

CM = < X, Y, D, {Mi}, {Ii}, {Zij}, select >

Page 14: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: the CD++ tool

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 15: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

D(s) (1)s

DEVS = < X, S, Y, int , ext , D, >

(s) (2)

y (3)

s’ = int (s)

(4)

x (5)

s’ = ext (s,e,x)

(6)

DEVS atomic models

Page 16: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: the CD++ tool

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 17: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Components

couplings

Internal Couplings

External Input Couplings

External Output Couplings

repair

shop

out

sent

finished

repaired

faulty

generator

(genr)

transducer

(transd)

out report

stop

start

start

Coupled Models

CM = < X, Y, C, EIC, EOC, IC, SELECT >

Page 18: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: the CD++ tool

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 19: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: DEVS Simulators

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 20: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

DEVS Toolkits

ADEVS (University of Arizona)

CD++ (Carleton University – Open source)

DEVS/HLA (ACIMS)

DEVSJAVA (ACIMS)

GALATEA (ULA – Venezuela)

GDEVS (Aix-Marseille III, France)

JDEVS (Université de Corse - France)

PyDEVS (McGill)

PowerDEVS (University of Rosario, Argentina)

SimBeams (University of Linz – Austria)

DEVSSim (KAIST, Korea; C++, Java, HLA)

New efforts in China, France, Portugal, Spain, Russia, Czech Republic.

Page 21: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Middleware/OS (Corba/HLA/P2P;

Windows/Linux/RTOS…)

Simulators (single/multi CPU/RT)

Models

Applications

Hardware (PCs/Clusters of PC/HW boards…)

A Layered view on M&S

Page 22: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Once we are confident with the results, we download the models into a special purpose processor.– Same Discrete Time Controller (specified in DEVS)

ECD++ simulator capable to run DEVS models embedded in Real-Time Linux.

Simulator as a Virtual Machine for models– interacting in a Hardware-In-The-Loop fashion

Target: Intel IXP2400 Network Processing Unit– Libraries to communicate the ECD++ Virtual Machine with

specialized RISC microengines

Embedded Target Platform

Page 23: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

CD++ Builder Environment

Page 24: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Distributed Collaboration

Parallel Simulation

Stand-alone Simulation

`

Web service client

Rendering/Visualization

(CIMS

BPEL engine

(Webspher)Data capture

(Camera)

WSRF-Engine

(Globus)

CA*net 4/

Internet

UCLP Services

Page 25: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: the CD++ tool

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 26: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

DEVS Applications

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)

Page 27: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

DEVS Applications

Fire Spread (F. Barros, M. Vasconcelos)

Supply chain applications (Kim, D.; Cao H.; Buckley S.J.)

Solar electric system (Filippi, J-B.; Chiari, F.; Bisgambiglia, P.)

Representation of hardware models developed with heterogeneous

languages (Kim, J-K.; Kim, Y.G.; Kim, T.G.)

DEVS/HLA (Distributed Simulation Lockheed-Martin, UA, NJ)

USINOR (Sachem)

Page 28: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Component Model Reuse Matrix

xxxCommand

Control Model

xxxxLaser Model

x

x

x

Space Based

Discrimination

x

x

x

Space Based

Laser

x

x

x

x

x

x

x

x

x

Missile Defense

(Theater /

National)

xxxxxxWaypoint &

Heading Nav

Model

xxxxOrbital

Propagate

Model

x

x

x

Integrated

System

Center

x

x

x

Common

Aero Vehicle

x

x

x

x

Joint

Composite

Tracking

Network

xxBallistic

Trajectory

Model

xWeather Model

xxxxEarth &

Terrain Model

xxComm.

Model

xMissile Model

xxIR Sensor

Model

xxxxRadar Model

Space

Operations

Vehicle

Coast Guard

Deep Water

Arsenal

Ship

Global

Positioning

System III

Critical Mobile

Target

Project

Model

Page 29: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

U. of New Mexico Virtual Lab for

Autonomous Agents

Computer Network

Middleware

(HLA,CORBA,JMS)

DEVS Simulator

IDEVS SimEnv

V-Lab: DEVS M&S environment for robotic agents with physics,

terrain and dynamics (Mars Pathfinders for NASA).

Reported gains in development times thanks to the use of DEVS

Page 30: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Physics and Chemistry

DLA Surface Tension

Binary solidification

Page 31: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

0 0.5 1 1.5 2 2.5

x 104

-100

-80

-60

-40

-20

0

20

40

données expémentales et approximation polynomiale

Heart tissue

Cancer Models

Krebs Cycle in the Cell

Nerve Terminal modeling

Biomedical

Page 32: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Modelica/CD++

model circuitModelica.Electrical.Analog.Sources.PulseVoltage

V(V=10, width=50, period=2.5);Modelica.Electrical.Analog.Basic.Resistor R1(R=0.001);Modelica.Electrical.Analog.Basic.Inductor I1(L=500);Modelica.Electrical.Analog.Basic.Inductor I2(L=2000);Modelica.Electrical.Analog.Basic.Capacitor C(C=10);Modelica.Electrical.Analog.Basic.Resistor R2(R=1000);Modelica.Electrical.Analog.Basic.Ground Gnd;equationconnect(V.p, R1.p);connect(R1.n, I1.p);connect(R1.n, I2.p);connect(I2.n, C.p);connect(I2.n, R2.p);connect(C.n, I1.n); connect(R2.n, C.n);connect(I1.n, V.n);connect(V.n, Gnd.p);end circuit;

Page 33: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Environmental Systems

GRASS “Geographic Resources Analysis Support System”

http://grass.fbk.eu/– Multi-Layered information

– E.g.: Terrain elevation, landuse, etc.

GRASS GIS sample dataset:

“North Carolina, USA”

Coverage:

1.2 Km. x 0.85 Km.

Cell Resolution:

10 m. x 10 m.

Landuses

Landuse

map

Elevation

map

Page 34: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Outline

Motivation

Modeling: DEVS formalism

– DEVS Atomic Models

– DEVS Coupled Models

– Extensions

Simulation: the CD++ tool

– Real-Time

– Parallel

– Distributed

Applications: some applications of the methodology

Visualization: advanced techniques for viewing the

simulation results

Page 35: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Advanced Visualization

Page 36: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Boulevard St. Laurent (MTL)

http://www.cims.carleton.ca/pose

Page 37: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Evacuation in St. Laurent Blvd.

Page 38: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

The FUTURE

Page 39: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Advantages of DEVS

Reduced development times

Improved testing => higher quality models

Improved maintainability

Easy experimentation

Automated parallel/real-time execution

Verification/Validation facilities

Page 40: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Difficulties of DEVS

Legacy (current experience of modelers)

Building DEVS models is not trivial– Petri Nets, FSA, etc.

– Do not “scale-up”: inadequate for large scale systems

– Do not address the issues previously discussed

Training– Differential Equations

– State machines

– Programming

Prejudice/Misconceptions– Too complex? (2nd year students)

– Too formal? (not need to know the formalities)

– Overhead? (minimum: <5% for very large models)

Page 41: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Where to go from now

Bridging the gap between Academic world

and actual Application users– Companies being formed

Standardization of models

Building libraries/user-friendly environments

Further research required; open areas.

Page 42: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

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

Page 43: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Further Information

http://cell-devs.sce.carleton.ca

http://youtube.com/arslab

Page 44: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

TMS/DEVS 2014

Page 45: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

SummerSim 2014

Page 46: Discrete-Event Modeling and Simulation: Past, Present … - Gabriel... · Discrete-Event Modeling and Simulation: Past, Present and Future Gabriel Wainer Department of Systems and

Thanks!