You are on page 1of 41

Integer

and Mixed Integer


Linear Programs

MIT Center for


Transportation & Logistics

ctl.mit.edu

Numbers, Numbers, Everywhere!


N = Natural, Whole, or Counting Numbers = 0, 1, 2, 3, . . .
Z = Integers = . . . -3, -2, -1, 0, 1, 2, 3, . . .
Q = Rational Numbers = any fraction of Integers, 1/2 , -5/9, 0/22, . . . etc.
R = Real Numbers = all Rational and Irrational numbers, i.e, , 2, e, . . . etc.

B = Binary Integers = {0,1}


B

Why the heck do we care?


MIT Center for
Transportation & Logistics

By Mortalmoth (Own work) [Public domain], via Wikimedia Commons

Integer Variables
Why use them?
n

When its physically impossible to have fractional solutions


w For example; number of people to hire, number of ships to make
w However, if dealing with large numbers, continuous is fine

Allows for modeling logical conditions (Binary)


w If Then:

If we have product leaving plant A then we must open it


w Either Or:
We can either produce 1000 units or none at all.
w Select From:
We must select 4 DCs to open from the 10 possible
We must select 5 products to make from the 15 available

Why do we have to treat them differently?


MIT Center for
Transportation & Logistics

Banner Chemicals II: IP Example

MIT Center for


Transportation & Logistics

Motivating Problem Banner Chemicals II


Situation
n

Banner Chemicals manufactures specialty chemicals. One of their products


comes in two grades, high and supreme. The capacity at the plant is 110
barrels per week.
The high and supreme grade products use the same basic raw materials but
require different ratios of additives. The high grade requires 3 gallons of
additive A and 1 gallon of additive B per barrel while the supreme grade
requires 2 gallons of additive A and 3 gallons of additive B per barrel.
The supply of both of these additives is quite limited. Each week, this product
line is allocated only 300 gallons of additive A per week and 280 gallons of
additive B.
A barrel of the high grade has a profit margin of $80 per barrel while the
supreme grade has a profit margin of $200 per barrel.

Question
n

How many barrels of High and Supreme grade should Banner Chemicals
produce each week assuming you can only produce in 10 barrel lots?

MIT Center for


Transportation & Logistics

Banner Chemicals
Optimal LP Solution
XH= 25 barrels
XS = 85 barrels
Max Profit = 19,000

Max z(XH, XS) = 80XH + 200XS


s.t.
Plant

XH + XS 110

Add. A

3XH + 2XS 300

Add. B

XH + 3XS 280

XS

XH 0
XS 0
What is the optimal solution
with 10 barrel lots?

XH
Notes:

Feasible region becomes a collection of points, no longer a convex hull


MIT Center for
We cannot rely on corner solutions anymore solution space is much bigger!
Transportation & Logistics

How to find solution to IP?


Lets try rounding the solution to

the closest acceptable integer values?


n

Max z(XH, XS) = 80XH + 200XS


s.t.
Plant

XH + XS 110

Add. A

3XH + 2XS 300

Add. B

XH + 3XS 280

LP Solution:
w XH=25 barrels XS= 85 barrels

3.

XS 0

Rounding to closest 10 barrel solution for (XH, XS):


1.
2.

XH 0

zLOT(30, 90) = $20,400 but it is infeasible (Plant constraint)


zLOT(30, 80) = $18,400 feasible
zLOT(20, 90) = $19,600 but it is infeasible (Additive B constraint)

So, using this approach z*LOT= $18,400 with XH=30, XS=80


But, is it the best?

Lets solve all of the points to make sure!


This approach is called Mass Enumeration.
MIT Center for
Transportation & Logistics

Mass Enumeration
of Banner Chemical
Optimal IP Solution
XH= 10 barrels
XS = 90 barrels
Max Profit = 18,800

Optimal LP Solution
XH= 25 barrels
XS = 85 barrels
Max Profit = 19,000

Max z(XH, XS) = 80XH + 200XS


s.t.

Closest rounded
LP Solution
XH= 30 barrels
XS = 80 barrels
Max Profit = 18,400

Plant

XH + XS 110

Add. A

3XH + 2XS 300

Add. B

XH + 3XS 280
XH 0
XS 0

Each cell shows z = 80XH + 200XS


x indicates infeasible solution

Notes:

Rounding the optimal LP solution will not always lead to an optimal IP solution
Mass enumeration is very time consuming not always possible for real problems!
IP solution can never be better than the LP solution!
MIT
Center
IPs forare much, much, much harder to solve than LPs!
Transportation & Logistics

Formulation Changes . . . not much!


