• Keine Ergebnisse gefunden

Planning and Optimization

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization"

Copied!
8
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Planning and Optimization

E4. Linear & Integer Programming

Malte Helmert and Gabriele R¨ oger

Universit¨ at Basel

November 18, 2020

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 1 / 29

Planning and Optimization

November 18, 2020 — E4. Linear & Integer Programming

E4.1 Integer Programs E4.2 Linear Programs E4.3 Summary

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 2 / 29

Content of this Course

Planning

Classical

Foundations Logic Heuristics Constraints

Probabilistic

Explicit MDPs Factored MDPs

Content of this Course: Constraints (Timeline)

Constraints

Landmarks Cost Partitioning

Network

Flows

Operator

Counting

(2)

Content of this Course: Constraints (Relevance)

Constraints

Landmarks Cost Partitioning

Network Flows Operator Counting

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 5 / 29

Content of this Course (Relevance)

Planning

Classical

Foundations Logic Heuristics Constraints

Probabilistic

Explicit MDPs Factored MDPs

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 6 / 29

Content of this Course (Relevance)

Computer Science

Artifical Intelligence Operations Research Machine Learning

Robotics

a. . . a

E4. Linear & Integer Programming Integer Programs

E4.1 Integer Programs

(3)

E4. Linear & Integer Programming Integer Programs

Motivation

I This goes on beyond Computer Science I Active research on IPs and LPs in

I Operation Research I Mathematics

I Many application areas, for instance:

I Manufacturing I Agriculture I Mining I Logistics I Planning

I As an application, we treat LPs / IPs as a blackbox I We just look at the fundamentals

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 9 / 29

E4. Linear & Integer Programming Integer Programs

Motivation

Example (Optimization Problem) Consider the following scenario:

I A factory produces two products A and B

I Selling a unit of B yields 5 times the profit of a unit of A.

I A client places the unusual order to “buy anything that can be produced on that day as long as the units of B do not exceed two plus twice the units of A.”

I The factory can produce at most 12 products per day.

I There is only material for 6 units of A

(there is enough material to produce any amount of B) How many units of A and B does the client receive

if the factory owner aims to maximize her profit?

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 10 / 29

E4. Linear & Integer Programming Integer Programs

Integer Program: Example

Let X A and X B be the (integer) number of produced A and B Example (Optimization Problem as Integer Program)

maximize X A + 5X B subject to 2 + 2X A ≥ X B

X A + X B ≤ 12 X A ≤ 6 X A ≥ 0, X B ≥ 0 unique optimal solution:

produce 4 A (X A = 4) and 8 B (X B = 8) for a profit of 44

E4. Linear & Integer Programming Integer Programs

Integer Program Example: Visualization

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9

X

A

≥ 0

X

B

≥ 0 X

A

≤ 6 2 + 2 X

A

≥ X

B

X

A

+ X

B

12

X A

X B

(4)

E4. Linear & Integer Programming Integer Programs

Integer Programs

Integer Program

An integer program (IP) consists of:

I a finite set of integer-valued variables V

I a finite set of linear inequalities (constraints) over V I an objective function, which is a linear combination of V I which should be minimized or maximized.

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 13 / 29

E4. Linear & Integer Programming Integer Programs

Terminology

I An integer assignment to all variables in V is feasible if it satisfies the constraints.

I An integer program is feasible if there is such a feasible assignment. Otherwise it is infeasible.

I A feasible maximum (resp. minimum) problem is

unbounded if the objective function can assume arbitrarily large positive (resp. negative) values at feasible assignments.

Otherwise it is bounded.

I The objective value of a bounded feasible maximum

(resp. minimum) problem is the maximum (resp. minimum) value of the objective function with a feasible assignment.

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 14 / 29

E4. Linear & Integer Programming Integer Programs

Three classes of IPs

IPs fall into three classes:

I bounded feasible: IP is solvable and optimal solutions exist I unbounded feasible: IP is solvable and arbitrarily good

solutions exist

I infeasible: IP is unsolvable

E4. Linear & Integer Programming Integer Programs

Another Example

Example

minimize 3X o

1

+ 4X o

2

+ 5X o

3

subject to X o

4

≥ 1

X o

1

+ X o

2

≥ 1 X o

1

+ X o

3

≥ 1 X o

2

+ X o

3

≥ 1

X o

1

≥ 0, X o

2

≥ 0, X o

3

≥ 0, X o

4

≥ 0 What example from a previous chapter does this IP encode?

the minimum hitting set from Chapter E2

(5)

E4. Linear & Integer Programming Integer Programs

Complexity of solving Integer Programs

I As an IP can compute an MHS, solving an IP must be at least as complex as computing an MHS I Reminder: MHS is a “classical” NP-complete problem I Good news: Solving an IP is not harder

Finding solutions for IPs is NP-complete.

Removing the requirement that solutions must be integer-valued leads to a simpler problem

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 17 / 29

E4. Linear & Integer Programming Linear Programs

E4.2 Linear Programs

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 18 / 29

