1
Combinatorial Optimisation Solving Problems that Are Larger than the Universe! Pierre Flener ASTRA Research Group on Combinatorial Optimisation Optimisation is a science of service: to scientists, to engineers, and to society. Optimisation How to judge fairly which is the touristic town of the year? Alva Dan Eva Jim Leo Mia Ulla Birka Falun Lund Mora Sigtuna Uppsala Ystad Constraints to be satisfied: Equal jury size: Every town is evaluated by three judges. Equal travel load: Every judge evaluates three towns. Fairness: Every town pair has one judge in common. Example: Touristic Town Competition Mon Tue Wed Thu Fri Sat Sun Doctor A call op op Doctor B app call op call Doctor C op call app app call Doctor D app op call op Doctor E op op call Constraints to be satisfied: #doctors-on-call / day = 1 #operations / workday 2 #operations / week 7 #appointments / week 4 day off after operation day ... Example: Doctor Rostering Given: an airspace split into c cells, and a targeted number s of sectors. Find: a colouring of the cells into s connected convex sectors, with minimal imbalance of the work- loads of their air traffic controllers. There are s c possible colourings, but very few colourings satisfy all constraints and are optimal: intelligent search is necessary! Example: Airspace Sectorisation Demand vs Capacity Airspace Sectorisation Phylogenetic Supertrees Inference of Haplotypes Robotic Task Sequencing Sensor Net Configuration School Timetabling Tournament Design Contingency Planning Flow Time Span Rate From: Arlanda 00:00 – 09:00 3 To: west, south 09:00 – 18:00 5 18:00 – 24:00 2 From: Arlanda 00:00 – 12:00 4 To: east, north 12:00 – 24:00 3 ... ... ... Workload Balancing Medical Image Analysis Doctor Rostering Compiler Design Security: SQL Injection Container Packing Financial Designs Air Traffic Management . . . Biology & Medicine . . . Programming & Testing . . . Other Applications Many important real-life problems are NP-hard and thus must be solved by intelligent search, unless P=NP. To solve a constraint problem, decisions have to be made (that is, values have to be found for the unknowns) so that: The given constraints on the unknowns are satisfied. Optionally: A cost is minimal, or a benefit is maximal. Combinatorial optimisation covers satisfaction problems and optimisation problems, for unknowns over discrete sets. Combinatorial Optimisation A technology for combinatorial optimisation offers tools for: Modelling constraint problems in a declarative language. Solving constraint problems intelligently by: either default search upon pushing a button or systematic search guided by user-given heuristics or local search guided by user-given (meta-)heuristics or hybrid search plus inference, or relaxation, or both. Solving = Search + Inference + Relaxation Technologies for Combinatorial Optimisation Model once, solve everywhere! model flattening instance data solver features flat model solver (optimal) solution Try several solver technologies, with- out knowing in depth how they work: Constraint programming (CP) full details in course 1DL441 Integer linear programming (IP): linear constraints on integer variables Propositional satisfiability (SAT): clausal constraints on Boolean vars SAT modulo theories (SMT): + integer arithmetic, bit vectors, . . . Local search (LS): trade guarantees for speed Modelling for Combinatorial Optimisation (5 credits, 1DL449) Solver-independent model of the problem, with 1 and – 0: set of int: Towns, Judges int: r, c, λ array[Towns, Judges] of var 0..1: TTC satisfy forall(t in Towns) r = sum(j in Judges) TTC[t, j] forall(j in Judges) c = sum(t in Towns) TTC[t, j] forall(t, t’ in Towns where t < t’) λ = sum(j in Judges) TTC[t, j] · TTC[t’, j] Model-independent instance data for the Sweden instance: Towns = {Birka, Falun, Lund, Mora, Sigtuna, Uppsala, Ystad} Judges = {Alva, Dan, Eva, Jim, Leo, Mia, Ulla} hr, ci = h3,3,1i Constraint Model: Touristic Town Competition Slogan: Constraint Program = Model [+ Search Heuristics ] A constraint programming solver conducts heuristic-guided search interleaved with inference: Each constraint has an inference algorithm. Consider the airspace sectorisation constraint C ONNECTED ([C 1 ,...,C n ]), which ensures at most one stretch per colour among the variables C i . From ··· ··· ? ? ? ? ? ? ? ··· ? ··· the propagator of the C ONNECTED constraint infers no redyellow ? ? ? ? ? ? ? no redblack Inference is the elimination of impossible values, so as to accelerate otherwise blind search. Comb’l Optimisation using Constraint Programming (10 credits, 1DL441) In order to pass, the student must be able to: model a combinatorial problem using a solver-independent constraint modelling language discuss various models of a combinatorial problem expressed in a constraint modelling language describe and compare different constraint solving technolo- gies that can be used by the back-end solvers to a constraint modelling language, including CP IP, SAT, SMT, and LS decide which constraint solving technologies to try first when facing a new combinatorial problem, and motivate decision design and evaluate different models of a combinatorial prob- lem for various constraint solving technologies Learning Outcomes (1DL449) Period 2 of the autumn semester 12 lectures, in English No textbook required Modelling using the (free!) MiniZinc.org toolchain: 3 assignments (2 credits) 1 project (3 credits) with 3 help sessions and 1 solution session per assignment no exam Prerequisites: able to define (or learn) basic concepts in algebra, combinatorics, logic, graph theory, and set theory Course Organisation (1DL449) Periods 1 and 2 of the autumn semester 22 lectures, in English No textbook required C++ programming with the (free!) Gecode.org CP library: 3 assignments, to be done in pairs (2 credits) 3 project parts, to be done in pairs (3 credits) with 3 help sessions and 1 solution session per homework 1 closed-book exam, to be done alone (5 credits) Prerequisites: able to define (or learn) basic concepts in al- gebra, combinatorics, logic, graph theory, and set theory; able to implement basic search algorithms Course Organisation (1DL441) Some users and contributors: CP has become the technology of choice in configuration, personnel rostering, scheduling, timetabling, . . . Success Stories of Constraint Programming

