18
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Embed Size (px)

Citation preview

Page 1: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Transformation ofTimed Automata into Mixed Integer Linear

Programs

Sebastian Panek

Page 2: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Overview

Motivation

First modeling approach

Syntax

Semantic

MILP-Formulation

Formulation of scheduling problems

Further work

Page 3: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Motivation: What?

What do we want to do?

1. Model an (optimization) problem as Linearly

Priced Timed Automata (LPTA)

2. Transform it into a Mixed-Integer Linear Program

(MILP)

3. Solve it using MILP algorithms

4. Compare the results to other approaches in

terms of computational effort and usability

Page 4: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Motivation: How?

We have some experience in building

optimization models of hybrid systems and

scheduling problems (Engell, Stursberg, Sand) TA are simpler than hybrid automata, but there

have been some open questions: how to formulate parallel compositions? how to formulate synchronization? how to formulate continuous time? how to exploit the simpler structure of TA how to solve MILP models of TA faster?

Page 5: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Motivation: Why TA?

TA allow modeling complex behaviors quite

easily (simple syntax) Parallel compositions of TA allow the user

specifying decomposed parts of a system

separately There exist graphical editors and languages for

the modeling of TA Powerful analysis tools are available

Page 6: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Motivation: Why MILP?

MILP is appropriate for problems in many

application domains A well-investigated MILP theory is known for

many years Many different MILP solution algorithms and

heuristics are available Powerful free and commercial MILP solvers have

been developed

Modeling and debugging is very difficult!

Page 7: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

First approach to the MILP formulation of TA

LPTA (costs on locations and transitions) Continuous time in the MILP Finite set of time points at which transitions may

occur Networks of TA are possible Bidirectional synchronization using labels More complex clock constraints for invariants

and guards are supported (arbitrary polyhedra)

Page 8: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Syntax

Syntax of LPTA Additionally:

Since MILP models are static, the automaton

can‘t simply stop in the final state Insert self-loops in all locations Those loops allow the TA to do nothing without

additional costs3x

Page 9: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Semantics:transitions

Bounded time horizon (an upper bound for all

clock valuations must exist) Finite number of time points n in the MILP

implies finite number of transitions 2n in the TA Each time point in the MILP corresponds with

1 delay transition 1 discrete transition

),(),( dulul )','(),( uldul

Page 10: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Semantics:synchronization

Semantic for synchronization:

Synchronized transitions are taken if there are at

least two automata waiting for the same label

(bidirectional synchronization)

a1A

a2A

Page 11: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:variables

Example LPTA (Larsen et al.)

MILP model with n=4 time points Real variables for clock vectors Binary variables for locations

and transitions

2 23y

2

3x3x

x

4

4321 ,,, kkkkk )('),( kk xx

)(),(),( 321 klklkl)(),...,(),( 621 ktktkt

1t

2t 3t

4t 5t 6t

Page 12: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:constraints on binary variables

Real variables for time delays Binary product variables for all combinations of

locations and outgoing transitions

At every k the automaton is in one location:

At every k one transition is taken:

)(ku

),(),(),(),(),(),( 633252224111 ktlktlktlktlktlktl

1)()()( 321 klklkl

1)()()()()()( 654321 ktktktktktkt

Page 13: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:computing products

Real product variables of clocks and locations

Real product variables of clocks and transitions

...

),()(':)('),()(:)( 1111 klkkklkk ll xxxx

...

),()(':)(' 11 ktkkt xx

Page 14: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:clock constraints

Use polyhedral description to express clock

constrains, i.e.

Enforce invariants for locations

Enforce guards for transitions

bxAbxA )(

...

),()('),()( 11111111 klkklk llllll bxAbxA

...

),()(' 1111 ktk ttt bxA

Page 15: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:evolution

Delay transitions: Discrete transitions:

Clock resets on transitions:

Tkukk 1...1)()()(' xx

)()()1(

),()()1(

),()()1(

63323

52112

41221

ktlktlkl

ktlktlkl

ktlktlkl

t

tt kk rxx )(')1(

Page 16: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

MILP formulation:objective function

Define start state and final states fixing

corresponding variables:

Define products for the objective function:

Objective function: minmize costs over all runs

k tt

lll

ktkuktckucJ )()(min

)(),(

)()(:)( klkukul

1)(,1)(,0)( 43111 klklkx

Page 17: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

TA formulation of scheduling problems

According to O. Maler and A. Fehnker Use additional constraints to assert exclusive

allocation of resources Example: 2 jobs and 2 resources

1J

1R 2R

2J

1R 2R

x

dx dx dx

x x x

dx

Page 18: Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek

Further work

Improve the MILP formulation Test it on large scale models Implement other types of TA (i.e. Uppaal-TA) Build a parser which accepts common TA

description languages and generates MILP code

automatically Compare the different approaches:

TA model, symbolic solution MILP model, MILP solution, TA model, MILP solution