1 / 37

STDEVS A Formal Framework for ST ochastic DEVS Modeling and Simulation Rodrigo Castro * Ernesto Kofman * Gabriel Wai

STDEVS A Formal Framework for ST ochastic DEVS Modeling and Simulation Rodrigo Castro * Ernesto Kofman * Gabriel Wainer ** * Universidad Nacional de Rosario ** Carleton University

jesse
Download Presentation

STDEVS A Formal Framework for ST ochastic DEVS Modeling and Simulation Rodrigo Castro * Ernesto Kofman * Gabriel Wai

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. STDEVS A Formal Framework for STochastic DEVS Modeling and Simulation Rodrigo Castro * Ernesto Kofman * Gabriel Wainer ** * Universidad Nacional de Rosario ** Carleton University System Dynamics and Signal Processing Lab. Advanced Real-Time Simulation Lab. Argentina Canada http://www.fceia.unr.edu.ar/lsd/http://www.sce.carleton.ca/faculty/wainer/ARS/

  2. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  3. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  4. INTRODUCTION • DEVS formalism • Developed as a general system theoretic based language. • Universal description of discrete event systems. • Stochastic models • Play a fundamental role in discrete event system theory. • Any system involving uncertainties, unpredictable human actions or system failures requires a non–deterministic treatment. • Widely adopted stochastic discrete event formalisms: Markov Chains, Queuing Networks, Stochastic Petri Nets...

  5. PROBLEM STATEMENT • Even though most of the DEVS simulation tools have incorporated the use of random functions... • DEVS has originally only been formally defined for deterministic systems. • Early works on mapping DEVS to stochastic systems are not completely general. • The DEVS formal framework has limited extent toa wide family of (generalized) stochastic systems. • No previous general DEVS–based formalism for stochastic discrete event systems.

  6. EARLY WORKS • Previous efforts on mapping DEVS to stochastic systems behavior have limited scope: • “DES models driven by pseudo-random sequences define DEVS models” (Aggarwal, U. of Michigan, 1975) • Problem: Not a methodology to describe DEVS stochastic models. • “Relationship established between random experiment outcomes and externally observed possible state trajectories of a DEVS simulation” (Melamed, U. of Michigan, 1976) • Problem: Limited to models described at the input/output level. • “Extended DEVS formalism taking into account internalstochastic behavior at the state transition level”(Joslyn, NASA Goddard Space Flight Center, 1996) • Problem: Limited to finite state sets models (not general sets).

  7. CONTRIBUTION OBJECTIVES • Provide an extension of DEVS • that establishes a formal framework for modeling and simulation • of general stochastic discrete event systems. • DRIVERS • Rely on the deterministic DEVSAtomic Model definition as a starting point. • Keep the essence of the DEVS modelstructure, then • derive from it a new stochastic modelstructureby • introducing the new probabilistic features needed • replacing the way internal dynamicsare described.

  8. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  9. STDEVS • STRATEGY (What can we do ?) • Define the newSTochastic DEVS (STDEVS) Atomic Model structure,where internal dynamics incorporate probabilistic components,relying on thegeneralTheory of Probability Spaces:Think ofDEVS state transitions as “Random Experiments” • Keep the general and arbitrary nature of all the original DEVS sets. • Respect the deterministic nature of the original DEVS deterministicfunctions.

  10. DEVS Atomic Model ta S 0 → e→ ta X Y Keep general Replace with Probability Spaces components Keep deterministic • STDEVS • STRATEGY Think of DEVS state transitions as “Random Experiments” DEVS Atomic Model components:

  11. STDEVS • FORMAL DEFINITION A STDEVS Model (MST) has the structure Replaced Components = = Same Functionality A DEVS Model (MD) has the structure

  12. STDEVS • FORMAL DEFINITION A STDEVS Model (MST) has the structure Can't assign probabilities to an individuals (will render always 0 for S continuous !) Arbitrary (Finite, Infinite, Continuous, Discrete, Hybrid...) Components obtained from a Probability Space construct. • Will have to answer: • Given the present model state s Є S, and after the next state transition (internal or external “random experiment”), • ¿ What is the probability that the new future state s’Є Sbelongs to any given subset of S?

  13. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  14. PROBABILITY SPACES • INFORMAL IDEA • All the possibleoutcomes (elements) of a random experiment. • We have to make sure that Sspis measurable, given Sspis a totally arbitrary set. Sample Space : Ssp • Takes the roleof the DEVSState Space :S Arbitrary Subsets ofSsp Sampless ЄSsp Statess ЄS Outcomes of a general random experiment. Analogous Outcomes of a STDEVS state transition.

  15. PROBABILITY SPACES • INFORMAL IDEA • Fis a collection of subsets (Not any collection, has special properties) F : a Sigma Field ofSsp P(F):Probability Measures for membersF ЄF. F: a member ofF Sample Space : Ssp • The Fmembers of Fcan be assigned probabilities, but not the single elements s ЄF of them. • Now, the structure (Ssp ,F, P )is a Probability Space. • It can fully describe random experiments on the arbitrary Sample Space Ssp.

  16. PROBABILITY SPACES • FORMAL DEFINITION Build a Measurable Space from the Sample Space. • The pair (Ssp ,F )is a Measurable SpaceifF is a Sigma Field ofSsp • Fis a Sigma Field ofSspifit satisfies : F: a member ofF • Now this measurable structure (Ssp ,F )can be equipped with Probability Measures. • Recall that Ssp plays the role of the DEVS State Space.

  17. PROBABILITY SPACES • FORMAL DEFINITION Build a Probability Space from the Measurable Space. • A Probability Measure P on a Measurable Space (Ssp ,F )is • an assignment of a real number P(F) to every member FЄ F, • such that P obeys the following rules: • Now, the structure (Ssp ,F, P )is a Probability Space. • It can fully describe random experiments on the arbitrary Sample Space Ssp.

  18. PROBABILITY SPACES • FORMAL DEFINITION Make it more practical ! • Sigma Fields F are theoretically essential, but not very useful in practice. • Usually we want to pick our own collection of subsets G ЄG out of the Event Space Ssp that make some practical sense. • We are lucky: • Any arbitrarily chosen collection G ЄG of subsets always generates a minimum Sigma Field F=M(G) . →We will use G from now on. • The knowledge of P(G) for every G ЄG readily defines the function P(F) for every F ЄF. →We will use P(G) from now on. • Finally: For every G ЄG , the function P(G) expresses the probability that the random experiment produces a sample sЄG as the experiment outcome.

  19. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  20. STDEVS • THE NEW COMPONENTS • Let´s start with the internal transition dynamics: Power Set of S • Given a present state s , the collection Gint(s)contains all the subsets of Sthat the future state s’ might belong to, with a known probability Pint(s,G).

  21. STDEVS • THE NEW COMPONENTS • Analogous reasoning for the external transition dynamics: q=(s,e) • Given a present state s , an elapsed time e, and an input element x, the collection Gext(q,x) contains all the subsets of S that the future state s’ might belong to, with a known probability Pint(s,G).

  22. STDEVS • MAIN THEORETICAL PROPERTIES • We demonstrated the following properties of STDEVS, analogous to the DEVS main properties: (Formulas and demonstrations in our paper) • The STDEVS structure verifiesClosure Under Coupling. • We can couple STDEVS models in a hierarchical way, encapsulating complex coupled models, and coupling them with other atomic ones. • The STDEVS structure is equipped with a Legitimacy Property. • We redefined the DEVS Legitimacy Property. • Now, it expresses the probability of having an infinite number of transitions in a finite interval of time.

  23. STDEVS • THEORETICAL IMPLICATIONS • Now, with the new STDEVS formal framework we can: • Representany stochastic system, no matter how complex the stochastic processes driving its dynamics might be. • This is true even if the system can not (or it is very difficult, expensive, etc.) be implemented in a practical simulator. • This allows to a strong theoretical probabilistic manipulation of the STDEVS structure. (that evolves through a finite number of changes in a finite amount of time)

  24. STDEVS, DEVS and RND functions • MAIN PRACTICAL PROPERTIES • We shall call DEVS-RND models to those DEVS models whose • transition functions depend on random experiments • through anyrandom variable. • In practice, probability distributions are typically obtained by some computational manipulation of an Uniform U(0,1) random variabler obtained with a RND() pseudo-random sequence generator in most programming languages. • r can be an array of n Uniforms: r ~ U(0,1)n

  25. STDEVS, DEVS and RND functions • MAIN PRACTICAL PROPERTIES • We demonstrated the following properties for STDEVS, of strong practical interest: (Formulas and demonstrations in our paper) • Theorem 1: • A DEVS-RND model always define an equivalent STDEVS model. • Corollary 1: • A DEVS-RND model depending on n Uniforms: r ~ U(0,1) n in its transition functions always define an equivalent STDEVS model. • Corollary 2: • A deterministic DEVS model always defines an equivalent STDEVS model.(DEVS is a particular case of STDEVS)

  26. STDEVS, DEVS and RND functions • PRACTICAL IMPLICATIONS • Now, with the new STDEVS formal framework (and its properties)we can: • Build and couple together any hierarchical system interconnectingDEVS and STDEVS models.(guaranteeing all the desired theoretical properties for doing it) • Model most of the practical situations of stochastic behavior in STDEVS without making use of probability spaces. (using the handier DEVS-RND equivalents).

  27. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  28. EXAMPLE • Load Balancer – All components stochastics • A simple illustrative computational system : A generator offering a workload (tasks) to a two-serverscluster, with an adjustable balancer biased with a balancing factor. • LBM : Load Balancer Model • LG : Load Generator • CL : Cluster (Coupled) • WB : Workload Balancer • S1 : Server 1 • S2 : Server 2 • dr: Departure Rate • bf: Balancing Factor [0 to 1] • sti: Average Service Times • λi, λ’i: Average Traffic Rate • μi: Average Service Rate • Rates in [Tasks/second] • S1,S2 are M/M/1/1 queues (simplest). No buffer capacity: overflowing tasks are dropped. Service Times are Exponentially-distributed. • LG generates Poisson-distributedtask workload. • WB will distribute workload according a Uniform distributionbiased by a continuous factor bf .

  29. EXAMPLE • LBM: Load Balancer Model • We want to model this system relying on the STDEVS formal framework. • Then, execute the model in a DEVS simulator and verify it against analytical results. • All the stochastic descriptions of this model are simple ones: can be readily modeled with a DEVS-RND approach. • We will show only LG with both STDEVS and DEVS-RND descriptions, for illustrative purposes. • For the rest of the components we will forget about the STDEVS description, and make use of Theorem1/Corollary1: • Concentrate only on the DEVS-RND description (much easier !)

  30. ←Equivalent→ STDEVS DEVS-RND No need to be defined Depends on r r ~U(0,1) Continue, real-valued half-open intervals collection Does nothing DETERMINISTIC Practical Inverse Transformation method Explicit stochastic-oriented definition • EXAMPLE • LG: Load (tasks) Generator • Poisson discrete process (dr= λ , with dr = departure rate) ⇒ • Exponentially-distributed inter-departure times σk between task k and task k+1 : where a =dr . • No inputs. Only internal state transitions. State s storages next departure delay.

  31. EXAMPLE • WB, S1, S2 • For these components we follow an identical technique as with LG to get the DEVS-RND models: • Make the transition functions depend on a random variable r =U(0,1): and • Define them using the Inverse Transformation Method that uses r and yields the desired stochastic properties with an algorithmically programmable formula. • Note that:There is no stochastic description at the ta(s) or λ(s) functions.

  32. EXAMPLE • WB : Workload Balancer (DEVS-RND components only) Depends on r r ~U(0,1) bf biases each port random selection Depends on r (but doesn't “use” it)

  33. EXAMPLE • Model verification Simulated(Marks) and Theoretical(Curves) results Effective Output Rate and Loss Probabilities vs. Balancing Factor bf Erlang’s Formula for M/M/1/1: LBM Model formulas: Effective Output Rate: Task Loss Probabilities: • Simulation is verified against theoretical expected results.

  34. AGENDA • Introduction. Problem Statement. Early Works. • Contribution Objectives & Drivers. • STDEVS • Strategy. Formal Definition. • Probability Spaces • Informal Idea. Formal Definition. • STDEVS • The New Components. • Theoretical & Practical Properties and Implications. • Example • Conclusions. Next Steps.

  35. CONCLUSIONS • We presented STDEVS, a novel formalism for describing stochastic discrete event systems. • STDEVS provides: • A formal framework for modeling and simulation of generalized stochastic discrete event systems. • Shares the systemtheoretical approach of DEVS. • Makes use of Probability Spaces theory. • STDEVS allows for: • A soundprobabilistic theoretical treatment of generalstochastic DEVS. • From its dynamics, not from its external behavior. • An easy practical way of implementation in simulators. • Not ‘very’different from what we were doing so far !

  36. NEXT STEPS • We are developing STDEVS–based libraries for simulation tools PowerDEVS and CD++ • Research area: Control Theory techniques applied to Admission Control in data networks. • QUESTIONS ?

  37. THANK YOU ! More information: rodrigocastro@ieee.org kofman@fceia.unr.edu.ar gwainer@sce.carleton.ca

More Related