# Transformation of Timed Automata into Mixed Integer Linear Programs - PowerPoint by qqy17527

VIEWS: 30 PAGES: 18

• pg 1
```									     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
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
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?
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
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!
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)
Syntax

 Syntax of LPTA
 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
x3
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    (l , u)  (l , u  d )
 1 discrete transition (l , u  d )  (l ' , u ' )
Semantics:
synchronization

 Semantic for synchronization:
Synchronized transitions are taken if there are at
least two automata waiting for the same label
(bidirectional synchronization)

a
A1
a
A2
MILP formulation:
variables

 Example LPTA (Larsen et al.)
4      x3
t1                 y 3
x3 2                     2
t3
2
t2
x
t4                 t5                 t6

 MILP model with n=4 time points k  k1 , k 2 , k3 , k 4
 Real variables for clock vectors x(k ), x' (k )
 Binary variables l1 (k ), l2 (k ), l3 (k ) for locations and
transitions t1 (k ), t2 (k ),...,t6 (k )
MILP formulation:
constraints on binary variables

 Real variables for time delays u (k )
 Binary product variables for all combinations of
locations and outgoing transitions
l1t1 (k ), l1t4 (k ), l2t2 (k ), l2t5 (k ), l2t3 (k ), l3t6 (k ),

 At every k the automaton is in one location:
l1 (k )  l2 (k )  l3 (k )  1

 At every k one transition is taken:
t1 (k )  t2 (k )  t3 (k )  t4 (k )  t5 (k )  t6 (k )  1
MILP formulation:
computing products

 Real product variables of clocks and locations

x l1 (k ) : x(k )  l1 (k ), x'l1 (k ) : x' (k )  l1 (k ),
...

 Real product variables of clocks and transitions

x't1 (k ) : x' (k )  t1 (k ),
...
MILP formulation:
clock constraints

 Use polyhedral description to express clock
constrains, i.e. ( A  x  b)    A  x  b  

 Enforce invariants for locations
A l1  x l1 (k )  b l1  l1 (k ), A l1  x'l1 (k )  b l1  l1 (k ),
...
 Enforce guards for transitions
A t1  x't1 (k )  b t1  t1 (k ),
...
MILP formulation:
evolution

 Delay transitions: x' (k )  x(k )  u(k )   ...1
T
1
 Discrete transitions:
l1 (k  1)  l2t 2 (k )  l1t 4 (k ),
l2 (k  1)  l1t1 (k )  l2t5 (k ),
l3 (k  1)  l2t3 (k )  l3t6 (k )
 Clock resets on transitions:
x(k  1)   x't (k )  rt 
t
MILP formulation:
objective function

 Define start state and final states fixing
corresponding variables:
x(k1 )  0, l1 (k1 )  1, l3 (k4 )  1

 Define products for the objective function:
ul (k ) : u (k )  l (k )

 Objective function: minmize costs over all runs
                          
min J     cl  ul (k )   ct  t (k ) 
k  l                        
u ( k ),t ( k )
t
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

J1                    J2
x   x             x   x
R1               R2   R1               R2
xd         xd       xd         xd
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

```
To top