Max z(XH, XS) = 80XH + 200XS
s.t.
Plant

XH + XS 110

Add. A

3XH + 2XS 300

Add. B

XH + 3XS 280
XH 0
XS 0

In order to solve in integer values of


lots of ten, we need to:
n

Convert Decision Variables


w XHL = XH /10 XSL = XS /10

Scale the coefficients and constraint RHS


w e.g. 110 barrels becomes 11 lots of ten

Indicate that the new DVs are Integers


Max z(XHL, XSL) = 800XHL + 2000XSL
s.t.
Plant

XHL + XSL 11

Add. A

3XHL + 2XSL 30

Add. B

XHL + 3XSL 28
XHL, XSL 0 Integers

MIT Center for


Transportation & Logistics

GoNuts Juice Company: Model 1

MIT Center for


Transportation & Logistics

10

GoNuts Juice Company

GoNuts manufactures different juices made entirely of various exotic nuts. Their
primary market is China and they operate three plants located in Ethiopia,
Tanzania, and Nigeria. You have been asked to help them determine where to
manufacture the two newest juices they offer, Gingko Nut and Kola Nut. Each
plant has a different variable cost structure and capacity for manufacturing the
different juices. Also, each juice has an expected demand.
Cost/Unit
Ethiopia
Tanzania
Nigeria

Ginko
21.00
22.50
23.00

Kola
22.50
24.50
25.50

Capacity Units/Month
Ethiopia
425
Tanzania
400
Nigeria
750

Demand Units/Month
Ginko
550
Kola
450

How much of each juice should be made at each plant in order to minimize total
cost while meeting demand and adhering to plant capacity?
MIT Center for
Transportation & Logistics

Image CC0 Public Domain from https://pixabay.com

11

Formulating GoNuts

Step 1. Determine Decision Variables


xG,E = Number of Ginko Juice units made in Ethiopia plant
xK,E = Number of Kola Juice units made in Ethiopia plant
xG,T = Number of Ginko Juice units made in Tanzania plant
xK,T = Number of Kola Juice units made in Tanzania plant
xG,N = Number of Ginko Juice units made in Nigeria plant
xK,N = Number of Kola Juice units made in Nigeria plant
xij = Number of units of product i made in plant j
xij 0
for all i,j

Step 2. Formulate Objective Function


Minimize z = Cost = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N

Min
where:
MIT Center for
Transportation & Logistics

z =

cij xij

xij = Number of units of product i made in plant j


cij = Cost per unit of product i made at plant j

12

Formulating GoNuts

Step 3. Formulate Constraints


Plant Capacity
xG,E + xK,E 425
xG,T + xK,T 400
xG,N + xK,N 750

x
i

ij

Cj

where:
xij = Number of units of product i made in plant j
Cj = Capacity in units at plant j

Product Demand
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450

xij Di

where:
xij = Number of units of product i made in plant j
Di = Demand for product i in units
MIT Center for
Transportation & Logistics

13

Formulating GoNuts

Minimize z = Cost = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N


subject
xG,E + xK,E 425
to
Capacity
xG,T + xK,T 400
j=1
xG,N + xK,N 750
cij
i=1
i=2
xG,E + xG,T + xG,N 550
j=2
j=1 21.00 22.50
xK,E + xK,T + xK,N 450
j=3
j=2 22.50 24.50
xG,E, xK,E, xG,T, xK,T, xG,N, xK,N 0
j=3 23.00 25.50
Min

z =

Cj
425
400
750

Demand Di
i=1 550
i=2 450

cij xij

s.t.

x
x
i

ij

Cj

ij

Di

xij 0

ij

where:
xij = Number of units of product i made in plant j
cij = Cost per unit of product i made at plant j
Cj = Capacity in units at plant j
MIT Center for
Di = Demand
for product i in units
Transportation & Logistics

Optimal Solution
Ethiopia
Tanzania
Nigeria

Ginko
0
375
175

Kola
425
25
0

Total min cost = 22,637.50


14

GoNuts Juice Company: Model 2

MIT Center for


Transportation & Logistics

15

GoNuts Juice Company: Model 2

GoNuts manufactures different juices made entirely of various exotic nuts. Their
primary market is China and they operate three plants located in Ethiopia,
Tanzania, and Nigeria. You have been asked to help them determine where to
manufacture the two newest juices they offer, Gingko Nut and Kola Nut. Each
plant has a different fixed and variable cost structure and capacity for
manufacturing the different juices. The fixed cost only applies if the plant
produces any juice. Also, each juice has an expected demand.
Cost/Unit
Ethiopia
Tanzania
Nigeria

