CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata

Post on 21-Jan-2016

45 views 0 download

description

Gerd Behrman , Ed Brinksma, Ansgar Fehnker , Tho ma s Hune , Kim Lars en , Paul Pet tersson , Judi Romijn , Frits Vaandrager. CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata. Overview. Introduction Linear Priced Timed Automata Priced Zones and Facets - PowerPoint PPT Presentation

Transcript of CUPPAAL Efficient Minimum-Cost Reachability for Linearly Priced Timed Automata

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

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

3VHS meeting 27.11.00 Kim G. Larsen

UCb Observation

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

INTRODUCTION

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

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

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

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

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

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

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

Formalmethods& Tools

UCb

Linearly Priced Timed Automata

12VHS meeting 27.11.00 Kim G. Larsen

UCb

Example

PRICED AUTOMATA

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

14VHS meeting 27.11.00 Kim G. Larsen

UCb

Definition

PRICED AUTOMATA

15VHS meeting 27.11.00 Kim G. Larsen

UCb

Definition

PRICED AUTOMATA

16VHS meeting 27.11.00 Kim G. Larsen

UCb

Example of execution

PRICED AUTOMATA

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 ?

Formalmethods& Tools

UCb

Priced Zones

19VHS meeting 27.11.00 Kim G. Larsen

UCb Zones

Operations

PRICED ZONES

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

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

22VHS meeting 27.11.00 Kim G. Larsen

UCb Priced Zone

PRICED ZONES

x

y

4

2-1

Z

23VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

PRICED ZONES

24VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

{y}Z

PRICED ZONES

25VHS meeting 27.11.00 Kim G. Larsen

UCb

Reset

x

y

4

2-1

Z

{y}Z4

PRICED ZONES

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

27VHS meeting 27.11.00 Kim G. Larsen

UCb FacetsThe solution

PRICED ZONES

28VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

29VHS meeting 27.11.00 Kim G. Larsen

UCb

Delay

x

y

4

3-1

Z

Z

PRICED ZONES

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

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

32VHS meeting 27.11.00 Kim G. Larsen

UCb FacetsThe solution

PRICED ZONES

33VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

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

35VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

36VHS meeting 27.11.00 Kim G. Larsen

UCb OPERATIONS ON PZONES

Formalmethods& Tools

UCb

Algorithm

38VHS meeting 27.11.00 Kim G. Larsen

UCb

Branch & Bound Algorithm

ALGORITHM

39VHS meeting 27.11.00 Kim G. Larsen

UCb ALGORITHM

40VHS meeting 27.11.00 Kim G. Larsen

UCb ALGORITHM

Formalmethods& Tools

UCb

Experiments

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

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

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

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

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

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