47
Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker, Thomas Hune, Kim Larsen, Paul Pettersson, Judi Romijn, Frits Vaandrager

Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Embed Size (px)

Citation preview

Page 1: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Formalmethods& Tools

UCb

CUPPAALCUPPAALEfficient Minimum-Cost Reachabilityfor Linearly Priced Timed Automata

Gerd Behrman, Ed Brinksma, Ansgar Fehnker, Thomas Hune, Kim Larsen, Paul Pettersson,

Judi Romijn, Frits Vaandrager

Page 2: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

2VHS meeting 27.11.00 Kim G. Larsen

UCb

Overview

1. Introduction2. Linear Priced Timed Automata3. Priced Zones and Facets4. Operations on Priced Zones5. Algorithm6. First Experimental Findings7. Conclusion

Page 3: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

3VHS meeting 27.11.00 Kim G. Larsen

UCb Observation

Many scheduling problems can be phrased naturally asreachability problems for timed automata!

INTRODUCTION

Page 4: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

4VHS meeting 27.11.00 Kim G. Larsen

UCb Observation

Many scheduling problems can be phrased naturally asreachability problems for timed automata!

UNSAFE SAFE

5 10 20 25

At most 2crossing at a timeNeed torch

At most 2crossing at a timeNeed torch

Mines

Can they makeit within 60 minutes ?

Can they makeit within 60 minutes ?

INTRODUCTION

Page 5: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

5VHS meeting 27.11.00 Kim G. Larsen

UCb Observation

Many scheduling problems can be phrased naturally asreachability problems for timed automata!

UNSAFE SAFE

5 10 20 25

Mines

INTRODUCTION

Page 6: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

6VHS meeting 27.11.00 Kim G. Larsen

UCb

Steel Production PlantMachine 1 Machine 2 Machine 3

Machine 4 Machine 5

Buffer

Continuos Casting Machine

Storage Place

Crane B

Crane A

A. Fehnker, T. Hune, K. G. Larsen, P. Pettersson

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

Lane 2

INTRODUCTION

Page 7: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

7VHS meeting 27.11.00 Kim G. Larsen

UCb

Batch Processing Plant (VHS)

hbrine

hbrine

water

store

mbrine

heat

water

waterheater

cooling water

pump pump cooling water

watersalt

INTRODUCTION

Page 8: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

8VHS meeting 27.11.00 Kim G. Larsen

UCb

Earlier work

Asarin & Maler (1999)Time optimal control using backwards fixed point computation

VHS consortium (1999)Steel plant and chemical batch plant case studies

Niebert, Tripakis & Yovine (2000)Minimum-time reachability using forward reachability

Behrmann, Fehnker et all (2000)Minimum-time reachability using branch-and-bound

INTRODUCTION

Page 9: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

9VHS meeting 27.11.00 Kim G. Larsen

UCb

Advantages• Easy and flexible modeling of systems• whole range of verification techniques becomes available• Controller/Program synthesis

Disadvantages• Existing scheduling approaches perform somewhat better

Our goal• See how far we get;• Integrate model checking and scheduling theory.

INTRODUCTION

Page 10: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

10VHS meeting 27.11.00 Kim G. Larsen

UCb

More general cost function

In scheduling theory one is not just interested in shortest schedules; also other cost functions are considered

This leads us to introduce a model of linear priced timed automata which adds prices to locations and transitions

The price of a transition gives the cost of taking it, and the price of a location specifies the cost per time unit of staying there.

INTRODUCTION

Page 11: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Formalmethods& Tools

UCb

Linearly Priced Timed Automata

Page 12: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

12VHS meeting 27.11.00 Kim G. Larsen

UCb

Example

PRICED AUTOMATA

Page 13: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

13VHS meeting 27.11.00 Kim G. Larsen

UCb EXAMPLE: Optimal rescue plan for important persons (Presidents and Actors)

UNSAFE

SAFE

5 10 20 25

Mines

GORE CLINTON

BUSH DIAZ

9 2

3 10

OPTIMAL PLAN HAS ACCUMULATED COST=195 and TOTAL TIME=65!

PRICED AUTOMATA

Page 14: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

14VHS meeting 27.11.00 Kim G. Larsen