Ginko
21.00
22.50
23.00

Kola
22.50
24.50
25.50

Capacity
Units/Month
Ethiopia
425
Tanzania
400
Nigeria
750

Fixed (/Month)
1,500
2,000
3,000

Demand Units/Month
Ginko
550
Kola
450

How much of each juice should be made at each plant in order to minimize total
cost while meeting demand and adhering to plant capacity?
MIT Center for
Transportation & Logistics

Image CC0 Public Domain from https://pixabay.com

16

Formulating GoNuts 2

Step 1. Determine Decision Variables


xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 otherwise

Step 2. Formulate Objective Function


Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N + 1500yE + 2000yT + 3000yN

Min
where:

z =

cij xij + f j y j
j

xij = Number of units of product i made in plant j


yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j
fj = Fixed cost per month if plant j is used

MIT Center for


Transportation & Logistics

17

Formulating GoNuts 2

Step 3. Formulate Constraints


Demand Capacity

xG,E + xK,E 425


xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450

x
x
i

ij

Cj

ij

Di

where:
xij = Number of units of product i made in plant j
Cj = Capacity in units at plant j
Di = Demand for product i in units

Is this enough? Try solving it!


n

You need to ensure that if a plant produces product, then


it is actually opened!
If Then conditions require both a
w Binary Variable
w Linking Constraint

MIT Center for


Transportation & Logistics

18

If Then Conditions

MIT Center for


Transportation & Logistics

19

If-Then Condition
Looking at the Nigeria Plant . . .

yN
Feasible Values
1

How do yN, xGN and xKN interact?


0

IF . . .

THEN

xGN+xKN

yN = 0 yN = 1

CN

= 0

YES

YES

xGN + xKN 750 yN

>0 and CN

NO

YES

IF xGN+xKN =

x
i

ij

My j

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
M = a big number (such as Cj in this case)
MIT Center for
Transportation & Logistics

xGN + xKN

THEN yN =

0 or 1

0 750 yN

99

99 750 yN

1 750 yN

If the X values >0, then Y MUST be


equal to 1! Otherwise, it would
violate the constraint.
20

Formulating GoNuts 2

Linking Demand Capacity

Step 3. Formulate Constraints


xG,E + xK,E 425
xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0

MIT Center for


Transportation & Logistics

x C
x D
x My
i

ij

ij

ij

0 j

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
M = a big number (such as Cj in this case)
Cj = Capacity in units at plant j
Di = Demand for product i in units

21

GoNuts Juice Company Model 2:


With If Then Conditions

MIT Center for


Transportation & Logistics

22

Formulation of GoNuts Model 2

Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N + 1500yE + 2000yT + 3000yN
subject to

xG,E + xK,E 425


xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0
xG,E, xK,E, xG,T, xK,T, xG,N, xK,N 0
yE, yT, yN = {0, 1}

Demand Di
i=1 550
i=2 450
Capacity
j=1
j=2
j=3

Cj
fj
425 1500
400 2000
MIT Center for
750 &3000
Transportation
Logistics

cij
j=1
j=2
j=3

i=1
21.00
22.50
23.00

Min

z = cij xij + f j y j
i

s.t.

x
x
x
i

ij

Cj

ij

Di

ij

My j 0

xij 0
y = {0,1}

ij

j
where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j
Cj = Capacity in units at plant j
Di = Demand for product i in units
i=2
M = a big number (such as Cj in this case)
22.50
24.50
23
25.50

Solution: GoNuts Models 1 & 2


Model 1 only variable costs
z*= 22,637.50
Ethiopia
Tanzania
Nigeria

Ginko
0
375
175

MIT Center for


Transportation & Logistics

Model 2 with fixed plant costs


z*= 27,350.00

Kola
425
25
0

Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

Kola
425
0
25

24

GoNuts Juice Company: Model 3


Adding Either Or Conditions

MIT Center for


Transportation & Logistics

25

GoNuts Juice Company: Model 3

GoNuts manufactures different juices made entirely of various exotic nuts. Their
primary market is China and they operate three plants located in Ethiopia,
Tanzania, and Nigeria. You have been asked to help them determine where to
manufacture the two newest juices they offer, Gingko Nut and Kola Nut. Each
plant has a different fixed and variable cost structure and both minimum and
maximum capacities for manufacturing the different juices if the plant opens.
The fixed cost only applies if the plant produces any juice. Also, each juice has
an expected demand.
Cost/Unit
Ethiopia
Tanzania
Nigeria

Ginko
21.00
22.50
23.00

Kola
22.50
24.50
25.50

