Modelling and optimizing resources in timed systems Modelling resources in timed systems System resources might be relevant and even crucial information energy consumption, memory usage, price to pay, bandwidth, ... � timed automata are not powerful enough! A possible solution: use hybrid automata The thermostat example T ≤ 19 22 Off On 21 ˙ ˙ T = − 0 . 5 T T =2 . 25 − 0 . 5 T 19 ( T ≥ 18) ( T ≤ 22) 18 T ≥ 21 2 4 6 8 10 time 12/45
Modelling and optimizing resources in timed systems Modelling resources in timed systems System resources might be relevant and even crucial information energy consumption, memory usage, price to pay, bandwidth, ... � timed automata are not powerful enough! A possible solution: use hybrid automata Theorem [HKPV95] The reachability problem is undecidable in hybrid automata. [HKPV95] Henzinger, Kopke, Puri, Varaiya. What’s decidable wbout hybrid automata? (SToC’95) . 12/45
Modelling and optimizing resources in timed systems Modelling resources in timed systems System resources might be relevant and even crucial information energy consumption, memory usage, price to pay, bandwidth, ... � timed automata are not powerful enough! A possible solution: use hybrid automata Theorem [HKPV95] The reachability problem is undecidable in hybrid automata. An alternative: weighted/priced timed automata [ALP01,BFH+01] � hybrid variables do not constrain the system hybrid variables are observer variables [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 12/45
Modelling and optimizing resources in timed systems A third model of the system Oxford x :=0 x :=0 x :=0 0 = : x + 3 + 3 + 3 + 3 21 ≤ x ≤ 24 10 ≤ x ≤ 12 12 ≤ x ≤ 15 Dover 9 ≤ x ≤ 15 Poole Stansted x =27 x :=0 14 ≤ x ≤ 15 x =17 + 2 London + 2 x :=0 x =3 + 2 + 7 x :=0 Calais 27 ≤ x ≤ 30 x :=0 x :=0 + 1 St Malo Nantes 1 7 + 3 ≤ x =13 x ≤ x =6 x : 2 x :=0 = 1 0 x :=0 + 2 Paris 6 3 ≤ ≤ x x + 3 + 3 ≤ ≤ 0 x 3 6 = : = : 2 x 0 + 3 + 2 7 4 9 ≤ 4 1 ≤ 2 ≤ x x = x ≤ ≤ ≤ 1 x 2 2 3 1 2 Pontivy 13/45
Modelling and optimizing resources in timed systems How much fuel will I use? Oxford x :=0 x :=0 x :=0 0 = : x + 3 + 3 + 3 + 3 21 ≤ x ≤ 24 10 ≤ x ≤ 12 12 ≤ x ≤ 15 Dover 9 ≤ x ≤ 15 Poole Stansted x =27 x :=0 14 ≤ x ≤ 15 x =17 + 2 London + 2 x :=0 x =3 + 2 + 7 x :=0 Calais 27 ≤ x ≤ 30 x :=0 x :=0 + 1 St Malo Nantes 1 7 + 3 ≤ x =13 x ≤ x =6 x : 2 x :=0 = 1 0 x :=0 + 2 Paris 6 3 ≤ ≤ x x + 3 + 3 ≤ ≤ 0 x 3 6 = : = : 2 x 0 + 3 + 2 7 4 9 ≤ 4 1 ≤ 2 ≤ x x = x ≤ ≤ ≤ 1 x 2 2 3 1 2 Pontivy It is a quantitative (optimization) problem in a priced timed automaton: at least 68 anti-planet units! 13/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 + 0 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 + 0 + 0 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 + 0 + 0 + 0 . 7 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 + 0 + 0 + 0 . 7 + 7 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 1 . 3 c u 0 . 7 c → � ℓ 0 − − → ℓ 0 − − → ℓ 1 − − → ℓ 3 − − − → ℓ 3 − − x 0 1 . 3 1 . 3 1 . 3 2 y 0 1 . 3 0 0 0 . 7 cost : 6 . 5 + 0 + 0 + 0 . 7 + 7 = 14 . 2 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? 5 t + 10(2 − t ) + 1 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? 5 t + 10(2 − t ) + 1 , 5 t + (2 − t ) + 7 [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? min ( 5 t + 10(2 − t ) + 1 , 5 t + (2 − t ) + 7 ) [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? 0 ≤ t ≤ 2 min ( 5 t + 10(2 − t ) + 1 , 5 t + (2 − t ) + 7 ) = 9 inf [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems Weighted/priced timed automata [ALP01,BFH+01] + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost for reaching � ? 0 ≤ t ≤ 2 min ( 5 t + 10(2 − t ) + 1 , 5 t + (2 − t ) + 7 ) = 9 inf � strategy: leave immediately ℓ 0 , go to ℓ 3 , and wait there 2 t.u. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . 14/45
Modelling and optimizing resources in timed systems The region abstraction is not fine enough time elapsing reset to 0 15/45
Modelling and optimizing resources in timed systems The corner-point abstraction 0 3 0 0 7 0 0 3 7 16/45
Modelling and optimizing resources in timed systems The corner-point abstraction 0 3 0 0 7 0 0 3 7 We can somehow discretize the behaviours... 16/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem 17/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem t 1 t 2 t 3 t 4 t 5 ⋅⋅⋅ 17/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem 8 t 1 t 2 t 3 t 4 t 5 t 1 + t 2 ≤ 2 < ⋅⋅⋅ x ≤ 2 : 17/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem 8 t 1 t 2 t 3 t 4 t 5 t 1 + t 2 ≤ 2 < ⋅⋅⋅ y :=0 x ≤ 2 y ≥ 5 t 2 + t 3 + t 4 ≥ 5 : 17/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem 8 t 1 t 2 t 3 t 4 t 5 t 1 + t 2 ≤ 2 < ⋅⋅⋅ y :=0 x ≤ 2 y ≥ 5 t 2 + t 3 + t 4 ≥ 5 : Lemma Let Z be a bounded zone and f be a function n X f : ( t 1 , ..., t n ) �→ c i t i + c i =1 well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. 17/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Optimal reachability as a linear programming problem 8 t 1 t 2 t 3 t 4 t 5 t 1 + t 2 ≤ 2 < ⋅⋅⋅ y :=0 x ≤ 2 y ≥ 5 t 2 + t 3 + t 4 ≥ 5 : Lemma Let Z be a bounded zone and f be a function n X f : ( t 1 , ..., t n ) �→ c i t i + c i =1 well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. � for every finite path 휋 in 풜 , there exists a path Π in 풜 cp such that cost(Π) ≤ cost( 휋 ) [Π is a “corner-point projection” of 휋 ] 17/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , 18/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, 18/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, there exists a path 휋 휀 of 풜 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 18/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, there exists a path 휋 휀 of 풜 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 For every 휂 > 0, there exists 휀 > 0 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 ⇒ ∣ cost(Π) − cost( 휋 휀 ) ∣ < 휂 18/45
Modelling and optimizing resources in timed systems Optimal-cost reachability Theorem [ALP01,BFH+01,BBBR07] The optimal-cost reachability problem is decidable (and PSPACE-complete) in (priced) timed automata. [ALP01] Alur, La Torre, Pappas. Optimal paths in weighted timed automata (HSCC’01) . [BFH+01] Behrmann, Fehnker, Hune, Larsen, Pettersson, Romijn, Vaandrager. Minimum-cost reachability in priced timed automata (HSCC’01) . [BBBR07] Bouyer, Brihaye, Bruy` ere, Raskin. On the optimal reachability problem (Formal Methods in System Design) . 19/45
Modelling and optimizing resources in timed systems Going further 1: mean-cost optimization att?, x :=0 att! x = D z ≥ S z :=0 ˙ C = p ( x ≤ D ) High Op Low ˙ ˙ R = g C = P ˙ R = G x :=0 att? [BBL08] Bouyer, Brinksma, Larsen. Optimal infinite scheduling for multi-priced timed automata (Formal Methods in System Designs) . 20/45
Modelling and optimizing resources in timed systems Going further 1: mean-cost optimization att?, x :=0 att! x = D z ≥ S z :=0 ˙ C = p ( x ≤ D ) High Op Low ˙ ˙ R = g C = P ˙ R = G x :=0 att? � compute optimal infinite schedules that minimize cost( 휋 n ) mean-cost( 휋 ) = lim sup reward( 휋 n ) n → + ∞ [BBL08] Bouyer, Brinksma, Larsen. Optimal infinite scheduling for multi-priced timed automata (Formal Methods in System Designs) . 20/45
Modelling and optimizing resources in timed systems Going further 1: mean-cost optimization att?, x :=0 att! x = D z ≥ S z :=0 ˙ C = p ( x ≤ D ) High Op Low ˙ ˙ R = g C = P ˙ R = G x :=0 att? � compute optimal infinite schedules that minimize cost( 휋 n ) mean-cost( 휋 ) = lim sup reward( 휋 n ) n → + ∞ H H M 1 M 1 L L H H M 2 M 2 L L O O 1 1 2 1 1 1 1 1 Time Time 4 8 12 16 4 8 12 16 Schedule with ratio ≈ 1 . 455 Schedule with ratio ≈ 1 . 478 [BBL08] Bouyer, Brinksma, Larsen. Optimal infinite scheduling for multi-priced timed automata (Formal Methods in System Designs) . 20/45
Modelling and optimizing resources in timed systems Going further 1: mean-cost optimization att?, x :=0 att! x = D z ≥ S z :=0 ˙ C = p ( x ≤ D ) High Op Low ˙ ˙ R = g C = P ˙ R = G x :=0 att? � compute optimal infinite schedules that minimize cost( 휋 n ) mean-cost( 휋 ) = lim sup reward( 휋 n ) n → + ∞ Theorem [BBL08] The mean-cost optimization problem is decidable (and PSPACE-complete) for priced timed automata. � the corner-point abstraction can be used [BBL08] Bouyer, Brinksma, Larsen. Optimal infinite scheduling for multi-priced timed automata (Formal Methods in System Designs) . 20/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Finite behaviours: based on the following property Lemma Let Z be a bounded zone and f be a function P n i =1 c i t i + c f : ( t 1 , ..., t n ) �→ P n i =1 r i t i + r well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. 21/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Finite behaviours: based on the following property Lemma Let Z be a bounded zone and f be a function P n i =1 c i t i + c f : ( t 1 , ..., t n ) �→ P n i =1 r i t i + r well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. � for every finite path 휋 in 풜 , there exists a path Π in 풜 cp s.t. mean-cost(Π) ≤ mean-cost( 휋 ) 21/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Finite behaviours: based on the following property Lemma Let Z be a bounded zone and f be a function P n i =1 c i t i + c f : ( t 1 , ..., t n ) �→ P n i =1 r i t i + r well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. � for every finite path 휋 in 풜 , there exists a path Π in 풜 cp s.t. mean-cost(Π) ≤ mean-cost( 휋 ) Infinite behaviours: decompose each sufficiently long projection into cycles: The (acyclic) linear part will be negligible! 21/45
Modelling and optimizing resources in timed systems From timed to discrete behaviours Finite behaviours: based on the following property Lemma Let Z be a bounded zone and f be a function P n i =1 c i t i + c f : ( t 1 , ..., t n ) �→ P n i =1 r i t i + r well-defined on Z . Then inf Z f is obtained on the border of Z with integer coordinates. � for every finite path 휋 in 풜 , there exists a path Π in 풜 cp s.t. mean-cost(Π) ≤ mean-cost( 휋 ) Infinite behaviours: decompose each sufficiently long projection into cycles: The (acyclic) linear part will be negligible! � the optimal cycle of 풜 cp is better than any infinite path of 풜 ! 21/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , 22/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, 22/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, there exists a path 휋 휀 of 풜 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 22/45
Modelling and optimizing resources in timed systems From discrete to timed behaviours Approximation of abstract paths: For any path Π of 풜 cp , for any 휀 > 0, there exists a path 휋 휀 of 풜 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 For every 휂 > 0, there exists 휀 > 0 s.t. ∥ Π − 휋 휀 ∥ ∞ < 휀 ⇒ ∣ mean-cost(Π) − mean-cost( 휋 휀 ) ∣ < 휂 22/45
Modelling and optimizing resources in timed systems Going further 2: concavely-priced cost functions � A general abstract framework for quantitative timed systems Theorem [JT08] Optimal cost in concavely-priced timed automata is computable, if we restrict to quasi-concave price functions. For the following cost functions, the (decision) problem is even PSPACE-complete: optimal-time and optimal-cost reachability; optimal discrete discounted cost; optimal average-time and average-cost; optimal mean-cost. � a slight extension of corner-point abstraction can be used [JT08] Judzi´ nski, Trivedi. Concavely-priced timed automata (FORMATS’08) . 23/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 � compute optimal infinite schedules that minimize discounted cost over time [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 � compute optimal infinite schedules that minimize ∫ 휏 n +1 a n +1 ∑ 휆 T n 휆 t cost( ℓ n ) d t + 휆 T n +1 cost( ℓ n discounted-cost 휆 ( 휋 ) = − − → ℓ n +1 ) t =0 n ≥ 0 휏 1 , a 1 휏 2 , a 2 if 휋 = ( ℓ 0 , v 0 ) − − − → ( ℓ 1 , v 1 ) − − − → ⋅ ⋅ ⋅ and T n = ∑ i ≤ n 휏 i [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 � compute optimal infinite schedules that minimize discounted cost over time [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 � compute optimal infinite schedules that minimize discounted cost over time if 휆 = e − 1 , the discounted cost of that infinite schedule is ≈ 2 . 16 0 3 6 7 9 [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems Going further 3: discounted-time cost optimization Globally, ( z ≤ 8) x =3 , x :=0 x =3 ( x ≤ 3) ( x ≤ 3) deg deg High Med Low + 9 + 2 + 5 att att + 2 + 1 z ≥ 2 , x , z :=0 z ≥ 2 , z :=0 � compute optimal infinite schedules that minimize discounted cost over time Theorem [FL08] The optimal discounted cost is computable in EXPTIME in priced timed automata. � the corner-point abstraction can be used [FL08] Fahrenberg, Larsen. Discount-optimal infinite runs in priced timed automata (INFINITY’08) . 24/45
Modelling and optimizing resources in timed systems A fourth model of the system What if there is an unexpected event? Oxford x :=0 x :=0 x :=0 0 = : x + 3 + 3 + 3 + 3 21 ≤ x ≤ 24 10 ≤ x ≤ 12 12 ≤ x ≤ 15 Dover 9 ≤ x ≤ 15 Poole Stansted x =27 x :=0 14 ≤ x ≤ 15 x =17 + 2 London + 2 x :=0 x =3 + 2 + 7 x :=0 27 ≤ x ≤ 30 Calais x :=0 x :=0 + 1 St Malo Nantes 1 7 + 3 ≤ x x =13 x =6 ≤ x : 2 x :=0 = 1 0 x :=0 + 2 Paris 6 3 ≤ ≤ x x + 3 + 3 ≤ ≤ 0 x 3 6 = : = : + 3 2 x 0 + 2 7 9 4 ≤ 4 1 ≤ 2 ≤ x x = x ≤ ≤ ≤ 1 x 2 2 3 1 2 Pontivy 25/45
Modelling and optimizing resources in timed systems A fourth model of the system What if there is an unexpected event? Oxford x :=0 x :=0 x :=0 0 = : x + 3 + 3 + 3 + 3 21 ≤ x ≤ 24 10 ≤ x ≤ 12 12 ≤ x ≤ 15 Dover Flight 9 ≤ x ≤ 15 Poole Stansted x =27 cancelled! x :=0 14 ≤ x ≤ 15 x =17 + 2 London + 2 x :=0 x =3 + 2 + 7 x :=0 27 ≤ x ≤ 30 Calais x :=0 x :=0 + 1 St Malo Nantes 1 7 + 3 ≤ x x =13 x =6 ≤ x : 2 x :=0 = 1 0 x :=0 + 2 On strike!!! Paris 6 3 ≤ ≤ x x + 3 + 3 ≤ ≤ 0 x 3 6 = : = : + 3 2 x 0 + 2 7 9 4 ≤ 4 1 ≤ 2 ≤ x x = x ≤ ≤ ≤ 1 x 2 2 3 1 2 Pontivy 25/45
Modelling and optimizing resources in timed systems A fourth model of the system What if there is an unexpected event? Oxford x :=0 x :=0 x :=0 0 = : x + 3 + 3 + 3 + 3 21 ≤ x ≤ 24 10 ≤ x ≤ 12 12 ≤ x ≤ 15 Dover Flight 9 ≤ x ≤ 15 Poole Stansted x =27 cancelled! x :=0 14 ≤ x ≤ 15 x =17 + 2 London + 2 x :=0 x =3 + 2 + 7 x :=0 27 ≤ x ≤ 30 Calais x :=0 x :=0 + 1 St Malo Nantes 1 7 + 3 ≤ x x =13 x =6 ≤ x : 2 x :=0 = 1 0 x :=0 + 2 On strike!!! Paris 6 3 ≤ ≤ x x + 3 + 3 ≤ ≤ 0 x 3 6 = : = : + 3 2 x 0 + 2 7 9 4 ≤ 4 1 ≤ 2 ≤ x x = x ≤ ≤ ≤ 1 x 2 2 3 1 2 Pontivy � modelled as timed games 25/45
Modelling and optimizing resources in timed systems A simple example of timed game ℓ 2 x =2 , c u x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 ( y =0) u x =2 , c ℓ 3 26/45
Modelling and optimizing resources in timed systems A simple example of timed game ℓ 2 x =2 , c u x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 ( y =0) u x =2 , c ℓ 3 26/45
Modelling and optimizing resources in timed systems Another example ( x ≤ 2) x ≥ 1 � ℓ 0 x ≤ 1 x ≥ 2 � x < 1 , x :=0 ℓ 1 x < 1 ℓ 2 x ≤ 1 ℓ 3 27/45
Modelling and optimizing resources in timed systems Decidability of timed games Theorem [AMPS98,HK99] Safety and reachability control in timed automata are decidable and EXPTIME-complete. [AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata (SSC’98) . [HK99] Henzinger, Kopke. Discrete-time control for rectangular hybrid automata (Theoretical Computer Science) . 28/45
Modelling and optimizing resources in timed systems Decidability of timed games Theorem [AMPS98,HK99] Safety and reachability control in timed automata are decidable and EXPTIME-complete. (the attractor is computable...) [AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata (SSC’98) . [HK99] Henzinger, Kopke. Discrete-time control for rectangular hybrid automata (Theoretical Computer Science) . 28/45
Modelling and optimizing resources in timed systems Decidability of timed games Theorem [AMPS98,HK99] Safety and reachability control in timed automata are decidable and EXPTIME-complete. (the attractor is computable...) � classical regions are sufficient for solving such problems [AMPS98] Asarin, Maler, Pnueli, Sifakis. Controller synthesis for timed automata (SSC’98) . [HK99] Henzinger, Kopke. Discrete-time control for rectangular hybrid automata (Theoretical Computer Science) . 28/45
Modelling and optimizing resources in timed systems Decidability of timed games Theorem [AMPS98,HK99] Safety and reachability control in timed automata are decidable and EXPTIME-complete. (the attractor is computable...) � classical regions are sufficient for solving such problems Theorem [AM99,BHPR07,JT07] Optimal-time reachability timed games are decidable and EXPTIME-complete. [AM99] Asarin, Maler. As soon as possible: time optimal control for timed automata (HSCC’99) . [BHPR07] Brihaye, Henzinger, Prabhu, Raskin. Minimum-time reachability in timed games (ICALP’07) . [JT07] Jurdzin´ nski, Trivedi. Reachability-time games on timed automata (ICALP’07) . 28/45
Modelling and optimizing resources in timed systems Decidability of timed games Theorem [AMPS98,HK99] Safety and reachability control in timed automata are decidable and EXPTIME-complete. (the attractor is computable...) � classical regions are sufficient for solving such problems Theorem [AM99,BHPR07,JT07] Optimal-time reachability timed games are decidable and EXPTIME-complete. � let’s play with Uppaal Tiga! [BCD+07] [BCD+07] Behrmann, Cougnard, David, Fleury, Larsen, Lime. Uppaal-Tiga: Time for playing games! (CAV’07) . 28/45
Modelling and optimizing resources in timed systems Back to the simple example ℓ 2 x =2 , c u x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 ( y =0) x =2 , c u ℓ 3 29/45
Modelling and optimizing resources in timed systems Back to the simple example + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 29/45
Modelling and optimizing resources in timed systems Back to the simple example + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost we can ensure while reaching � ? 29/45
Modelling and optimizing resources in timed systems Back to the simple example + 10 ℓ 2 x =2 , c u + 1 x ≤ 2 , c , y :=0 � ℓ 0 ℓ 1 + 7 + 5 ( y =0) u x =2 , c ℓ 3 + 1 Question: what is the optimal cost we can ensure while reaching � ? 5 t + 10(2 − t ) + 1 29/45
Recommend
More recommend