IP Modeling Techniques: Facility Location and Knapsack Problem, Slides of Discrete Structures and Graph Theory

Information on ip modeling techniques using binary variables, restrictions on number of options, contingent decisions, and variables with k possible values. It includes examples of the facility location problem and knapsack problem, and explains how to model additional requirements and functions with k possible values.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

ascharya
ascharya 🇮🇳

4.6

(21)

166 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
IP modeling techniques I
In this handout,
Modeling techniques:
Using binary variables
Restrictions on number of options
Contingent decisions
Variables (functions) with k possible values
Applications:
Facility Location Problem
Knapsack Problem
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download IP Modeling Techniques: Facility Location and Knapsack Problem and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

IP modeling techniques I

In this handout,

Modeling techniques:

Using binary variables

Restrictions on number of options

Contingent decisions

Variables (functions) with k possible values

Applications:

Facility Location Problem

Knapsack Problem

Example of IP: Facility Location

  • A company is thinking about building new facilities in

LA and SF.

  • Relevant data:

Total capital available for investment: $10M

  • Question: Which facilities should be built

to maximize the total profit?

capital needed expected profit

  1. factory in LA (^) $6M $9M
  2. factory in SF (^) $3M $5M
  3. warehouse in LA (^) $5M $6M
  4. warehouse in SF (^) $2M $4M

Knapsack problem

Any IP, which has only one constraint,

is referred to as a knapsack problem.

  • n items to be packed in a knapsack.
  • The knapsack can hold up to W lb of items.
  • Each item has weight w (^) i lb and benefit bi.
  • Goal: Pack the knapsack such that

the total benefit is maximized.

IP model for Knapsack problem

  • Define decision variables ( i = 1, …, n):
  • Then the total benefit:

the total weight:

 Summarizing, the IP model is:

max

s.t.

x (^) i binary ( i = 1, …, n)

0 if not

1 if item is packed x (^) i

i

n

i

bi xi 1 ∑ =

n

i

wi xi 1

n

i

bi xi 1

w x W

n

i

i i ≤ = 1

The Facility Location Problem:

adding new requirements

  • Extra requirement:

build at most one of the two warehouses.

The corresponding constraint is:

x 3 +x 4 ≤ 1

  • Extra requirement:

build at least one of the two factories.

The corresponding constraint is:

x 1 +x 2 ≥ 1

Modeling Technique:

Restrictions on the number of options

  • Suppose in a certain problem, n different

options are considered. For i=1,…,n

  • Restrictions: At least p and at most q of

the options can be chosen.

  • The corresponding constraints are:

0 if not

1 if option is chosen x (^) i

i

x p

n

i

i ≥ = 1

x q

n

i

i ≤ = 1

Modeling Technique:

Variables with k possible values

  • Suppose variable y should take

one of the values d 1 , d 2 , …, d (^) k.

  • How to achieve that in the model?
  • Introduce new decision variables. For i=1,…,k,
  • Then we need the following constraints.

0 otherwise

1 if y takes value d x

i i

1 ( can take only one value) 1

x y

k

i

i =

( should take value di if xi 1) 1

= (^) ∑ =

y d x y

k

i

i i

Modeling Technique:

Functions with k possible values

  • The technique of the previous slide can be extended

to functions.

  • Suppose the linear function f( y )=a 1 y 1 +…+a (^) n y (^) n should

take one of the values d 1 , d 2 , …, d (^) k.

  • Introduce new decision variables. For i=1,…,k,
  • Then we need the following constraints.

0 otherwise

1 if f(y) takes value d x

i i

1 (f(y) can take only one value ) 1

∑^ =

k

i

xi

( f(y) should take value di if xi 1) 1 1

∑ =^ ∑^ = = =

k

i

i i

n

j

aj yj d x Docsity.com