Capacity
Max
Min
(units/Month) Capacity Capacity
Ethiopia
425
100
Tanzania
400
250
Nigeria
750
600

Demand Units/Month
Ginko
550
Kola
450

Fixed
(/Month)
1,500
2,000
3,000

If the Nigeria plant opens, it


must produce at least 600 units

How much of each juice should be made at each plant in order to minimize total
cost while meeting demand and adhering to plant capacity?
MIT Center for
Transportation & Logistics

Image CC0 Public Domain from https://pixabay.com

26

Formulating GoNuts 3
Step 1. Determine Decision Variables

No Change!

xij = Number of units of product i made in plant j


yj = 1 if plant j is opened; = 0 otherwise

Step 2. Formulate Objective Function No Change!


Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N + 1500yE + 2000yT + 3000yN

Min
where:

z =

cij xij + f j y j
j

xij = Number of units of product i made in plant j


yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j
fj = Fixed cost per month if plant j is used

MIT Center for


Transportation & Logistics

27

Formulating GoNuts 3

Linking Demand Capacity

Step 3. Formulate Constraints


xG,E + xK,E 425
xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0

x C
x D
x My
i

ij

ij

ij

0 j

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
M = a big number (such as Cj in this case)
Cj = Maximum capacity in units at plant j
Lj = Minimum level of production at plant j
Di = Demand for product i in units

We need to add a constraint that ensures that if we DO use plant j, that


the volume is between the minimum allowable level, Lj, and the maximum
capacity, Cj. This is sometimes called an Either-Or condition.
MIT Center for
Transportation & Logistics

28

Either Or Condition
Looking at the Nigeria Plant . . .

yN

Feasible
Values

How do yN, xGN and xKN interact?


0

IF . . .

THEN

xGN+xKN

yN = 0 yN = 1

= 0

YES

NO

>0 and < LN

NO

NO

LN and CN

NO

YES

ij

My j

ij

Lj y j

x
x
i
i

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
M = a big number (such as Cj in this case)
MIT Center for level of production at plant j
Lj = Minimum
Transportation & Logistics

LN
600

CN
750

xGN + xKN

IF
xGN+xKN

THEN yN
750yN

THEN yN
600yN

0 or 1

200

600

0 or 1

If the X values >0, then they must be


L, the lower limit, and C, the
maximum capacity!
29

Formulating GoNuts 3

Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N + 1500yE + 2000yT + 3000yN
subject to

xG,E + xK,E 425


xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0

xG,E + xK,E - 100yE 0


xG,T + xK,T - 250yT 0
xG,N + xK,N - 600yN 0
xG,E, xK,E, xG,T, xK,T ,
Products Di
xG,N, xK,N 0
i=1
550
yE, yT, yN = {0, 1}
i=2
450
cij
j=1
j=2
j=3

Plants
i=1
i=2
j=1
21.00 22.50
j=2
22.50 24.50
MIT Center for
j=3
& Logistics
23.00 Transportation
25.50

Min

z = cij xij + f j y j
i

s.t.

x
x
x
x
i

ij

Cj

ij

Di

ij

My j 0

ij

Lj y j 0

xij 0

ij

y j = {0,1}

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j
Cj = Maximum capacity in units at plant j
Lj = Minimum level of production at plant j
Cj
Lj
fj
Di = Demand for product i in units
425 100 1500 M = a big number (such as C in this case)
j
400 250 2000
750 600 3000

30

Solution: GoNuts Models 1, 2, & 3


Model 1 only variable costs
z*= 22,637.50
Ethiopia
Tanzania
Nigeria

Ginko
0
375
175

Model 2 with fixed plant costs


z*= 27,350.00

Kola
425
25
0

Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

Kola
425
0
25

Model 3 with fixed plant costs


and minimum production levels
z*= 27,425.00
Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

MIT Center for


Transportation & Logistics

Kola
400
0
50
31

GoNuts Juice Company: Model 4


Adding Select From Conditions

MIT Center for


Transportation & Logistics

32

GoNuts Juice Company: Model 4

GoNuts manufactures different juices made entirely of various exotic nuts. Their
primary market is China and they operate three plants located in Ethiopia,
Tanzania, and Nigeria. You have been asked to help them determine where to
manufacture the two newest juices they offer, Gingko Nut and Kola Nut. Each
plant has a different variable cost structure and a maximum capacity. GoNuts
can only operate 2 plants at a maximum. Also, each juice has an expected
demand.
Cost/Unit
Ethiopia
Tanzania
Nigeria

Ginko
21.00
22.50
23.00

Kola
22.50
24.50
25.50

Capacity
Max
(units/Month) Capacity
Ethiopia
425
Tanzania
400
Nigeria
750

