1 / 48

As cheap as possible:

As cheap as possible:. Linearly Priced Timed Automata. Gerd Behrmann , Ed Brinksma , Ansgar Fehnker , Thomas Hune , Kim Lars en , Paul Pet tersson , Judi Romijn, Frits Vaandrager. Brics Aalborg, Nijmegen, Twente , Uppsala, CMU, TERMA, TUE. 25min. 20min. 10min. 5min. Can they make

griffith
Download Presentation

As cheap as possible:

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. As cheap as possible: Linearly Priced Timed Automata Gerd Behrmann, Ed Brinksma, Ansgar Fehnker,Thomas Hune, Kim Larsen,PaulPettersson,JudiRomijn, Frits Vaandrager Brics Aalborg, Nijmegen,Twente, Uppsala, CMU,TERMA,TUE

  2. 25min 20min 10min 5min Can they make it within 60 minutes ? Unsafe Safe Motivation Observation (VHS project) Many scheduling problems can be phrased in a natural way as reachability problems for timed automata.

  3. unsafe unsafe unsafe take? take? L==0 L==0 L==0 unsafe take! y:=0 take! y:=0 take! y:=0 y>=10 y>=20 y>=5 release? release? release! release! release! release! release! release! L==0 L==1 L==1 L==1 y>=25 take! y:=0 y>=25 y>=25 y>=25 take! y:=0 take! y:=0 take! y:=0 safe safe safe release! release! L==1 y>=25 take! y:=0 safe Motivation 25min 20min 10min 5min What is the fastest schedule? Can they make it within 60 minutes ? What schedule minmizes unsafe time? What schedule minimizes bridge crossings? Unsafe Safe

  4. Timed Automata (A review) Linearly Priced Timed Automata A basic Algorithm Efficient Data Structures Uniformly Priced Timed Automata More efficient Data Structures Improved State-Space Exploration Minimum-Cost Order Search, Estimates of Remaining Cost, Heuristics Results Bridge Problem Job-Shop Problems Aircraft Landing others Conclusion Outline

  5. TimedAutomata (UPPAAL) • Network of Automata • Synchronization (CCS-like) a! a?

  6. x < 7 3 < x < 7 a! TimedAutomata (UPPAAL) • Network of Automata • Synchronization (CCS-like) • Clocks in description • Time passes uniformly • Guard/reset on action • Invariants on location • Infinitely many states! y = 4 a? y:=0

  7. Regions (review) Alur & Dill x<3 x<3 y>2 c a b {x:=0} y y y 3 3 3 2 2 2 1 1 1 x x x 1 2 3 1 2 3 1 2 3 An equivalence class (i.e. a region). In fact there is only a finite number of regions!!

  8. 3 3 3 2 2 2 1 1 1 x x x Alur & Dill Regions (review) x<3 x<3 y>2 c a b {x:=0} y y y 1 2 3 1 2 3 1 2 3 Transitions with and w/o reset and delay can be considered as transitions on regions!

  9. 3 2 1 x Zones (review) x<3 x<3 y>2 c a b {x:=0} y y y 3 3 2 2 1 1 x x 1 2 3 1 2 3 1 2 3 Convex unions of regions are called zones. Delay, reset, transition in terms of zones • Data Structures like DBMs, CDDs g efficiency!

  10. Timed Automata + Costs on transitions and locations Cost of performing transition: Transition cost Cost of performing delay d: ( d x location cost ) cost’=1 cost’=2 cost’=0 x<3 x<3 cost+=4 y>2 c a {x:=0} • Trace: (2.5) (a,x=y=0) (b,x=y=0) (b,x=y=2.5) (a,x=0,y=2.5) 4 2.5 x 2 0 • Cost of Execution Trace: Sum of costs: 4 + 5 + 0 = 9 Linearly Priced Timed Automata b Problem: Finding the minimum cost of reaching locationc

  11. cost d+l*(t-T) E earliest landing time T target time L latest time e cost rate for being early l cost rate for being late d fixed cost for being late e*(T-t) t E T L Example: Aircraft Landing Planes have to keep separation distance to avoid turbulences caused by preceding planes

  12. Example: Aircraft Landing x <= 5 x >= 4 4 earliest landing time 5 target time 9 latest time 3cost rate for being early 1 cost rate for being late 2fixed cost for being late x=5 land! cost+=2 x <= 5 x <= 9 cost’=3 cost’=1 x=5 land! Planes have to keep separation distance to avoid turbulences caused by preceding planes

  13. Priced Regions cost 5 4 3 2 1

  14. Priced Regions cost 5 4 3 2 1

  15. Priced Regions cost y 5 4 5 3 2 3 2 2 1 1 1 2 3 x costs

  16. State-Space Exploration + Use of global variable Cost Updated Cost whenever goal state with min( C ) <Cost is found: Terminates when entire state-space is explored An Algorithm Cost= Cost=80 80 60 Cost=60

  17. Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C) =  and mincost(C)<Cost then Cost:=mincost(C) if forall (l,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost An Algorithm

  18. Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C) =  and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost Performs: symbolic operations Delay, Conjun-ction, and Reset of clocks. An Algorithm

  19. Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C) =  and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost 5 5 6 3 4 3 2 3 2 An Algorithm : preorder that defines “better” cost zones.

  20. Cost:=, Pass := {}, Wait := {(l0,C0)}, Goal= while Wait  {} do select (l,C) from Wait if (l,C) =  and mincost(C)<Cost then Cost:=mincost(C) if forall (l’,C’) in Pass: C’ C then add (l,C) to Pass forall (m,D) such that (l,C) (m,D): add (m,D) to Wait Return Cost An Algorithm

  21. An Algorithm Theorem When the algorithm terminates, the value of COSTequals mincost() Theorem The algorithm terminates Can it be done efficiently?

  22. Timed Automata. (A review} Linearly Priced Timed Automata A basic Algorithm Efficient Data Structures Uniformly Priced timed Automata More efficient Data Structures Improved State-Space Exploration Minimum-Cost Order Search, Estimates of Remaining Cost, Heuristics Results Bridge Problem Job-Shop Problems Aircraft Landing others Conclusion Outline

  23. cost=c+ax + a y x y Priced Zones Basic idea: Define a linear cost function on zones BUT: Priced zones are not closed under delay, transitions, resets y x

  24. cost=c’’+3x – 1 y cost=c’+2x – 0 y cost’=1 cost’=2 cost’=0 x<3 x<3 cost+=4 y>2 c a b {x:=0} Priced Zones Basic idea: Define a linear cost function on zones BUT: Priced zones are not closed under delay, transitions, resets y cost=c+2x – 1 y x

  25. cost’=1 cost’=2 cost’=0 x<3 x<3 cost+=4 y>2 c a b {x:=0} Priced Zones Basic idea: Define a linear cost function on zones BUT: Priced zones are not closed under delay, transitions, resets y cost=c+2x – 1 y x

  26. cost’=1 cost’=2 cost’=0 x<3 x<3 cost+=4 y>2 c a b {x:=0} Priced Zones Basic idea: Define a linear cost function on zones BUT: Priced zones are not closed under delay, transitions, resets y cost=c’’+1x – 1 y cost=c’+2x – 2 y x

  27. cost=c’’ + 1 y cost=c’ – 1 y cost’=1 cost’=2 cost’=0 x<3 x<3 cost+=4 y>2 c a b {x:=0} Priced Zones Basic idea: Define a linear cost function on zones BUT: Priced zones are not closed under delay, transitions, resets y cost=c+2x – 1 y x

  28. Timed Automata. (A review} Linearly Priced Timed Automata A basic Algorithm Efficient Data Structures Uniformly Priced Timed Automata More efficient Data Structures Improved State-Space Exploration Minimum-Cost Order Search, Estimates of Remaining Cost, Heuristics Results Bridge Problem Job-Shop Problems Aircraft Landing others Conclusion Outline

  29. 25min 20min 10min 5min What is the fastest schedule ? Unsafe Safe Uniformly Priced Timed Automata UPTA are LPTA where all locations have the same rate

  30. Uniformly Priced Timed Automata UPTA are LPTA where all locations have the same rate Result A small modification of the DBM-operations for ordinary timed automata is sufficient to solve cost (time) optimality problems

  31. Timed Automata. (A review} Linearly Priced Timed Automata A basic Algorithm Efficient Data Structures Uniformly Priced Timed Automata More efficient Data Structures Improved State-Space Exploration Minimum-Cost Order Search, Estimates of Remaining Cost, Heuristics Results Bridge Problem Job-Shop Problems Aircraft Landing others Conclusion Outline

  32. Verification Algorithms: Check a logical property of the entire state-space of a model Efficient blind search Optimization Algorithms: Find (near) optimal solutions Use techniques to avoid non-optimal parts of the state-space (e.g. Branch and Bound) Objective: Bridge the gap between these two New techniques and applications in UPPAAL Verification vs. Optimization Safe side reachable? 80 Min time of reaching safe side? 60

  33. The basic algorithm finds the minimum cost trace Breadth or Depth-first search-order Problem: Searches the entirestate-space Minimum-Cost Search Order: Always explore state with smallest minimum cost first Minimum-Cost Order

  34. Fact 1: First goal state found is optimal Cost grows along all paths The search can terminate when first goal state found Like Dijkstra’s shortest path algorithm Fact 2: No other search order explores fewer states Simpler algorithm: variable Cost no longer needed Minimum-Cost Order

  35. Often a conservative estimate of the remaining cost can be found REM( l, C ) = conservative estimate of remaining cost Bridge example: REM( l, C ) = time of slowest person on Unsafe side Estimates of Remaining Cost At least 25 mins needed to complete schedule

  36. Basic Algorithm + Estimate of remainingcost:Only states with (min(C) + REM(l, C)) < Costare further explored Estimates of Remaining Cost Cost=80 min( C ) + REM( l, C )  80

  37. Minimum Cost + Estimate of remaining cost:Explore states with smallest ( min(C) + REM( l, C ) ) first Estimates of Remaining Cost • Basic Algorithm + Estimate of remainingcost:Only states with (min(C) + REM(l, C)) < Costare further explored Cost=80 min( C ) + REM( l, C )  80

  38. Allows the users to control the search order according to heuristics Symbolic states extended to (l, C, h), whereh is the priority of a state Transitions are annotated with assignments to h Flexible! Basic Algorithm + Heuristics:State with highest h is explored first Using Heuristics

  39. Using Heuristics Try to schedule planes in the order of their preferred landing times

  40. Timed Automata. (A review} Linearly Priced Timed Automata A basic Algorithm Efficient Data Structures Uniformly Priced Timed Automata More efficient Data Structures Improved State-Space Exploration Minimum-Cost Order Search, Estimates of Remaining Cost, Heuristics Results Bridge Problem Sidmar Aircraft Landing others Conclusion Outline

  41. Number of symbolic states generated with cost-extended version of UPPAAL Minimum Cost Order + Estimate of Remaining cost<10% of Breadth-First Search Example: Bridge Problem What is the fastest schedule? BF = Breadth-First, DF = Depth-First, MC = Minimum Cost Order, MC+ = MC + REM

  42. SIDMAR Steel Production Plant Crane A Machine 2 Machine 3 Machine 1 • A. Fehnker [RTCSA99], T. Hune, K. G. Larsen, P. Pettersson [DSV00] • Case study of Esprit-LTRproject 26270 VHS • Physical plant of SIDMARlocated in Gent, Belgium • Part between blast furnace and hot rolling mill Objective:model the plant, obtain schedule and control program for plant Lane 1 Machine 4 Machine 5 Lane 2 Buffer Crane B Storage Place Continuos Casting Machine

  43. SIDMAR Steel Production Plant Crane A Input: sequence of steel loads (“pigs”) Machine 2 Machine 3 Machine 1 @10 @20 2 @10 2 2 Lane 1 Machine 4 Machine 5 15 @10 Load follows Recipe to obtain certain quality, e.g: start; T1@10; T2@20; T3@10; T2@10; end within 120 Lane 2 16 Buffer Crane B =127 Storage Place Optimal schedules forten batchesusing guiding with priorities. Only for two batches without @40 Continuos Casting Machine Output: sequence of higher quality steel.

  44. Aircraft Landing Problem runways Benchmark by Beasley et al 2000

  45. Conclusion • Advantages • Easy and flexible modeling of systems • Whole range of verification techniques becomes available • Controller/Program synthesis • Disadvantages • Existing scheduling approaches (still) perform somewhat better • Our goal • See how far we get • Integrate model checking and scheduling theory • New discipline of Timing Technology? • EU IST project Ametist

  46. Papers: Efficient Guiding Towards Cost-Optimality in UPPAAL [TACAS’01] Minimum Cost-Reachability for Priced Timed Automata [HSCC’01] As Cheap as Possible: Efficient Cost-Optimal Reachability for Priced Timed Automata [CAV’01] Citius, Vilius, Melius: Guiding and Cost-Optimality in Model Checking of Timed and Hybrid Systems, PhD Thesis Ansgar Fehnker, University of Nijmegen, April 2002 Conclusion • Tool: • UPPAAL CORA!!

  47. End of slide show

  48. THE END

More Related