Discrete Event Dynamic Systems Lecture 1 by Y
Discrete Event Dynamic Systems — Lecture #1 — by Y. C. Ho September, 2003 Tsinghua University, Beijing, CHINA
Discrete Event Dynamic Systems — An Overview — TOPICS: • • What are DEDS? Models of DEDS Tools for DEDS Future Directions for DEDS 2
Resources • Books: – Y. C. Ho, DEDS Analyzing Performance and Complexity in the Modern World IEEE Press book, 1992 – C. Cassandras & S Lafortune, Discrete Event Systems, Kluwer 1999 (text book for this course) • WWW Pages: www. hrl. harvard. edu/~ho/CRCD or DEDS with links to Boston University and U. of Mass. Amherst • Video Tape: IEEE Educational Services Video Tape: “Analyzing Performance and Complexity in the Modern World” 1992 3
What are Continuous Variable Dynamic Systems (CVDS)? 4
5
What are Discrete Event Dynamic Systems (DEDS)? 6
An Airport 7
More Examples of DEDS • • • Manufacturing Automation - a SC Fab Communication Network - the Internet Military C 3 I systems Traffic - land, sea, air Paper processing bureaucracy - insurance co. • • The pervasive nature of DEDS in modern civilization 8
Nature of DEDS • A set of tasks or jobs: parts to be manufactured, messages to be transmitted, etc • A set of resources: machines, AGVs, nodal CPUs, communication links and subnetworks, etc • Routing of job among resources: production plans, virtual circuits, etc • Scheduling of jobs as they compete for resources: queues and event timing sequences 9
A Typical DEDS Trajectory Discrete state STATES are piecewise constant HOLDING TIMES are deterministic/random EVENTS triggers state transition TRAJECTORY defined by (state, holding time) sequence x 3 x 4 Holding time x 2 x 5 x 1 e 2 e 3 e 4 e 5 e 6 time 10
Comparison with a CVDS Trajectory Discrete state dx/dt = f(x, u, t) time Hybrid System: each state can hide CVDS behavior 11
Modeling Ingredients • • • Discrete States: combinatorial explosion Stochastic Effects: unavoidable uncertainty Continuous time and performance measure Dynamical: Hierarchical: Computational vs conceptual 12
Mathematical Specification • State Space Approach: – X – A – G(x) – f m the state space, a finite set, x X. state: # in queue. Event set, finite A. e. g. arrival(a), departure(d). Enabled event set in x, G(x) A, if x≥ 1, G(x)={a, d}; if x=0, G(x)={a}. State transition function Xx. G(x)->X. Could write down f∈{+1; 0; -1}, because these are transitions possible. • Input/output Approach: – – – String: sequence of events s = bg. . Language: all possible event sequences in a DEDS Operations: defined on strings, e. g. , “shuffle” Score: # of occurrences of event types in a string Trace: sequence of state, event pair 13
Mathematical Specification (contd. ) Introduction of “TIME” for quantitative performance analysis purposes Clock Mechanism (a two dimensional array of numbers) cn( ) = the nth lifetime of the event t (n) = the time of the nth occurrence of the event cn( ) Event type t (1) t (2) t (n-1) t (n) time 14
Time Evolution of a DEDS One event delay x Event enabling G(x) Minimum of * State lifetimes transition Life time generation c n ( ) Simulation of a DEDS New state Generate lifetime of new event Place the end of event in future event list Search for next event to occur Transition to next state 15
Ingredients and Models STATE: EVENT FEASIBILITY: STATE TRANSITION: TIMING: RANDOMNESS: STATE EVENT FEASIBLE EVENT TIME TRANSITION RANDOMNESS not inherent for in/out, not necessarily complete fundamental, instantaneous, marks state transition basic to control basic to dynamics essential for performance evaluation facts of life FSM (Markov Chains) Queuing Network Min-Max Algebra yes input yes yes Petri Nets Language & Processes GSMP yes graphical yes no yes yes yes not really yes no yes yes (yes) yes yes no no yes no/yes no yes 16
Model of DEDS Logical Untimed Timed Finite State Machines & Petri Nets Algebraic Performance Finitely Recursive Processes Min-Max Algebra Generalized Semi-Markov Processes GOAL: Finite representation. Qualitative properties, Quantitative Performance 17
Performance Design & Evaluation • • Building Models Validation and analysis Evaluating the model Optimization and tuning ~40% ~10% ~25% Emphasis of this course on last two topics! 18
Rationale for Performance Evaluation • Answer “what-if ” questions J( + )=? Sensitivity analysis • Explore performance surface, J( ) at (i), i=1, 2, 3, . . . • Find optimal parameter settings = optimal • On-line real time tuning of the system tracking optimal as the environment changes 19
Qualitative Performance Evaluation • Deadlocks in communication network or databases - mutual waiting for others to release resources, liveliness in PN, forbidden states in FSM • Failsafe interlock in manufacturing automation - limit switches, automatic shutdown, reachability, controllability • Stability issues in C 3 I simulation - for want of a nail, a horse shoe was undone, . . . , war was lost. Numerical stability of sample paths 20
Quantitative Performance Evaluation • Analytical Tools (including Q-network Theory): quick “what-if”, limited state transition possibilities • Simulation: completely general, easy to visualize and understand, easy to misuse, and time consuming • Hybrid Tools: Perturbation analysis, likelihood ratio methods, sample path analysis, ordinal optimization • Hardware Solutions: massively parallel computers 21
Example of DEDS control problems • Access control: allowing task to compete for resources, e. g. , telephone busy signal • Routing control: assigning a task to one of many possible resources, e. g. , which route should a packet be routed • Scheduling control: determine to order to serve several tasks, e. g. , which lot of part to be machined first 22
Three Common Implementations of a simple queue-server system A l m B m l l m C l l 2 m 23
Three Approaches to a simple control problem -minimum time path from A to B I. Open Loop Control: Dead Reckoning A B V II. Feedback crosswind A B V Control: Continuous Dead Reckoning - line of sight policy A B III. Stochastic Control: l. o. s. policy with statistical correction A B 24
Analogs in Scheduling Theory and Practice I. Deterministic Batch Solution (Open Loop): due dates for all orders known; minimizes tardiness; mixed integer programming solution; upset by disturbance II. Heuristic Dispatch Rule (Feedback Control): earliest due date first, longest make span first, longest buffer first, least slack first, etc III. Smart Dispatch Policies (Stochastic Control): account for stochastic arrival and disturbances; use AI and learning 25
Historical Perspective on the Control and Optimization of DEDS and CVDS History for CVDS: Development of mechanics for CVDS Self regulating governor for steam engines <1940 WWII Servomechanism Modern control theory and practice >1940 History of DEDS: Birth of OR 1945 Emergence of human made systems 1970’s Theoretical foundations & practical success stories present 26
The AI-OR-CT Intersection Computational Intelligence DEDS Control Theory Operations Research 27
Related DEDS Models • Hybrid System • Queuing Networks • Petri-nets • Min-Max Algebra 28
HYBRID SYSTEM MODELS PLANT REPLACE THE USUAL CONTROL LOOP BY CONTROLLER SUPERVISOR EVENTS Plant assumed to have only time-driven dynamics? (time and event driven) PLANT TIME DRIVEN CONTROLLER Christos G. Cassandras CODES Lab. - Boston 29
HYBRID SYSTEM MODELS PLANT EVENT-DRIVEN DYNAMICS TIME-DRIVEN DYNAMICS • Plant: time-driven + event-driven dynamics • Controller affects both time-driven + event-driven components • Control may be continuous signal and/or discrete event CONTROLLER Christos G. Cassandras CODES Lab. - Boston 30
HYBRID SYSTEM MODELS CONTINUED Physical State, z … x 1 Switching Time Christos G. Cassandras x 2 Temporal State, x xi xi+1 = fi(xi, ui, t) SWITCHING TIMES HAVE THEIR OWN DYNAMICS! CODES Lab. - Boston 31
Simulation Language -SHIFT http: //www. path. berkeley. edu/shift/ http: //www. gigascale. org/shift/ for Lambda-SHIFT (advanced)
SELECTED REFERENCES • Pepyne D. L. , and Cassandras, C. G. , "Modeling, Analysis, and Optimal Control of a Class of Hybrid Systems", J. of Discrete Event Dynamic Systems, Vol. 8, 2, pp. 175 -201, 1998. • Cassandras, C. G. , and Pepyne D. L. , "Optimal Control of a Class of Hybrid Systems", Proc. of 36 th IEEE Conf. Decision and Control, pp. 133 -138, December 1997. • Cassandras, C. G. , Pepyne D. L. , and Wardi, Y. , "Generalized Gradient Algorithms for Hybrid System Models of Manufacturing Systems", Proc. of 37 th IEEE Conf. Decision and Control, December 1998. • Cassandras, C. G. , Pepyne D. L. , and Wardi, Y. , "Optimal Control of Systems with Time-Driven and Event-Driven Dynamics", Proc. of 37 th IEEE Conf. Decision and Control, December 1998. Christos G. Cassandras CODES Lab. - Boston 33
Queuing Networks • Server are work stations: service duration can be deterministic or random • Jobs pass from server to server according to routing plan: routing probability matrix • Performance measure: delay, queue length, through put, etc. • Closed Form Solutions: product formula • Software Solution: QNA and MPX® 34
Essence of Q-Network Equations • Traffics Equations (Global) – traffic mean (linear eqs. , continuity of flow) – traffic variance (linear eqs. Approximate) • Nodal equations (Local) – solution of G/G/m queue • This is Queuing Network Analysis (QNA) 35
® MPX Demo Separately presented 36
Petri-Nets • Finite graphical representation for possibly infinite state machines • Incorporates detail timing information explicitly • Good for small size problems • Many books and forthcoming special issue of Journal on DEDS, Jan 2000. 37
Min-Max Algebra • Primarily for deterministic and periodic DEDS • Best application - Analyzing and optimizing complex train schedule • Experts in France, Netherlands, and China 38
- Slides: 38