- 108 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'As cheap as possible:' - griffith

**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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

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

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.

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

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

Outline3 < 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

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!!

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!

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!

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

b

Problem: Finding the minimum cost of reaching locationc

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

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

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 AlgorithmCost=

Cost=80

80

60

Cost=60

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 AlgorithmCost:=, 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 AlgorithmCost:=, 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.

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 AlgorithmAn Algorithm

Theorem

When the algorithm terminates, the value of COSTequals mincost()

Theorem

The algorithm terminates

Can it be done efficiently?

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

Outlinex

y

Priced Zones

Basic idea: Define a linear cost function on zones

BUT: Priced zones are not closed under delay, transitions, resets

y

x

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

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

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

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

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

Outline20min

10min

5min

What is the fastest schedule ?

Unsafe

Safe

Uniformly Priced Timed Automata

UPTA are LPTA where all locations

have the same rate

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

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

OutlineVerification 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. OptimizationSafe side reachable?

80

Min time of reaching safe side?

60

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 OrderFact 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 OrderOften 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 CostAt least 25 mins needed to complete schedule

Basic Algorithm + Estimate of remainingcost:Only states with (min(C) + REM(l, C)) < Costare further exploredEstimates of Remaining Cost

Cost=80

min( C )

+ REM( l, C ) 80

Minimum Cost + Estimate of remaining cost:Explore states with smallest ( min(C) + REM( l, C ) ) firstEstimates 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

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 HeuristicsTry to schedule planes in the order of their preferred landing times

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

OutlineNumber of symbolic states generated with cost-extended version of UPPAAL

Minimum Cost Order + Estimate of Remaining cost<10% of Breadth-First Search

Example: Bridge ProblemWhat is the fastest schedule?

BF = Breadth-First, DF = Depth-First, MC = Minimum Cost Order, MC+ = MC + REM

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

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.

- 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

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!!

Download Presentation

Connecting to Server..