200 likes | 385 Views
Optimization of Timed Automata by Branch&Bound Techniques. Sebastian Panek, Sebastian Engell and Olaf Stursberg Process Control Lab, University of Dortmund. Outline: Optimization of Timed Systems TA-Modeling of Scheduling Tasks Transformation of TA into Mixed-Integer Programs
E N D
Optimization of Timed Automata by Branch&Bound Techniques Sebastian Panek, Sebastian Engell and Olaf Stursberg Process Control Lab, University of Dortmund Outline: Optimization of Timed Systems TA-Modeling of Scheduling Tasks Transformation of TA into Mixed-Integer Programs Tree Search for TA using Branch&Bound Principles Simple Scheduling Example
Motivation Optimization of Timed Systems: determine a sequence of steps that minimizes a given cost criterion, fix the points of time at which the steps are started and/or terminated. Cost criterion: maximize number of steps in a given time horizon, or minimize the overall time required to perform a given number of steps.
“Standard” Approaches Timed Automata (TA) based: Tree encodes possible evolutions Search for the cost-optimal path (Reachability analysis + cost evaluation) Objective: combine both approaches Mixed-Integer Programming (MIP): Algebraic (in-)equalities for continuous and discrete variables Solution by mathematical programming (or: constraint progr., evolutionary algorithms, …)
TA-based Approach • Modeling with Linearly Priced TA: • set of locations: • set C of clocks and their valuations: • transitions (with guards, actions and resets): • synchronization via labels: • costs for locations and transitions • Shortest path computation: • summation of costs along paths: c • search for cost-minimal path into states • that satisfy a logic property • Properties: • + simple modeling (modularity + synchronisation) • + “natural” encoding of sequential behavior • no guess for the cost-to-go (as additional criterion for pruning branches)
MIP-based Approach • Formulation: • mathematical program with linear (in-)equalities and objective function • Most common solution: • state space enumeration with Branch-and-Bound (B&B): • B&B tree: nodes represent discrete decisions • computation of lower and upper cost bounds: relaxing discrete variables to continuous ones, solution of sub-problems by linear progr. (LP) • feasible set reduction by comparing bounds • Properties: • + guess for the cost-to-go usable for pruning (and as heuristics for branch selection) • problem formulation can be intriguing (large number of variables and inequalities) • encoding of sequential behavior requires binary auxiliary variables ( tree size!)
Problem statement: set of operations Set of machines (resources): Machine assignment: Jobs: total order on subsets of operations Constraints: job orders, operation durations, exclusive resource allocation, timing constraints Objective: search for the valid schedule with minimal operating costs, operation times, or resource usage. Example: 2 jobs, 2 exclusive machines, 4 operations m1 5 Job 1 Job 2 m1 2 m2 2 m2 5 Job-Shop Scheduling
Jobs modeled as automata: Resources modeled as separate automata with synchronized transitions (via labels ): [equivalently for Job 2 and Resource 2] x y Resource 1 Scheduling Problem modeled by TA Job 1 a b c d e
Procedure: Modeling as LPTA Main part: model transformation TA2MILP solution using an MILP solver Method 1: TA-Modeling + MILP-Solution Problem specification TA2MILP LPTA model MILP model MILP solver
Procedure to create MILP models from LPTA models: Linearly priced timed automata with costs on locations and transitions Compositionality is preserved in the MILP model Polyhedral guards on transitions and invariants on locations Synchronization through sync labels on transitions No shared variables at the present Planned: start from graphic model TA2MILP: Overview
Binary variables dt for transitions, 0-1 variables dl for locations, time index k Transition dynamics: l2 t1 t2 l1 l4 t3 t4 l3 TA2MILP: Locations and Transitions
Description as logical propositions (disjunctive formulation) Vectors of real variables for clocks (when entering locations) (when leaving locations) Time delay in locations: l2 t1 t2 G1 l1 l4 G2 Inv1 t3 t4 l3 TA2MILP: Clocks, Invariants, and Guards
Introduce vectors , the entries of which are 0 if resets occur and 1 otherwise. l2 r1 t1 t2 r2 G1 l1 l4 G2 r4 Inv1 t3 r3 t4 l3 TA2MILP: Clock Resets
For the synchronization of two LPTA: introduce additional clocks z, w that measure absolute time l2 r1 t1 t2 r2 G1 l1 zk l4 G2 r4 Inv1 S t3 r3 t4 l3 S wj l5 l6 t5 TA2MILP: Composition and Synchronization
Example: 2 jobs, 2 machines, 4 operations, minimize makespan TA model as described above MILP model formulation yields: 2450 equations 843 real decision variables 60 binary decision variables Implementation with the GAMS mathematical modeling language Solution using the GAMS/CPLEX package m1 m1 2 5 Job 1 Job 2 m2 m2 5 2 Application to the Example
Computation of the optimal schedule took 0.6 seconds on a 2.4 GHz machine 3 out of 8 possible schedules Optimal S1 Suboptimal S2 Worst S3 Alternative: construct MILP model from composed automata (not discussed here) m1 2 5 m2 5 2 9 m1 5 2 m2 2 5 12 m1 2 5 m2 5 2 14 Results for Method 1
Method 2: Shortest Path Search + B&B Problem specification TA2MILP LPTA model MILP model Relaxation LP model calls Shortest Path Algo LP solver Fix variables for the current state optimal solution Search graph Lower bound = cost-to-go LP B&B cuts
Example: Reachability Graph termination after 14 nodes costs lower bound
Shortest path computation (Dijkstra): Takes nodes with lowest costs from Waiting requires 29 nodes to find the optimum Our best-lower-bound algorithm: Takes nodes with lowest lower bound from Waiting needs 14 nodes to find the optimum Termination after comparison of upper bound (9) of node 14 and all lower bounds (exactly the same way like B&B) (Alternatives: breadth-first and depth-first search) Results for Method 2
Computing cost minimal paths for LPTA models Reducing the state space using B&B techniques (lower bounds and branch cuts) Other reduction techniques from both domains can still be applied Application domain: not restricted to scheduling Current work: implementation of the algorithm. Next steps: Using the implementation, investigate these points: How much can the state space be reduced using B&B techniques in the domain of TA? Performance comparison between MILP, TA, and combined approaches. Application to the Axxom case study. Conclusions and Outlook