slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
As cheap as possible: PowerPoint Presentation
Download Presentation
As cheap as possible:

Loading in 2 Seconds...

play fullscreen
1 / 48

As cheap as possible: - PowerPoint PPT Presentation


  • 108 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
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
slide1

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

slide2

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.

slide3

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

outline
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
slide5

TimedAutomata

(UPPAAL)

  • Network of Automata
    • Synchronization (CCS-like)

a!

a?

slide6

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

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

slide8

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!

slide9

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!
linearly priced timed automata
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

slide11

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

slide12

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

slide15

Priced Regions

cost

y

5

4

5

3

2

3

2

2

1

1

1

2

3

x

costs

an algorithm
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

an algorithm1
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
an algorithm2
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
an algorithm3
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.

an algorithm4
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
an algorithm5
An Algorithm

Theorem

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

Theorem

The algorithm terminates

Can it be done efficiently?

outline1
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
slide23

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

slide24

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

slide25

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

slide26

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

slide27

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

outline2
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
slide29

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

slide30

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

outline3
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
verification vs optimization
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

minimum cost order
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
minimum cost order1
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
estimates of remaining cost
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

estimates of remaining cost1
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

estimates of remaining cost2
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

using heuristics
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
slide39

Using Heuristics

Try to schedule planes in the order of their preferred landing times

outline4
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
example bridge problem
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

sidmar steel production plant
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 plant1
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.

slide44

Aircraft Landing Problem

runways

Benchmark by Beasley et al 2000

slide45

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