Demand Units/Month
Ginko
550
Kola
450

How much of each juice should be made at each plant in order to minimize total
cost while meeting demand and adhering to plant capacity?
MIT Center for
Transportation & Logistics

Image CC0 Public Domain from https://pixabay.com

33

Formulating GoNuts 4

No Change!

Step 1. Determine Decision Variables


xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 otherwise

Step 2. Formulate Objective Function Slight Change!


Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N

Min
where:

z =

cij xij

xij = Number of units of product i made in plant j


yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j

MIT Center for


Transportation & Logistics

34

Formulating GoNuts 4

Max
Plants

Linking Demand Capacity

Step 3. Formulate Constraints


xG,E + xK,E 425
xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0
yE + yT + yN 2

x C
x D
x My
y N
i

ij

ij

ij

0 j

where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
M = a big number (such as Cj in this case)
Cj = Maximum capacity in units at plant j
N = Number of plants allowed to be opened
Di = Demand for product i in units

We need to add a constraint that ensures that only N plants are used! We will use the
Binary Variables, yj, the Linking Constraints, and a new constraint that says the sum of the
MIT Center for
Binary Variables
must not exceed N. This is sometimes called an Select-From condition.
Transportation & Logistics

35

Formulating GoNuts 4

Min z = 21xG,E + 22.5xK,E + 22.5xG,T + 24.5xK,T + 23xG,N + 25.5xK,N


subject to

xG,E + xK,E 425


xG,T + xK,T 400
xG,N + xK,N 750
xG,E + xG,T + xG,N 550
xK,E + xK,T + xK,N 450
xG,E + xK,E - 425yE 0
xG,T + xK,T - 400yT 0
xG,N + xK,N - 750yN 0
yE + yT + yN 2
xG,E, xK,E, xG,T, xK,T , xG,N, xK,N 0
yE, yT, yN = {0, 1}
Products Di
i=1
550
i=2
450
cij
j=1
j=2
j=3

N = 2

Plants
i=1
i=2
j=1
21.00 22.50
j=2
22.50 24.50
MIT Center for
j=3
& Logistics
23.00 Transportation
25.50

Cj
425
400
750

Min

z = cij xij
i

s.t.

x C
x D
x My
y N
i

ij

ij

ij

xij 0

ij

y = {0,1}

j
where:
xij = Number of units of product i made in plant j
yj = 1 if plant j is opened; = 0 o.w.
cij = Cost per unit of product i made at plant j
Cj = Maximum capacity in units at plant j
Di = Demand for product i in units
M = a big number (such as Cj in this case)
N = Number of plants allowed to be opened
36

Solution: GoNuts All Models


Model 1 only variable costs
z*= 22,637.50
Ethiopia
Tanzania
Nigeria

Ginko
0
375
175

z*= 27,350.00
Kola
425
25
0

Model 3 with fixed plant costs


and minimum production levels
z*= 27,425.00
Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

MIT Center for


Transportation & Logistics

Model 2 with fixed plant costs

Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

Kola
425
0
25

Model 4 only variable costs but


with maximum number of plants allowed
z*= 22,850.50

Kola
400
0
50

Ethiopia
Tanzania
Nigeria

Ginko
0
0
550

Kola
425
0
25
37

Key Points from Lesson

MIT Center for


Transportation & Logistics

38

Key Points from Lesson (1/2)


IPs and MILPs are different from LPs
n
n

Much harder to solve since solution space expands!


Formulations
w LPs a correct formulation is generally a good formulation
w For IPs a correct formulation is necessary but not sufficient to

guarantee solvability

IPs require solving multiple LPs to establish bounds


relaxing the Integer constraints
Cant just round the LP solution might not be feasible

When using integer (not binary) variables, solve the


LP first to see if it is sufficient.
MIT Center for
Transportation & Logistics

39

Key Points from Lesson (2/2)


Binary variables are very powerful and can be used for
modeling logical conditions
n

If Then links continuous to binary variables

x
i

My j 0 j

Either Or ensures a minimum level if used at all

x
i

ij

ij

My j 0 j

x
i

ij

L j y j 0 j

Select From picks the best X of Y choices (min or max)

x
i

MIT Center for


Transportation & Logistics

ij

My j 0 j

yj N
40

Questions, Comments, Suggestions?


Use the Discussion Forum!

Athena before and after completing the MITx MicroMasters Credential.


(photos courtesy of Lana Scott)

MIT Center for


Transportation & Logistics

MIT Center for


Transportation & Logistics

caplice@mit.edu

ctl.mit.edu

You might also like