Title: As cheap as possible
1As cheap as possible
Linearly Priced Timed Automata
Gerd Behrmann, Ed Brinksma, Ansgar Fehnker,
Thomas Hune, Kim Larsen, Paul Pettersson, Judi
Romijn, Frits Vaandrager
Brics Aalborg, Nijmegen, Twente, Uppsala, CMU,
TERMA, TUE
2Motivation
Observation (VHS project) Many scheduling
problems can be phrased in a natural way as
reachability problems for timed automata.
3Motivation
25min
20min
10min
5min
Can they make it within 60 minutes ?
What is the fastest schedule?
What schedule minmizes unsafe time?
What schedule minimizes bridge crossings?
Unsafe
Safe
4Outline
- 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
5Timed Automata
(UPPAAL)
- Network of Automata
- Synchronization (CCS-like)
a!
a?
6Timed Automata
(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?
y0
7Regions (review)
Alur Dill
xlt3
xlt3
ygt2
c
a
b
x0
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!!
8Alur Dill
Regions (review)
xlt3
xlt3
ygt2
c
a
b
x0
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!
9Zones (review)
xlt3
xlt3
ygt2
c
a
b
x0
y
y
y
3
3
2
2
1
1
x
x
1
2
3
1
2
3
1
2
3
Data Structures like DBMs, CDDs g efficiency!
Convex unions of regions are called zones. Delay,
reset, transition in terms of zones
10Linearly Priced Timed Automata
b
- Timed Automata Costs on transitions and
locations - Cost of performing transition Transition cost
- Cost of performing delay d ( d x location cost )
Problem Finding the minimum cost of reaching
location c
11Example Aircraft Landing
Planes have to keep separation distance to avoid
turbulences caused by preceding planes
12Example Aircraft Landing
x lt 5
x gt 4
4 earliest landing time 5 target time 9 latest
time 3 cost rate for being early 1 cost rate for
being late 2 fixed cost for being late
x5
land!
cost2
x lt 5
x lt 9
cost3
cost1
x5
land!
Planes have to keep separation distance to avoid
turbulences caused by preceding planes
13Priced Regions
cost
5
4
3
2
1
14Priced Regions
cost
5
4
3
2
1
15Priced Regions
cost
y
5
4
5
3
2
3
2
2
1
1
x
1
2
3
costs
16An Algorithm
- State-Space Exploration Use of global variable
Cost - Updated Cost whenever goal state with min( C )
ltCost is found - Terminates when entire state-space is explored
Cost?
Cost80
80
60
Cost60
17An Algorithm
- Cost?, Pass , Wait (l0,C0), Goal?
- while Wait ? do
- select (l,C) from Wait
- if (l,C) ? and mincost(C)ltCost then
Costmincost(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
18An Algorithm
- Cost?, Pass , Wait (l0,C0), Goal?
- while Wait ? do
- select (l,C) from Wait
- if (l,C) ? and mincost(C)ltCost then
Costmincost(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
19An Algorithm
- Cost?, Pass , Wait (l0,C0), Goal?
- while Wait ? do
- select (l,C) from Wait
- if (l,C) ? and mincost(C)ltCost then
Costmincost(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
preorder that defines better
cost zones.
20An Algorithm
- Cost?, Pass , Wait (l0,C0), Goal?
- while Wait ? do
- select (l,C) from Wait
- if (l,C) ? and mincost(C)ltCost then
Costmincost(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
21An Algorithm
Theorem
When the algorithm terminates, the value of COST
equals mincost(?)
Theorem
The algorithm terminates
Can it be done efficiently?
22Outline
- 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
23Priced Zones
Basic idea Define a linear cost function on zones
BUT Priced zones are not closed under delay,
transitions, resets
y
x
24Priced Zones
Basic idea Define a linear cost function on zones
BUT Priced zones are not closed under delay,
transitions, resets
y
costc2 x 1 y
x
25Priced Zones
Basic idea Define a linear cost function on zones
BUT Priced zones are not closed under delay,
transitions, resets
y
costc2 x 1 y
x
26Priced Zones
Basic idea Define a linear cost function on zones
BUT Priced zones are not closed under delay,
transitions, resets
y
costc1 x 1 y
costc2 x 2 y
x
27Priced Zones
Basic idea Define a linear cost function on zones
BUT Priced zones are not closed under delay,
transitions, resets
y
costc2 x 1 y
x
28Outline
- 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
29Uniformly Priced Timed Automata
UPTA are LPTA where all locations have the same
rate
30Uniformly 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
31Outline
- 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
32Verification 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
Safe side reachable?
80
Min time of reaching safe side?
60
33Minimum-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
34Minimum-Cost Order
- Fact 1 First goal state found is optimal
- Cost grows along all paths
- The search can terminate when first goal state
found - Like Dijkstras shortest path algorithm
- Fact 2 No other search order explores fewer
states - Simpler algorithm variable Cost no longer needed
35Estimates 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
At least 25 mins needed to complete schedule
36Estimates of Remaining Cost
- Basic Algorithm Estimate of remaining
costOnly states with (min(C) REM(l, C)) lt
Cost are further explored
Cost80
min( C )
REM( l, C ) ? 80
37Estimates of Remaining Cost
- Basic Algorithm Estimate of remaining
costOnly states with (min(C) REM(l, C)) lt
Cost are further explored
Cost80
min( C )
REM( l, C ) ? 80
- Minimum Cost Estimate of remaining
costExplore states with smallest ( min(C)
REM( l, C ) ) first
38Using 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
39Using Heuristics
Try to schedule planes in the order of their
preferred landing times
40Outline
- 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
41Example Bridge Problem
What is the fastest schedule?
BF Breadth-First, DF Depth-First, MC
Minimum Cost Order, MC MC REM
- Number of symbolic states generated with
cost-extended version of UPPAAL - Minimum Cost Order Estimate of Remaining
costlt10 of Breadth-First Search
42SIDMAR 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
43SIDMAR Steel Production Plant
Crane A
Machine 2
Machine 3
Input sequence of steel loads (pigs)
Machine 1
_at_10
_at_20
_at_10
2
2
2
Lane 1
Machine 4
Machine 5
15
_at_10
Load follows Recipe to obtain certain quality,
e.g start T1_at_10 T2_at_20 T3_at_10 T2_at_10 end
within 120
Lane 2
16
Buffer
Crane B
?127
Storage Place
Optimal schedules for ten batches using guiding
with priorities. Only for two batches without
_at_40
Continuos Casting Machine
Output sequence of higher quality steel.
44Aircraft Landing Problem
runways
Benchmark by Beasley et al 2000
45Conclusion
- 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
46Conclusion
- Papers
- Efficient Guiding Towards Cost-Optimality in
UPPAAL TACAS01 - Minimum Cost-Reachability for Priced Timed
Automata HSCC01 - As Cheap as Possible Efficient Cost-Optimal
Reachability for Priced Timed Automata CAV01 - Citius, Vilius, Melius Guiding and
Cost-Optimality in Model Checking of Timed and
Hybrid Systems, PhD Thesis Ansgar Fehnker,
University of Nijmegen, April 2002
47End of slide show
48THE END