Combinatorial Optimisation Pierre Flener ASTRA Solving Problems that Are Larger … · 2016-06-08 · + Solving Problems that Are Larger than the Universe! Pierre Flener ASTRA Research

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Combinatorial Optimisation Pierre Flener ASTRA Solving Problems that Are Larger … · 2016-06-08 · + Solving Problems that Are Larger than the Universe! Pierre Flener ASTRA Research

Combinatorial Optimisation+ Solving Problems that Are Larger than the Universe!

Pierre FlenerASTRA

Research Group onCombinatorialOptimisation

Optimisation is a science of service:to scientists, to engineers, and to society.

OptimisationHow to judge fairly which is the touristic town of the year?

Alva Dan Eva Jim Leo Mia UllaBirka 3 3 3 – – – –Falun 3 – – 3 3 – –Lund 3 – – – – 3 3

Mora – 3 – 3 – 3 –Sigtuna – 3 – – 3 – 3

Uppsala – – 3 3 – – 3

Ystad – – 3 – 3 3 –

Constraints to be satisfied:

•Equal jury size: Every town is evaluated by three judges.

•Equal travel load: Every judge evaluates three towns.

• Fairness: Every town pair has one judge in common.

Example: Touristic Town Competition

Mon Tue Wed Thu Fri Sat SunDoctor A call – op – op – –Doctor B app call – op – – callDoctor C op – call app app call –Doctor D app op – call op – –Doctor E op – op – call – –

Constraints to be satisfied:• #doctors-on-call / day = 1

• #operations / workday ≤ 2

• #operations / week ≥ 7

• #appointments / week ≥ 4

• day off after operation day

• . . .

Example: Doctor Rostering

Given: an airspace splitinto c cells, and a targetednumber s of sectors.

Find: a colouring of the cells intos connected convex sectors, withminimal imbalance of the work-loads of their air traffic controllers.

There are sc possible colourings, but very few colourings satisfyall constraints and are optimal: intelligent search is necessary!

Example: Airspace Sectorisation

Demandvs Capacity

AirspaceSectorisation

PhylogeneticSupertrees

Inference ofHaplotypes

Robotic TaskSequencing

Sensor NetConfiguration

SchoolTimetabling

TournamentDesign

ContingencyPlanning

Flow Time Span RateFrom: Arlanda 00:00 – 09:00 3To: west, south 09:00 – 18:00 5

18:00 – 24:00 2From: Arlanda 00:00 – 12:00 4To: east, north 12:00 – 24:00 3. . . . . . . . .

WorkloadBalancing

Medical ImageAnalysis

DoctorRostering

CompilerDesign

Security:SQL Injection

ContainerPacking

FinancialDesigns

Air Traffic Management . . . Biology & Medicine . . . Programming & Testing . . . Other Applications