E4. Linear & Integer Programming Linear Programs

Linear Programs

Linear Program

A linear program (LP) consists of:

I a finite set of real-valued variables V

I a finite set of linear inequalities (constraints) over V I an objective function, which is a linear combination of V I which should be minimized or maximized.

We use the introduced IP terminology also for LPs.

Mixed IPs (MIPs) generalize IPs and LPs:

some variables are integer-values, some are real-valued.

E4. Linear & Integer Programming Linear Programs

Linear Program: Example

Let X A and X B be the (real-valued) number of produced A and B Example (Optimization Problem as Linear Program)

maximize X A + 5X B subject to 2 + 2X A ≥ X B

X A + X B ≤ 12 X A ≤ 6 X A ≥ 0, X B ≥ 0 unique optimal solution:

X A = 3 1 3 and X B = 8 2 3 with objective value 46 2 3

(6)

E4. Linear & Integer Programming Linear Programs

Linear Program Example: Visualization

0 1 2 3 4 5 6

0 2 4 6 8

X

A

≥ 0

X

B

≥ 0 X

A

≤ 6 2 + 2 X

A

≥ X

B

X

A

+ X

B

12

X A X B

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 21 / 29

E4. Linear & Integer Programming Linear Programs

Solving Linear Programs

I Observation:

For an maximization problem, the objective value of the LP is not lower than the one of the IP.

I Complexity:

LP solving is a polynomial-time problem.

I Common idea:

Approximate IP objective value with corresponding LP (LP relaxation).

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 22 / 29

E4. Linear & Integer Programming Linear Programs

LP Relaxation

Theorem (LP Relaxation)

The LP relaxation of an integer program is the problem that arises by removing the requirement that variables are integer-valued.

For a maximization (resp. minimization) problem, the objective value of the LP relaxation is an upper (resp. lower) bound on the value of the IP.

Proof idea.

Every feasible assignment for the IP is also feasible for the LP.

E4. Linear & Integer Programming Linear Programs

LP Relaxation of MHS heuristic

Example (Minimum Hitting Set)

minimize 3X o

1

+ 4X o

2

+ 5X o

3

subject to X o

4

≥ 1

X o

1

+ X o

2

≥ 1 X o

1

+ X o

3

≥ 1 X o

2

+ X o

3

≥ 1

X o

1

≥ 0, X o

2

≥ 0, X o

3

≥ 0, X o

4

≥ 0 optimal solution of LP relaxation:

X o

4

= 1 and X o

1

= X o

2

= X o

3

= 0.5 with objective value 6

LP relaxation of MHS heuristic is admissible

(7)

E4. Linear & Integer Programming Linear Programs

Some LP Theory: Duality

Every LP has an alternative view (its dual LP).

I roughly: variables and constraints swap roles

I roughly: objective coefficients and bounds swap roles I dual of maximization LP is minimization LP and vice versa I dual of dual: original LP

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 25 / 29

E4. Linear & Integer Programming Linear Programs

Duality Theorem

Theorem (Duality Theorem)

If a linear program is bounded feasible, then so is its dual, and their objective values are equal.

(Proof omitted.)

The dual provides a different perspective on a problem.

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 26 / 29

E4. Linear & Integer Programming Summary

E4.3 Summary

E4. Linear & Integer Programming Summary

Summary

I Linear (and integer) programs consist of an objective function that should be maximized or minimized subject to a set of given linear constraints.

I Finding solutions for integer programs is NP-complete.

I LP solving is a polynomial time problem.

I The dual of a maximization LP is a minimization LP and vice versa.

I The dual of a bounded feasible LP has the

same objective value.

(8)

E4. Linear & Integer Programming Summary

Further Reading

The slides in this chapter are based on the following excellent tutorial on LP solving:

Thomas S. Ferguson.

Linear Programming – A Concise Introduction.

UCLA, unpublished document available online.

M. Helmert, G. R¨oger (Universit¨at Basel) Planning and Optimization November 18, 2020 29 / 29

Referenzen

ÄHNLICHE DOKUMENTE

(resp. minimum) problem is the maximum (resp. minimum) value of the objective function with a feasible assignment... Integer Programs Linear

I A linear program is feasible if there is such a feasible assignment. minimization) problem is unbounded if the objective function can assume arbitrarily large positive

• Development of a framework for implementation of the integrated method called decompose- and-cut, based on the concept of structured separation, along with methods for separating

Now note that problem (7) is equivalent to finding the shortest route in the network from node 0 to node 1, and in general to the node equivalent to b*.. The problem of finding

Computational Performance Evaluation of Two Integer Linear Programming Models for the Minimum Common String Partition Problem.. Christian Blum · G¨

In conclusion, the hybrid VNS approach with (limited) next improvement as step function and RA used for generating initial solutions yields the best results on CSPlib instances..

When considering exact approaches, the following techniques have had signif- icant success: branch-and-bound, dynamic programming, constraint programming, and in particular the

The idea of a relaxation is to formulate an easier problem that disregards part of the original problem’s constraints or considers a modified objective function in a way that