# Integer Programming and Logic-Based Modeling Jan Fábry, Jan Pelikán - PowerPoint PPT Presentation

1 / 22

Integer Programming and Logic-Based Modeling Jan Fábry, Jan Pelikán. ___________________________________________________________________________ MME 2003, Prague. Integer Programming Models. Discrete variables: NP-hard problems.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Integer Programming and Logic-Based Modeling Jan Fábry, Jan Pelikán

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

### Integer Programming and Logic-Based ModelingJan Fábry, Jan Pelikán

___________________________________________________________________________

MME 2003, Prague

### Integer Programming Models

Discrete variables: NP-hard problems

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

Standard Branch and Bound Method

• Non-polynomial method (exponentialnumber of branches)

• Estimation of the optimal objective value

### Integer Programming Models

Reduction of number of branches

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

• Skiping non-effective branches (using the estimation of the optimal objective value)

• Heuristic methods

• Logic-based Branch and Bound Method

### TSP – IP Model

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

### TSP – Logic-Based Model

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

Cost = (5, 8, 4)

Profit = (3, 5, 2)

Feasible

(4, 2, 1)

Value  {1, 2, 3, 4}

All different

Infeasible

(2, 2, 1)

### Integer Knapsack Problem

Example:

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

3 objects

Total profit  30

Objective: minimize total cost

IP model

Logic-based model

### Integer Knapsack Problem

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

### Logic-based Approach

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

• Reduction of branches

• Simplicity of L-B models

• No estimation of the optimal value

VAR

VAR

VAR

VALUE

VALUE

VALUE

x1

x1

x1

1

2

2

2

3

4

x2

x2

x2

1

2

2

3

4

4

x3

x3

x3

1

2

3

3

3

4

### Integer Knapsack Problem

Domain

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

x1

1

2

x2

1

2

x3

3

4

### Integer Knapsack Problem

Domain reduction

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

x1

1

2

3

4

x2

2

3

4

x3

1

2

3

4

### Integer Knapsack Problem

Bounds consistency maintenance

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

1

2

2

3

3

3

3

3

4

4

4

2

2

3

3

3

4

4

4

4

4

4

1

1

1

1

2

2

2

2

2

3

3

3

4

4

x1 ≤ 2

x1 ≥ 3

z = 54

x2 ≤ 3

x2 ≥ 4

z = 52

x3 ≤ 1

x3 ≥ 2

z = 51

z = 55

### Integer Knapsack Problem

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

all-different {y1,…,yn}

• The domains of variables yj may have more than n elements.

• The constraint requires that variablesy1,…,yntake distinct values.

• It is mostly used in assignment problems.

• The constraint requires that yj is the integer occurring after j in some permutation of 1,2,…,n.

• Used in vehicle routing applications.

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

circuit (y1,…,yn)

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

path (y1,…,yk)

• The constraint requires that value of xjoccurs exactly mj times in array a of an arbitrary length.

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

distribute ((m1,…,mn), (x1,…,xn), a)

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

cumulative ((t1,…,tn), (d1,…,dn), (c1,…,cn), C)

• Used in job scheduling problems.

• Variable tj represents the start time of the job j.

• Parameters dj and cj are the duration and the consuming resource rate of the job j.

• The resource limit is C.

### Logic-Based Modeling

Defined predicates

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

element (y, (c1,…,cn), z)

• The constraint requires that z = cy.

• y and z are variables.

• All cj are constants.

• Used in lot-sizing problems.

### Software

Standard Branch and Bound Method

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

LINGO, AMPL, XPRES-MP, ILOG CPLEX,…

Logic-based modeling

CHIP V5, OPBDP, ILOG Solver (OPL Studio),…

TRIAL VERSION:http://www.ilog.com/products/oplstudio/trial.cfm

### Mathematical Recreation

JAN

DNES

NEVI

ZDA

SE

JEDE

JEDNA

JIZDA

ZNOVA

enum Letters {J,A,E,N,D,S,V,I,Z,O};

var int k[Letters] in 0..9;

solve

{alldifferent(k) onDomain;

100*k[J]+10*k[A]+k[N]

+1000*k[D]+100*k[N]+10*k[E]+k[S]

+1000*k[N]+100*k[E]+10*k[V]+k[I]

+100*k[Z]+10*k[D]+k[A]

+10*k[S]+k[E]

+1000*k[J]+100*k[E]+10*k[D]+k[E]

+10000*k[J]+1000*k[E]+100*k[D]+10*k[N]+k[A]

+10000*k[J]+1000*k[I]+100*k[Z]+10*k[D]+k[A]

=10000*k[Z]+1000*k[N]+100*k[O]+10*k[V]+k[A];

k[J]>=1; k[D]>=1;k[N]>=1;k[Z]>=1; k[S]>=1; [J]<=5;

};

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

JAN

DNES

NEVI

ZDA

SE

JEDE

JEDNA

JIZDA

ZNOVA

201

3189

1854

630

98

2838

28310

24630

61750

10 solutions

### Mathematical Recreation

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

___________________________________________________________________________

Integer Programming and Logic-Based Modeling MME 2003, Prague

Questions