Many important real-life problems are NP-hard and thusmust be solved by intelligent search, unless P=NP.

To solve a constraint problem, decisions have to be made(that is, values have to be found for the unknowns) so that:

•The given constraints on the unknowns are satisfied.

•Optionally: A cost is minimal, or a benefit is maximal.

Combinatorial optimisation covers satisfaction problems andoptimisation problems, for unknowns over discrete sets.

Combinatorial OptimisationA technology for combinatorial optimisation offers tools for:

•Modelling constraint problems in a declarative language.

• Solving constraint problems intelligently by:

– either default search upon pushing a button– or systematic search guided by user-given heuristics– or local search guided by user-given (meta-)heuristics– or hybrid search

plus inference, or relaxation, or both.

+

Solving = Search + Inference + Relaxation

Technologies for Combinatorial Optimisation

+ Model once, solve everywhere!

model flattening

instancedata

solverfeatures

flatmodel

solver

(optimal)solution

Try several solver technologies, with-out knowing in depth how they work:

•Constraint programming (CP)+ full details in course 1DL441

• Integer linear programming (IP):linear constraints on integer variables

• Propositional satisfiability (SAT):clausal constraints on Boolean vars

• SAT modulo theories (SMT):+ integer arithmetic, bit vectors, . . .

•Local search (LS):trade guarantees for speed

Modelling for Combinatorial Optimisation (5 credits, 1DL449)Solver-independent model of the problem, with 3 1 and – 0:

set of int: Towns, Judgesint: r, c, λarray[Towns, Judges] of var 0..1: TTCsatisfy

forall(t in Towns) r = sum( j in Judges) TTC[t, j]forall( j in Judges) c = sum(t in Towns) TTC[t, j]forall(t, t’ in Towns where t < t’)λ = sum( j in Judges) TTC[t, j] · TTC[t’, j]

Model-independent instance data for the Sweden instance:Towns = {Birka, Falun, Lund, Mora, Sigtuna, Uppsala, Ystad}Judges = {Alva, Dan, Eva, Jim, Leo, Mia, Ulla}〈r, c, λ〉 = 〈3,3,1〉

Constraint Model: Touristic Town Competition

Slogan: Constraint Program = Model [ + Search Heuristics ]

A constraint programming solver conducts heuristic-guided search interleaved with inference:

Each constraint has an inference algorithm.

Consider the airspace sectorisation constraintCONNECTED([C1, . . . , Cn]), which ensures at mostone stretch per colour among the variables Ci.From

· · · · · · ? ? ? ? ? ? ? · · · ? · · ·the propagator of the CONNECTED constraint infers

no redyellow ? ? ? ? ? ? ? no redblack

Inference is the elimination of impossible values, soas to accelerate otherwise blind search.

Comb’l Optimisation using Constraint Programming (10 credits, 1DL441)

In order to pass, the student must be able to:

•model a combinatorial problem using a solver-independentconstraint modelling language

• discuss various models of a combinatorial problem expressedin a constraint modelling language

• describe and compare different constraint solving technolo-gies that can be used by the back-end solvers to a constraintmodelling language, including CP IP, SAT, SMT, and LS

• decide which constraint solving technologies to try first whenfacing a new combinatorial problem, and motivate decision

• design and evaluate different models of a combinatorial prob-lem for various constraint solving technologies

Learning Outcomes (1DL449)

• Period 2 of the autumn semester

• 12 lectures, in English

•No textbook required

•Modelling using the (free!) MiniZinc.org toolchain:

– 3 assignments (2 credits)– 1 project (3 credits)

with 3 help sessions and 1 solution session per assignment

• no exam

•Prerequisites: able to define (or learn) basic concepts inalgebra, combinatorics, logic, graph theory, and set theory

Course Organisation (1DL449)• Periods 1 and 2 of the autumn semester

• 22 lectures, in English

•No textbook required

•C++ programming with the (free!) Gecode.org CP library:

– 3 assignments, to be done in pairs (2 credits)– 3 project parts, to be done in pairs (3 credits)

with 3 help sessions and 1 solution session per homework

• 1 closed-book exam, to be done alone (5 credits)

•Prerequisites: able to define (or learn) basic concepts in al-gebra, combinatorics, logic, graph theory, and set theory;able to implement basic search algorithms

Course Organisation (1DL441)Some users and contributors:

CP has become the technology of choice in configuration,personnel rostering, scheduling, timetabling, . . .

Success Stories of Constraint Programming