DEVS and SES as a Framework for Modeling and Simulation Tool
DevelopmentBernard P. Zeigler
Arizona Center for Integrative Modeling and Simulation
University of ArizonaPresented at SIMUTools 2008 March 3–7 2008 Marseille, France
M&S Framework
Source System
Simulator
Model
Experimental Frame
SimulationRelation
ModelingRelation
• Based on mathematical formalism using system theoretic principles
• Separation of Model, Simulator and Experimental Frame
• Atomic and Coupled types
• Hierarchical construction
x0 x1X
S
Yy0
e
t0 t1 t2
Discrete Event Time Segments
M&S Framework formulated within UML
classes
construction mechanisms
relationshipsconstraints
create classes to satisfy use cases
M&S Framework classes
interpretationas software code(e.g. Java)
Use Cases
UML
models
simulatorsSourcesystems
Experimental& PragmaticFrames
ontologies
collectdata
storemodel
runmodel
construct
model
storedata
simulatemodel
sensorretrievedata
retrievemodel
validatemodel
memory
control-simulator predictive
-simulator
modelevaluator
modelgenerator
real world
model generated
goal-generator
action planningmotor
objectives
M&S
applypragmatic
frame
applyexperimen
talframe
DEVS – Formal Specification of a System
A discrete event system specification (DEVS) is a structureM=<X,S,Y,int, ext, con, ,ta>
whereX 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,:QX->S is the external transition function,
con,:QX->S is the confluent transition function, ta: S->R +
0,∞
WhereQ={(s,e)|sS, 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
DEVSModel
Output port
Input port
DEVSModel
message
coupling
SES
Hierarchical Composition, Coupling and Variants are Represented in System Entity Structure
System Entity Structure
Atomic Models
OrdinaryDifferentialEquationModels
Spiking NeuronModels
Coupled Models
Petri NetModels
Cellular Automata
n-Dim Cell Space
PartialDifferentialEquations
Self Organized CriticalityModels
Processing/Queuing/
Coordinating
ProcessingNetworks
Networks,Collaborations Physical
Space
Some Types of Models Represented in DEVS
can becomponents in a coupled model
MultiAgent
Systems
Discrete Time/
StateChartModels
QuantizedIntegratorModels
Spiking Neuron
Networks
StochasticModels
ReactiveAgent
Models
Fuzzy Logic
Models
Concept of DEVS Standard
DEVS
Simulator
Interface
Single
processor
Distributed
Simulator
Real- Time
Simulator
C++
Non
DEVS
DEVS
Model
Interface
Java
Other
Representation
DEVSSimulationProtocol
Virtual- Time
Simulator
DEVSML
DEVS Simulation Protocol
Coordinator
Atoimc1
Non-DEVS Simulator
Atoimc2
simulators.tellAll("initialize“)
simulators.AskAll(“nextTN”)
simulators.tellAll("computeInputOutput“)
simulators.tellAll("sendMessages")
simulators.tellAll("
Coordinator
DEVSModel1
simulators.tellAll("initialize“)
simulators.AskAll(“nextTN”)
simulators.tellAll("computeInputOutput“)
simulators.tellAll("sendMessages")
simulators.tellAll("ApplyDeltFunc”)
putContentOnSimulator
DEVS Simulator
DEVS Simulator
DEVSModel2
?
Finite Deterministic DEVS : FD-DEVS
FDDEVS = <incomingMessageSet, outgoingMessageSet, StateSet, TimeAdvanceTable, InternalTransitionTable, ExternalTransitionTable,OutputTable>whereincomingMessageSet, outgoingMessageSet, StateSet are finite setsTimeAdvanceTable: StateSet → R0,∞
+ (the positive reals with zero and infinity)InternalTransitionTable: StateSet → StateSetExternalTransitionTable: 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
Example of Natural Language Spec: 1.to start passivate in waitForStart2.when in waitForStart and receive StartAck go to sendFirst3.hold in sendFirst for time 0.5 then output
ReqForAck and go to sendSecond4.hold in ackReceived for time Infinity5.…
waitForStart
sendFirst
sendSecond
sendThird
AckReceived
StartAck
AckAck
0.510
10
10
∞ ∞
lastChance
ReqForAck
ReqForAck
ReqForAck
Ack
• 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
Automated Analysis: Based on State Input Pairs Enables Automated Test Model Generation
listen
AwaitingAdv
OrderOffer ProdFeasibilityFalseProdFeasibilityTrue
waitForConfirm
ConfirmDominantState-Input pair:listen ,orderOffer
DominantState-Input pair:listen ,orderOffer
State-Input pair paths:1= listen ,OrderOffer 2 = listen , OrderOffer, awaitingAdv ,ProdFeasibilityFalse3= listen ,OrderOffer awaitingAdv ,ProdFeasibilityTrue4= listen ,OrderOffer awaitingAdv ,ProdFeasibilityTrue waitForConfrm ,Confirm
Dominant State-Input pair paths:24
Defined State-Input pairs:listen ,orderOfferawaitingAdv,ProdFeasibilityFalseawaitingAdv, ProdFeasibilityTruewaitForConfrm ,Confirm
Defined State-Input pairs:listen ,orderOfferawaitingAdv,ProdFeasibilityFalseawaitingAdv, ProdFeasibilityTruewaitForConfrm ,Confirm
Terminal State-Input Pairs: awaitingAdv , ProdFeasibilityFalse
waitForConfrm , Confirm
Terminal State-Input Pairs: awaitingAdv , ProdFeasibilityFalse
waitForConfrm , Confirm
State-Input Pairs mapped To Terminal State-Input pairs:
listen ,orderOffer -> awaitingAdv , ProdFeasibilityFalseawaitingAdv , ProdFeasibilityTrue -> waitForConfrm, Confirm
Generated Test Models in DEVSJAVA SimView
AckCheck
Send inputs
Observe Outputs
Trigger next in Sequence upon pass
Observe Pass/Fai
l
System Entity Structure (SES) : SESBuilder
System Entity Structure/Model Base Repository: Support Automated DEVS Generation and Reuse
Modelconstruction SES
Model Repository
ExperimentalFrame
pruneand transform
Automated Generation of Test Models
SES/XMLOf DSRtexts
SES
PrunedES
FDDEVS atomic model
FDDEVS test models
Augmented Test Models
Automated manual
DEVS/SOA Infrastructure: Supports Deployment and Execution of DEVS Models on the Web
WEBSERVICECLIENT
Middleware (SOAP, RMI etc)Net-centric infrastructure
DEVS Simulator Services
DEVS Modeling Language (DEVML)
DEVSJAVA
DEVSAgent
( Virtual User)
DEVSAgent
(Observer)
WEBSERVICECLIENT
Run Example
• 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
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 net-centric 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
devsworld.org acims.arizona.edu Rtsync.com
Books and Web Links