UCb

Definition

PRICED AUTOMATA

Page 15: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

15VHS meeting 27.11.00 Kim G. Larsen

UCb

Definition

PRICED AUTOMATA

Page 16: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

16VHS meeting 27.11.00 Kim G. Larsen

UCb

Example of execution

PRICED AUTOMATA

Page 17: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

17VHS meeting 27.11.00 Kim G. Larsen

UCb

Cost The cost of a finite execution is the sum of the prices of all the transitions

occuring in it

The minimal cost of a location is the infimum of the costs of the finite executions ending in the location

The minimum-cost problem for LPTAs is the problem to compute the minimal cost of a given location of a given LPTA

In the example below, mincost(C ) = 7

PRICED AUTOMATA

? DECIDABILITY ?

Page 18: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Formalmethods& Tools

UCb

Priced Zones

Page 19: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

19VHS meeting 27.11.00 Kim G. Larsen

UCb Zones

Operations

PRICED ZONES

Page 20: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

20VHS meeting 27.11.00 Kim G. Larsen

UCb Canonical Datastructure for Zones

Difference Bounded Matrices

x1-x2<=4x2-x1<=10x3-x1<=2x2-x3<=2x0-x1<=3x3-x0<=5

x1-x2<=4x2-x1<=10x3-x1<=2x2-x3<=2x0-x1<=3x3-x0<=5

x1 x2

x3x0

-4

10

22

5

3

x1 x2

x3x0

-4

4

22

5

3 3 -2 -2

1

ShortestPath

ClosureO(n^3)

Bellman’58, Dill’89

PRICED ZONES

Page 21: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

21VHS meeting 27.11.00 Kim G. Larsen

UCb New Canonical Datastructure Minimal collection of constraints

x1-x2<=4x2-x1<=10x3-x1<=2x2-x3<=2x0-x1<=3x3-x0<=5

x1-x2<=4x2-x1<=10x3-x1<=2x2-x3<=2x0-x1<=3x3-x0<=5

x1 x2

x3x0

-4

10

22

5

3

x1 x2

x3x0

-4

4

22

5

3

x1 x2

x3x0

-4

22

3

3 -2 -2

1

ShortestPath

ClosureO(n^3)

ShortestPath

ReductionO(n^3) 3 Space worst O(n^2)

practice O(n)

RTSS 1997

PRICED ZONES

Page 22: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

22VHS meeting 27.11.00 Kim G. Larsen

UCb Priced Zone

PRICED ZONES

x

y

4

2-1

Z

Page 23: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

23VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

PRICED ZONES

Page 24: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

24VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

{y}Z

PRICED ZONES

Page 25: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

25VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

{y}Z4

PRICED ZONES

Page 26: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

26VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

{y}Z4

-1 1

PRICED ZONES

2

A split of {y}Z

4

Page 27: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

27VHS meeting 27.11.00 Kim G. Larsen

UCb FacetsThe solution

PRICED ZONES

Page 28: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

28VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

Page 29: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

29VHS meeting 27.11.00 Kim G. Larsen

UCb

Delay

x

y

4

3-1

Z

Z

PRICED ZONES

Page 30: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

30VHS meeting 27.11.00 Kim G. Larsen

UCb

Delay

x

y

4

3-1

Z

Z

Delay in alocation withcost-rate 3

3

2

PRICED ZONES

Page 31: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

31VHS meeting 27.11.00 Kim G. Larsen

UCb

Delay

x

y

4

3-1

Z 3

4

-10

PRICED ZONES

A split of

Z

Z

Page 32: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

32VHS meeting 27.11.00 Kim G. Larsen

UCb FacetsThe solution

PRICED ZONES

Page 33: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

33VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

Page 34: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

34VHS meeting 27.11.00 Kim G. Larsen

UCb Optimal Forward ReachabilityExample

PRICED ZONES

10

10

0

10

10

0

2

4

6

8

10

10

2 4 6 8

10

10

10

10 10

10

24

68

468 2

1 1 1 1 1

Page 35: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

35VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

Page 36: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

36VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

Page 37: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Formalmethods& Tools

UCb

Algorithm

Page 38: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

38VHS meeting 27.11.00 Kim G. Larsen

