COMPLEXITY MADE SIMPLE* * AT A SMALL PRICE C. G. Cassandras Boston University cgc@bu.edu http://vita.bu.edu/cgc Christos G. Cassandras CODES Lab. - Boston University THREE FUNDAMENTAL COMPLEXITY LIMITS NP-HARD NP-HARD LIMIT LIMIT 1/2 1/T 1/T1/2 LIMIT LIMIT oneorder orderincrease increasein inestimation estimationaccuracy accuracyrequires requires one INFO . two orders increase in learning effort SPACE two orders increase in learning effort Tradeoff between GENERALITY and EFFICIENCY STRATEGY DECISION Tradeoff between GENERALITY andT) EFFICIENCY (e.g., simulationlength length T) (e.g., simulation = ofan analgorithm algorithm of SPACE SPACE [Wolpert and Macready, 1997] [Wolpert and Macready, 1997] N NO O-F -FREE REE-L -LUNCH UNCH LIMIT LIMIT Christos G. Cassandras CODES Lab. - Boston University THREE FUNDAMENTAL COMPLEXITY LIMITS NP-HARD NP-HARD LIMIT LIMIT 1/2 1/T 1/T1/2 LIMIT LIMIT Effect is MULTIPLICATIVE! N NO O-F -FREE REE-L -LUNCH UNCH LIMIT LIMIT Christos G. Cassandras CODES Lab. - Boston University CENTRAL THEME OF THIS TALK... Rather than tackling hopelessly complex problems by brute force... • Seek “surrogate” simpler problems whose solution is the same or “good enough” SMALLPRICE: PRICE:NEAR NEAROPTIMALITY? OPTIMALITY? SMALL • Exploit problem structure whenever possible SMALLPRICE: PRICE:SUFFICIENT SUFFICIENTGENERALITY? GENERALITY? SMALL Christos G. Cassandras CODES Lab. - Boston University OUTLINE The classic complex optimization problem “SURROGATE PROBLEM” METHODS: Solutions to hard problems can be recovered from those of simpler problems CONCURRENT ESTIMATION: Answering N “what if” questions may not need N trials DECOMPOSITION: Solutions to hard problems can be recovered from those of simpler problems APPLICATIONS TO SOME COMPLEX SYSTEMS: - Resource Allocation - Hybrid Systems Christos G. Cassandras CODES Lab. - Boston University TYPICAL OPTIMIZATION OF COMPLEX SYSTEMS: REPEATED TRIAL AND ERROR SE ACE P S H ARC SIMULATE SYSTEM ESTIMATE PERFORMANCE CHOOSE NEW POINT SIMULATE SYSTEM ESTIMATE PERFORMANCE CHOOSE NEW POINT etc…etc…etc Christos G. Cassandras CODES Lab. - Boston University RESOURCE ALLOCATION PROBLEMS N USERS K RESOURCES • USERS request RESOURCES at random points in time • USERS hold RESOURCES for random periods of time EXAMPLES: EXAMPLES: Buffersallocated allocatedto tolinks linksin innetwork networkswitches switches ••Buffers Timeslots slotsallocated allocatedto totasks tasksin incomputer computersystems systems ••Time Vehiclesallocated allocatedto tomissions missionsin intransportation transportationsystems systems ••Vehicles Christos G. Cassandras CODES Lab. - Boston University PROBLEM FORMULATION • ALLOCATION VECTOR: r = [r1,K, rN ], ri ∈ {0,1,2,K} • Determine r* such that J d ( r ) = min J d ( r ) * r∈Ad COST COSTFUNCTION FUNCTION CONSTRAINT CONSTRAINTSET SET EXAMPLE: ⎧⎪ Ad = ⎨r : ⎪⎩ Christos G. Cassandras ⎫⎪ ∑ ri = K ⎬⎪ Capacity Constraint i =1 ⎭ N CODES Lab. - Boston University WHY ARE THESE PROBLEMS HARD? ( K + N − 1)! 1. Combinatorial complexity: | S| = K!( N − 1)! NP-HARD NP-HARD LIMIT LIMIT 2. Stochastic complexity: Jd(r) = E[Ld(r)] is unknown and can only be obtained through simulation or direct observation of actual system sample paths 1/2 1/T 1/T1/2 LIMIT LIMIT Christos G. Cassandras CODES Lab. - Boston University RESOURCE ALLOCATION EXAMPLE p1 λ p2 r1 μ1 1 r2 μ2 2 Allocate K buffer slots (RESOURCES) over N servers (USERS) so as to minimize BLOCKING PROBABILITY pN rN μN N For N=6, K=24 → Possible allocations = Christos G. Cassandras N subject to ∑ ri = K i =1 118,755 CODES Lab. - Boston University “SURROGATE” PROBLEM APPROACH PROBLEM: min J d ( r ) = min Eω [ Ld ( r ,ω )] r ∈Ad r ∈Ad SURROGATE PROBLEM: [ ] min J c ( ρ ) = min Eω Lc ( ρ ,ω ) ρ ∈Ac ρ ∈Ac [ρ[ρ1,…, ρ ], ρ ∈ℜ+ 1,…,ρΝΝ], ρι ι∈ℜ + CONTINUOUS CONTINUOUSSET SET CONTAINING CONTAINING AAd d Christos G. Cassandras CODES Lab. - Boston University “SURROGATE” PROBLEM APPROACH CONTINUED SURROGATE CONTINUOUS SET AC DISCRETE SET Ad 2. Observe/Simulate and estimate gradient ρn -1 H(rn,ωn) rn rn = f(ρn) ρn 3. Update 1. Transform r∗ ρ∗ ρn+1 Is r* = f(ρ*) ??? Christos G. Cassandras CODES Lab. - Boston University IS r* = f(ρ*) ??? ANSWER: YES... Theorem: Let ρ* minimize Lc(ρ). Then, there exists a discrete feasible neighbor r*∈NN(ρ*) which minimizes Ld(r) and satisfies Ld(r*) = Lc(ρ* ). [Gokbayrak [Gokbayrakand andCassandras, Cassandras,JOTA, JOTA,2001] 2001] Christos G. Cassandras CODES Lab. - Boston University “SURROGATE” PROBLEM APPROACH CONTINUED SOLUTION: Iterative algorithm, n = 0,1,…, with two steps: ρn +1 = π n +1[ρn − ηn H (rn , ωn )] 1. Update ρn: PROJECTION PROJECTIONINTO INTO FEASIBLE SET FEASIBLE SETAAc SENSITIVITY SENSITIVITYESTIMATE ESTIMATE FROM SIMULATION FROM SIMULATION AT ATDISCRETE DISCRETEALLOCATION ALLOCATION c STEP STEPSIZE SIZE (LEARNING (LEARNINGRATE) RATE) 2. Transform surrogate allocation ρn+1 into ACTUAL feasible allocation: rn +1 = f n +1 (ρ n +1 ), U O U Y O OY D O D W HHOOW THIISS?? H T T E T G E G f n +1 : Ac → Ad SEVERAL SEVERALPOSSIBLE POSSIBLEMAPPINGS MAPPINGS Christos G. Cassandras CODES Lab. - Boston University LEARNING BY TRIAL AND ERROR Design Design Parameters Parameters SYSTEM Performance Performance Measures Measures OperatingPolicies, Policies, Operating ControlParameters Parameters Control CONVENTIONAL TRIAL-AND-ERROR ANALYSIS (e.g., simulation) • Repeatedly change parameters/operating policies • Test different conditions • Answer multiple WHAT IF questions Christos G. Cassandras CODES Lab. - Boston University LEARNING THROUGH PERTURBATION ANALYSIS Design Design Parameters Parameters SYSTEM OperatingPolicies, Policies, Operating ControlParameters Parameters Control WHAT WHATIF… IF… Performance Performance Measures Measures PERTURBATION PERTURBATION ANALYSIS ANALYSIS • •Parameter Parameterpp11==aawere werereplaced replacedby bypp11==bb • •Parameter Parameterpp22==ccwere werereplaced replacedby bypp22==dd •• •• Performance PerformanceMeasures Measures under underallallWHAT WHATIFIFQuestions Questions ANSWERS TO MULTIPLE “WHAT IF” QUESTIONS AUTOMATICALLY PROVIDED Christos G. Cassandras CODES Lab. - Boston University PERTURBATION ANALYSIS BUFFER MACHINE Part Arrivals Part Departures x(t) 2 Observed sample path: K=2 1 x(t) x(t+) = 2 ⇒ Δx = -1 x(t+) = 0 ⇒ Δx = 0 2 Perturbed sample path: K=1 1 Δx = 0 Christos G. Cassandras Δx = -1 Δx = 0 CODES Lab. - Boston University PERTURBATION ANALYSIS CONTINUED PERTURBATIONDYNAMICS DYNAMICSOBTAINED OBTAINED PERTURBATION FROMOBSERVED OBSERVEDNOMINAL NOMINALSAMPLE SAMPLEPATH PATHONLY! ONLY! FROM Δx(t+δ;θ,Δθ) = f[Δx(t;θ,Δθ), x(t;θ); θ, Δθ] Whydoes doesthis thiswork? work? Why Because structural knowledge of nominal system dynamics is also used Constructability Theory: Conditions under which this is possible and methods for constructing perturbed sample paths ΔJ(t+δδ;;θ, θ,ΔΔθθ))== f[ΔJ(t; f[ΔJ(t;θ, θ,ΔΔθθ),),x(t; x(t;θθ););θ, θ,ΔΔθθ]] Concurrent Estimation: ΔJ(t+ Perturbation Analysis: Obtaining unbiased, consistent estimators dJ for dθ Christos G. Cassandras CODES Lab. - Boston University CONCURRENT ESTIMATION SE ACE P S H ARC OBSERVE SYSTEM CONCURRENT ESTIMATION ESTIMATE PERFORMANCE CHOOSE NEW POINT D I P G A R NI N R A E L OBSERVE SYSTEM CONCURRENT ESTIMATION ESTIMATE PERFORMANCE CHOOSE NEW POINT Christos G. Cassandras CODES Lab. - Boston University RESOURCE ALLOCATION EXAMPLE p1 λ p2 r1 μ1 1 r2 μ2 2 Allocate K buffer slots (RESOURCES) over N servers (USERS) so as to minimize BLOCKING PROBABILITY pN rN μN N For N=6, K=24 → Possible allocations = Christos G. Cassandras N subject to ∑ ri = K i =1 118,755 CODES Lab. - Boston University “SURROGATE METHOD” RESULTS Performance 0.4 0.35 0.3 Loss Probability 0.25 Convergence in ~10 iterations vs. 118,755 Series1 0.2 0.15 0.1 0.05 146 141 136 131 126 121 116 111 106 101 96 91 86 81 76 71 66 61 56 51 46 41 36 31 26 21 16 11 6 1 0 Iterations Christos G. Cassandras CODES Lab. - Boston University OUTLINE The classic complex optimization problem “SURROGATE PROBLEM” METHODS: Solutions to hard problems can be recovered from those of simpler problems CONCURRENT ESTIMATION: Answering N “what if” questions may not need N trials DECOMPOSITION: Solutions to hard problems can be recovered from those of simpler problems APPLICATIONS TO SOME COMPLEX SYSTEMS: - Resource Allocation - Hybrid Systems Christos G. Cassandras CODES Lab. - Boston University HIERARCHICAL DECOMPOSITION OF COMPLEX SYSTEMS TIME TIMESCALE SCALE MODEL MODEL Weeks - Months ?????? ?????? Minutes - Weeks DISCRETE-EVENT DISCRETE-EVENT PROCESSES PROCESSES Diff. Eq’s, LP Automata, Simulation, Queueing msec - Hours PHYSICAL PHYSICAL PROCESSES PROCESSES Christos G. Cassandras CODES Lab. - Boston University Diff. Eq’s, Detailed Simulation EXAMPLES • POWER SYSTEMS: Unit Dynamics → Operating Condition Changes → Power Flows • MANUFACTURING: Physical Part Processing → Start/Stop Control → Strategic Planning • HYDRODYNAMICS: Particle Dynamics → Navier-Stokes Equations Christos G. Cassandras CODES Lab. - Boston University HYBRID SYSTEMS What exactly DISCRETE-EVENT does that mean? DISCRETE-EVENT PROCESS PROCESS CONTROL CONTROL PHYSICAL PHYSICAL (TIME-DRIVEN) (TIME-DRIVEN) PROCESS PROCESS Christos G. Cassandras CODES Lab. - Boston University HYBRID SYSTEM FRAMEWORK z&2 = g 2 ( z2 , u2 , t ) z&1 = g1 ( z1, u1, t ) TIME x1 x0 x2 x1 x1 = f1 ( x0 , z1, u1, t ) Christos G. Cassandras x2 = f 2 ( x1, z2 , u2 , t ) CODES Lab. - Boston University HYBRID SYSTEM FRAMEWORK CONTINUED TIME DRIVEN : z&i = gi ( zi , ui , t ) TIME TIME TIME TIME x1 x2 x3 TIME x4 xi+1 xi+1 x0 x1 x2 x3 xi xi [Antsaklis [Antsaklis(Ed.), (Ed.),Proc. Proc.ofofIEEE, IEEE,2000] 2000] [Branicky [Branickyetetal., al.,IEEE IEEETrans. Trans.on onAC, AC,1998] 1998] Christos G. Cassandras EVENT - DRIVEN : xi +1 = f i ( xi , zi , ui , t ) CODES Lab. - Boston University HYBRID SYSTEM FRAMEWORK CONTINUED Physical State, z z&i = gi ( zi , ui , t ) hybrid … x1 Switching Times Christos G. Cassandras x2 xi xi+1 = fi(xi,ui,t) Temporal State, x SWITCHING SWITCHINGTIMES TIMES HAVE THEIR HAVE THEIROWN OWN DYNAMICS! DYNAMICS! CODES Lab. - Boston University OPTIMAL CONTROL PROBLEMS • Get to a desired final physical state zN in minimum time xN, subject to N-1 switching events • Minimize deviations from N desired physical states: (zi - qi)2 and deviations from target desired times: (xi - τi)2 In general: N min ∑ ∫ Li ( zi (t ), xi , ui (t ))dt u i =1 xi xi −1 Physical state Christos G. Cassandras z&i = gi ( zi , ui , t ) s.t. xi+1 = fi(xi,ui,t) Temporal state CODES Lab. - Boston University TIME-DRIVEN AND EVENT-DRIVEN DYNAMICS Time-Driven Dynamics (STATE = z): z&(t ) = g (z , u, t ) or: zk +1 = g k (zk , uk ) Event-Driven Dynamics (STATE = Event Times xk,i): xk +1,i = max{xk , j + a k , j u k , j } j∈Γi Event counter k = 1,2,... Event index i∈E = {1,…,n} Christos G. Cassandras CODES Lab. - Boston University HYBRID SYSTEMS IN MANUFACTURING Key questions facing manufacturing system integrators: • How to integrate ‘process control’ with ‘operations control’ ? • How to improve product QUALITY within reasonable TIME ? PROCESS CONTROL • Physicists • Material Scientists • Chemical Engineers • ... Christos G. Cassandras OPERATIONS CONTROL • Industrial Engineers, OR • Schedulers • Inventory Control • ... CODES Lab. - Boston University HYBRID SYSTEMS IN MANUFACTURING CONTINUED Throughout a manuf. process, each part is characterized by • A PHYSICAL state (e.g., size, temperature, strain) • A TEMPORAL state (e.g., total time in system, total time to due-date) PHYSICAL STATE Time-driven Dynamics z&i = gi ( zi , ui , t ) NEW PHYSICAL STATE OPERATION OPERATION TEMPORAL STATE Christos G. Cassandras xk +1,i = max{xk , j + a k , j u k , j } j∈Γi Event-driven Dynamics NEW TEMPORAL STATE CODES Lab. - Boston University HYBRID SYSTEMS IN MANUFACTURING x i = max {x i − 1 , a i }+ s i ( u i ) EVENT-DRIVEN COMPONENT Part Arrivals Part Departures ai, zi(ai) TIME-DRIVEN COMPONENT Christos G. Cassandras CONTINUED xi, zi(xi) ui z&i (t ) = g (zi , ui , t ) CODES Lab. - Boston University EXAMPLE …a to nd m t u (e.g his s st be ., d tate pro e si ces red sed tem per atu re) STATE STATE rts a t s ar t p y r Eve is state at th zi(ui) si(ui) Christos G. Cassandras PROCESS PROCESS TIME TIME CODES Lab. - Boston University HIERARCHICAL DECOMPOSITION N min ∑ ∫ Li ( zi (t ), xi , ui (t ))dt u Let: xi i =1 z&i = gi ( zi , ui , t ) s.t. xi −1 si = xi - xi-1 xi+1 = fi(xi,ui,t) Time spent at ith operating region (mode) Consider objective functions: N min ∑ [φi ( zi , ui , si ) + ψ i ( xi , si )] u i =1 Physical process Christos G. Cassandras Switching time process CODES Lab. - Boston University HIERARCHICAL DECOMPOSITION CONTINUED z&i = gi ( zi , ui , t ) N min ∑ [φi ( zi , ui , si ) + ψ i ( xi , si )] u s.t. xi+1 = fi(xi,ui,t) i =1 HIGHER LEVEL PROBLEM: LOWER LEVEL PROBLEMS: N [ min ∑ φi ( si ) + ψ i ( xi , si ) s i =1 * min φi ( zi , ui , si ) ui ] s.t. xi+1 = fi(xi,si,t) s.t. z&i = gi ( zi , ui , t ) FIXED si Christos G. Cassandras CODES Lab. - Boston University LOWER LEVEL PROBLEM Parameterized by switching times LQ PROBLEM: min φi ( zi , ui , si ) = h ( z fi − zdi ) + ∫ 1 2 ui s.t. z&i = azi + bui , zi (0) = ς i si 1 0 2 2 2 i ru (t )dt Penalize final state deviation STANDARD LQ SOLUTION METHOD: φi ( si ) = h( z − zdi ) + ∫ * Christos G. Cassandras 1 2 * fi 2 si 1 0 2 * i ru (t )dt CODES Lab. - Boston University HIGHER LEVEL PROBLEM N [ min ∑ φi ( si ) + ψ i ( xi ) s i =1 * ] s.t. x i = max {x i − 1 , a i }+ s i ( u i ) Given arrival sequence (INPUT) Cost of optimal process control over interval [0, si] Processing time (CONTOLLABLE) Cost related to event timing EXAMPLE : Christos G. Cassandras ψ i ( xi ) = ( xi − τ i ) CODES Lab. - Boston University 2 HYBRID CONTROLLER STRUCTURE f, ψ Hybrid controller steps: Event timing xi+1 = fi(xi,si,t), i = 1,…,N • System identification s* • Lower-level solution Higher-level Controller • Higher-level solution • Lower-level solution • Operation... s* φ*(s) Lower-level Controller u*(s*) &z = g ( z, u, t ) g, φ Physical processes Christos G. Cassandras CODES Lab. - Boston University HOW DO WE SOLVE THE HIGHER LEVEL PROBLEM? N [ min ∑ φi ( si ) + ψ i ( xi ) s i =1 * Even if these are convex, problem is still NOT convex in s! ] s.t. x i = max {x i − 1 , a i }+ s i ( u i ) Causes nondifferentiabilities! 1. Even though problem is NONDIFFERENTIABLE and NONCONVEX, optimal solution shown to be unique. [Cassandras [Cassandrasetetal., al.,IEEE IEEETrans. Trans.on onAC, AC,2001] 2001] Christos G. Cassandras CODES Lab. - Boston University SOLVING THE HIGHER LEVEL PROBLEM CONTINUED 2. Optimal state trajectory can be decomposed into “blocks” a1 a2 a3 a4 a5 a6 x1 x2 x3 x4 x5 x6 a7 a8 x7 a9 IME T N I T JUS x8 Each “block” corresponds to a Constrained Convex Optimization problem ⇒ search over 2N-1 possible Constrained Convex Optimization problems BUT algorithms that only need N Constrained Convex Optimization problems have been developed ⇒ SCALEABILITY Christos G. Cassandras CODES Lab. - Boston University EXAMPLES: INTERACTIVE JAVA APPLETS See http://vita.bu.edu/cgc/Hybrid/ Christos G. Cassandras CODES Lab. - Boston University SOME OPEN PROBLEMS, RESEARCH AREAS • Ordinal Optimization • Generality of “Surrogate” approaches • Dynamic Optimization of Complex Systems (beyond Dynamic Programming…) • Hybrid Systems: Modeling, Verification, Stochastic Optimization, Computation Methods • Robustness vs. Optimality in Complex Systems • What is the right resolution level for modeling Complex Systems? Christos G. Cassandras CODES Lab. - Boston University ACKNOWLEDGEMENTS Thanks to several co-workers whose contributions are reflected in this talk… … All 13 Former + Current PhD Students… …Colleagues… Y.C. (Larry) Ho Wei-Bo Gong Yorai Wardi Young Cho Liyi Dai Xiren Cao Ted Djaferis Doug Looze Felisa Vazquez-Abad …and Sponsors… NSF, AFOSR, AFRL, DARPA, NASA, EPRI, ARO, UT, ALCOA, NOKIA, GE Christos G. Cassandras CODES Lab. - Boston University