Transcript Slide 1

DEVS and SES as a Framework for
Modeling and Simulation Tool
Development
Bernard P. Zeigler
Arizona Center for Integrative
Modeling and Simulation
University of Arizona
Presented at
SIMUTools 2008
March 3–7 2008
Marseille, France
M&S Framework
Experimental Frame
Source
System
Simulator
Simulation
Relation
Modeling
Relation
Model
• Based on mathematical formalism using system theoretic principles
• Separation of Model, Simulator and Experimental Frame
• Atomic and Coupled types
• Hierarchical construction
Discrete Event Time Segments
X
x0
t0
x1
t1
S
e
y0
Y
t2
M&S Framework formulated within UML
M&S Framework classes
classes
Source
systems
construction
mechanisms
ontologies
relationships
constraints
simulators
models
Experimental
& Pragmatic
Frames
create classes to
satisfy use cases
Use Cases
M&S
sensor
collect
data
retrieve
model
memory
UML
store
model
construc
t
model
retri
eve
real worlddata
store
data
model generated
run
model
controlsimulator
simulate
model
apply
pragmatic
frame
goalaction planning
generator
motor
validate
model
model
generator
apply
experimen
tal
frame
model
evaluator
predictive
-simulator
objectives
interpretation
as
software code
(e.g. Java)
DEVS – Formal Specification of a System
A discrete event system specification (DEVS) is a structure
M=<X,S,Y,int, ext, con, ,ta>
where
X is the set of input values,
S is a set of states,
Y is the set of output values,
int :S->S is the internal transition function,
ext,:QX->S is the external transition function,
con,:QX->S is the confluent transition function,
ta: S->R + 0,∞
Where
Q={(s,e)|sS, 0 e ta(s) } is the total state set,
e is the time elapsed since last transition,
:S->Y is the output function and
R + 0,∞ is the set of positive reals with 0 and 
DEVS Hierarchical Modular Models
System Entity Structure
SES
DEVS
Model
Output port
message
coupling
Input port
DEVS
Model
Hierarchical Composition,
Coupling and Variants are
Represented in System
Entity Structure
Some Types of Models Represented in DEVS
Coupled Models
Atomic Models
Ordinary
Differential
Equation
Models
Processing/
Queuing/
Coordinating
Spiking
Neuron
Models
can be
components
in a coupled
model
Petri Net
Models
Networks,
Collaborations
Processing
Networks
Physical
Space
Spiking
Neuron
Networks
n-Dim
Cell Space
Discrete
Time/
StateChart
Models
Stochastic
Models
Cellular
Automata
Quantized
Integrator
Models
Fuzzy Logic
Models
Partial
Differential
Equations
Reactive
Agent
Models
Multi
Agent
Systems
Self Organized
Criticality
Models
Concept of DEVS Standard
Single
DEVS
Simulation
Protocol
processor
Distributed
C++
Java
Simulator
DEVS
DEVS
Real-Time
Simulator
Model
Simulator
Interface
Interface
DEVSML
Virtual -Time
Simulator
Non
DEVS
Other
Representation
DEVS Simulation Protocol
simulators.tellAll("initialize“)
Coordinator
simulators.AskAll(“nextTN”)
simulators.tellAll("computeInputOutput“)
simulators.tellAll("sendMessages")
simulators.tellAll("ApplyDeltFunc”)
putContentOnSimulator
DEVS
Simulator
DEVS
Atoimc1
Model
1
DEVS
Simulator
DEVS
Atoimc2
Model
2
Non-DEVS
Simulator
?
Finite Deterministic DEVS : FD-DEVS
FDDEVS = <incomingMessageSet, outgoingMessageSet, StateSet, TimeAdvanceTable,
InternalTransitionTable, ExternalTransitionTable,OutputTable>
where
incomingMessageSet, outgoingMessageSet, StateSet are finite sets
TimeAdvanceTable: StateSet → R0,∞+ (the positive reals with zero and infinity)
InternalTransitionTable: StateSet → StateSet
ExternalTransitionTable: StateSet × incomingMessageSet → StateSet,
OutputTable: StateSet → the set of subsets of outgoingMsgSet
Natural Language For FDDEVS
• to start hold in PHASE for time SIGMA
• when in PHASE and receive MSG go to PHASE’
<eventually>
• hold in PHASE for time SIGMA
• after PHASE then output MSG
• from PHASE go to PHASE’
Semantics defined by
mapping into DEVS
FD-DEVS
•
•
•
•
•
•
The “right” abstraction of DEVS – retains
important timing properties
Amenable to analysis
Supports automation
Maps to DEVSJAVA
Supplies a skelton that can be extended to full
DEVS
Simple XML expression
ReqForAck
send
First
StartAck
∞
send
Second
0.5
10
Ack
waitFor
Start
∞
ReqForAck
Ack
Received
Ack
10
last
Chance
send
Third
Ack
10
ReqForAck
Example of Natural Language Spec:
1. to start passivate in waitForStart
2. when in waitForStart and receive StartAck
go to sendFirst
3. hold in sendFirst for time 0.5 then output
ReqForAck and go to sendSecond
4. hold in ackReceived for time Infinity
5. …
Automated Analysis: Based on State Input Pairs
Enables Automated Test Model Generation
Terminal State-Input Pairs:
awaitingAdv ,
ProdFeasibilityFalse
Defined State-Input pairs:
listen ,orderOffer
awaitingAdv,ProdFeasibilityFalse
awaitingAdv, ProdFeasibilityTrue
waitForConfrm ,Confirm
Awaiting
Adv
OrderOffer
ProdFeasibilityTrue
listen
waitFor
Confirm
Dominant
State-Input pair:
listen ,orderOffer
Confirm
Dominant StateInput pair paths:
2
4
waitForConfrm , Confirm
ProdFeasibilityFalse
State-Input pair paths:
1= listen ,OrderOffer
2 = listen , OrderOffer, awaitingAdv
,ProdFeasibilityFalse
3= listen ,OrderOffer awaitingAdv
,ProdFeasibilityTrue
4= listen ,OrderOffer awaitingAdv
,ProdFeasibilityTrue waitForConfrm ,Confirm
State-Input Pairs mapped
To Terminal State-Input pairs:
listen ,orderOffer -> awaitingAdv ,
ProdFeasibilityFalse
awaitingAdv , ProdFeasibilityTrue -> waitForConfrm,
Confirm
Generated Test Models in DEVSJAVA SimView
AckCheck
Observe
Outputs
Send
inputs
Observe
Pass/Fail
Trigger next
in Sequence
upon pass
System Entity Structure (SES) : SESBuilder
System Entity Structure/Model Base Repository:
Support Automated DEVS Generation and Reuse
Model
construction
Model
Repository
SES
Experimental
Frame
prune
and
transform
Automated Generation of Test Models
Augmented Test
Models
Automated
FDDEVS
atomic model
manual
SES
SES/XML
Of DSR
texts
Pruned
ES
FDDEVS
test models
DEVS/SOA Infrastructure: Supports Deployment
and Execution of DEVS Models on the Web
WEB
SERVICE
CLIENT
DEVS
Agent
(Observer)
DEVS
Agent
( Virtual User)
DEVSJAVA
DEVS Modeling Language (DEVML)
WEB
SERVICE
CLIENT
DEVS Simulator Services
Middleware (SOAP, RMI etc)
Net-centric infrastructure
•
Service Oriented Architecture (SOA) consists of various
W3C standards
•
•
Machine-to-machine interoperable interaction over the
network based on WSDL interface descriptions
Client server framework
•
Message encapsulated in SOAP wrapper which is in XML
Run Example
Deploying Models: DEVSML and DEVS/SOA
Applications
• Natural language capture of high level information
technology systems requirements
• Automated generation of FDDEVS kernel
DEVSJAVA/C++ models for distributed real-time netcentric IT systems testing
• Development of web service workflows using
DEVS/SOA
• Network Traffic data capture, focused extraction, and
model generation for exercising IT systems e.g.,
intrusion detection
Conclusions
• DEVS and SES provide a framework based on Systems
Theory for M&S tool development
• DEVS standard supports sharable models and
repository reuse
• The framework provides an ontology in which tools
can be organized and interoperate – missing slots can
be identified; overlapping tools can be compared
• The framework supports development of generic
tools which in turn support a wide array of domain
specific specializations and applications
Books and Web Links
devsworld.org
acims.arizona.edu
Rtsync.com