220 likes | 457 Views
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.
E N D
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 Simulator System 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
x x 0 1 Discrete Event Time Segments X t1 t0 t2 S e y0 Y
M&S Framework formulated within UML M&S construct model collect data validate model M&S Framework classes sensor model generator retrieve model retrieve data classes Source systems simulators real world memory construction mechanisms apply experimental frame store model store data model evaluator relationships constraints model generated ontologies run model models simulate model create classes to satisfy use cases Use Cases apply pragmatic frame control- simulator predictive -simulator Experimental & Pragmatic Frames goal- generator action planning motor objectives interpretation as software code (e.g. Java) UML
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,:QX->S is the external transition function, con,:QX->S is the confluent transition function, ta: S->R + 0,∞ Where Q={(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 DEVS Model Output port System Entity Structure message SES coupling DEVS Model Input port Hierarchical Composition, Coupling and Variants are Represented in System Entity Structure
Some Types of Models Represented in DEVS Coupled Models Atomic Models Partial Differential Equations can be components in a coupled model Ordinary Differential Equation Models Processing/ Queuing/ Coordinating Networks, Collaborations Physical Space Spiking Neuron Networks Spiking Neuron Models Processing Networks Petri Net Models n-Dim Cell Space Discrete Time/ StateChart Models Stochastic Models Cellular Automata Quantized Integrator Models Self Organized Criticality Models Fuzzy Logic Models Reactive Agent Models Multi Agent Systems
Concept of DEVS Standard Single DEVS C++ Simulation processor Protocol Distributed Java Simulator DEVS DEVS DEVSML Model Real - Time Simulator Simulator Interface Interface Virtual - Time Non Simulator Other DEVS Representation
DEVS Simulation Protocol simulators. simulators. tellAll tellAll ("initialize“) ("initialize“) Coordinator Coordinator simulators. simulators. AskAll AskAll (“ (“ nextTN nextTN ”) ”) simulators. simulators. tellAll tellAll (" (" computeInputOutput computeInputOutput “) “) simulators. simulators. tellAll tellAll (" (" sendMessages sendMessages ") ") simulators. simulators. tellAll tellAll (" (" ApplyDeltFunc”) putContentOnSimulator DEVS Simulator DEVS Simulator Non-DEVS Simulator ? DEVS Model 2 DEVS Model 1 Atoimc1 Atoimc2
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 • 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 ReqForAck send Second 0.5 send First StartAck 10 Ack send Third waitForStart Ack ∞ Ack Received ∞ 10 Example of Natural Language Spec: to start passivate in waitForStart when in waitForStartand receive StartAck go to sendFirst hold in sendFirst for time 0.5 then output ReqForAck and go to sendSecond hold in ackReceived for time Infinity … Ack 10 last Chance ReqForAck
Automated Analysis: Based on State Input Pairs Enables Automated Test Model Generation Defined State-Input pairs: listen ,orderOffer awaitingAdv,ProdFeasibilityFalse awaitingAdv, ProdFeasibilityTrue waitForConfrm ,Confirm Terminal State-Input Pairs: awaitingAdv , ProdFeasibilityFalse waitForConfrm , Confirm Awaiting Adv OrderOffer ProdFeasibilityFalse ProdFeasibilityTrue listen State-Input pair paths: 1= listen ,OrderOffer 2 = listen , OrderOffer, awaitingAdv ,ProdFeasibilityFalse 3= listen ,OrderOfferawaitingAdv ,ProdFeasibilityTrue 4= listen ,OrderOfferawaitingAdv ,ProdFeasibilityTruewaitForConfrm ,Confirm waitForConfirm Dominant State-Input pair: listen ,orderOffer Confirm State-Input Pairs mapped To Terminal State-Input pairs: listen ,orderOffer -> awaitingAdv , ProdFeasibilityFalse awaitingAdv , ProdFeasibilityTrue -> waitForConfrm, Confirm Dominant State-Input pair paths: 2 4
Generated Test Models in DEVSJAVA SimView AckCheck Observe Outputs Send inputs Observe Pass/Fail Trigger next in Sequence upon pass
System Entity Structure/Model Base Repository: Support Automated DEVS Generation and Reuse SES Model Repository Model construction prune and transform Experimental Frame
Automated Generation of Test Models Augmented Test Models Automated manual FDDEVS atomic model SES SES/XML Of DSR texts FDDEVS test models Pruned ES
DEVS/SOA Infrastructure: Supports Deployment and Execution of DEVS Models on the Web WEB SERVICE CLIENT DEVS DEVS Agent Agent (Observer) ( Virtual User) WEB DEVSJAVA SERVICE CLIENT DEVS Modeling Language (DEVML) DEVS Simulator Services • 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 Middleware (SOAP, RMI etc) Net - centric infrastructure Run Example
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
Books and Web Links acims.arizona.edu Rtsync.com devsworld.org