UCb

Branch & Bound Algorithm

ALGORITHM

Page 39: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

39VHS meeting 27.11.00 Kim G. Larsen

UCb ALGORITHM

Page 40: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

40VHS meeting 27.11.00 Kim G. Larsen

UCb ALGORITHM

Page 41: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

Formalmethods& Tools

UCb

Experiments

Page 42: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

42VHS meeting 27.11.00 Kim G. Larsen

UCb EXAMPLE: Optimal rescue plan for important persons (Presidents and Actors)

UNSAFE

SAFE

5 10 20 25

Mines

GORE CLINTON

BUSH DIAZ

9 2

3 10

OPTIMAL PLAN HAS ACCUMULATED COST=195 and TOTAL TIME=65!

EXPERIMENTS

Page 43: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

43VHS meeting 27.11.00 Kim G. Larsen

UCb Experiments MC Order

COST-rates

SCHEDULE COST

TIME #Expl#Pop’

dG5 C10 B20 D25

Min Time CG> G< BD> C< CG> 60 1762

15382638

1 1 1 1 CG> G< BG> G< GD> 55 65 252 378

9 2 3 10 GD> G< CG> G< BG> 195 65 149 233

1 2 3 4 CG> G< BD> C< CG> 140 60 232 350

1 2 3 10 CD> C< CB> C< CG> 170 65 263 408

1 20 30 40 BD> B< CB> C< CG>

9751085

85time<85

- -

0 0 0 0 - 0 - 406 447

EXPERIMENTS

Page 44: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

44VHS meeting 27.11.00 Kim G. Larsen

UCb Optimal Broadcast

Router1 Router2

Router3 Router4

A

B

Given particular subscriptions, what is the cheapestschedule for broadcasting k?

Given particular subscriptions, what is the cheapestschedule for broadcasting k?

k=1 k=0

k=0 k=0

costA1, costB1 costA2, costB2

costA3, costB3costA4, costB4

Basecost

EXPERIMENTS

costB1costA1

3 sec

5 sec

Page 45: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

45VHS meeting 27.11.00 Kim G. Larsen

UCb Experimental ResultsCOST-rates

SCHEDULE COST TIME #ExplBC R1 R2 R3 R4

Min Time 1>3(B) ; ( 3>4(B) | 1>2(A) ) 8 1016

01:3

1:3

1:3

1:3

1>4(A) ; 3>4(A) ; 4>2(A) 15 15 2982

3 1>3(B) ; ( 3>4(B) | 1>2(A) ) 47 8 1794

0

10 :30

5 :15

1:3

6:2

1>3(A) ; 3>2(A) ; 3>4(A) 60 15 665

3 1>4(A) ; 4>3(B) ; 4>2(B) 95 11 571

100 1>4(B) ; ( 1>3(A) | 4>2(B) ) 946 8 1471

0t<=1

0

1>4(B) ; 4>2(B) ; 4>3(B) 102 9 1167

0t<=8

1>4(B) ; ( 1>3(A) | 4>2(B) ) 146 8 1688

EXPERIMENTS

Page 46: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

46VHS meeting 27.11.00 Kim G. Larsen

UCb

Scaling Up ?

# Schedules4 routers: 1205 routers: 83.7126 routers: ??????????

Finding Feasible Schedule using UPPAAL (6 routers)

16.490 expl. symb. st. (with Active Clock Reduction)

Minimum Time Schedule (6 routers)96.417 using Minimum Time Reachability (Ansgar)106.628 using Minimum Cost Reachability (BC=1, all other

cost=0) time optimal schedule takes 12 seconds.

EXPERIMENTS

Page 47: Formal methods & Tools UCb CUPPAAL CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata Gerd Behrman, Ed Brinksma, Ansgar Fehnker,

47VHS meeting 27.11.00 Kim G. Larsen

UCb Current & Future Work

IMPLEMENTATION – thorough analysis Applications – (Gossing Girls, Production Plant) Generalization

Minimum Cost Reachability under timing constraints avoiding certain states

Minimum Time Reachability under cost constraints Maximum Cost between two types of states

Relationships to Reward Models

Parameterized Extension Extensions to Optimal Controllability