Solutions To ILP Formulation Exercises

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Additional Exercises on LP/ ILP/ MILP

Formulation and Dual LP


Exercise 1: Production Planning
• XYZ Semiconductors manufactures two types of
Integrated Chips (ICs), IC101 and IC222, for sale under
contract to CCC Cars.
• CCC cars has just placed monthly orders for 4 months
from January 2023 to June 2023.
• Production costs are currently Rs. 1000 per IC101 chip
and Rs. 600 per IC222 chip.
• A planned wage increase with effect from the beginning
of the next financial year, that is from April 1, 2023,
will raise each of these production costs by 10%.
• The holding costs of IC101 and IC222 chips are Rs. 18
per month and Rs. 13 per month respectively.
• Monthly ending inventories are used as the average
inventory levels of the respective months.
• XYZ has made minor changes to their design
specifications, to be incorporated from 1 January 2023,
implying no inventory to begin with.
• At the end of June 2023, XYZ wants to have ending
inventories of 450 IC101 chips and 300 IC222 chips.
• The two ICs occupy the same storage space, and at
most 3,300 ICs can be stored at the same time.
• XYZ has a base employment level of 2,240 labour hours
per month and, by contract, this level of labour must be
used each month.
• In busy periods, however, the company has the option
of bringing on board two skilled former employees, each
of whom can provide up to 160 labour hours per month.
They must be paid per hour.
• Each IC101 chip requires 1.3 labour hours, and each
IC222 chip requires 0.9 labour hours.

Suppose the expected monthly demands are given,


formulate as an LP/ ILP/ MILP.
Solution to Exercise 1
• Constants to be assumed:

Let Dij be the monthly order placed by


CCC for chip type i = 101 and 222, and
month j = 1, 2, 3, 4.

Let w be the wage per hour to be paid to


the skilled former employees (if they are
brought on board).
Decision Variables

Let xij be the number of chips of type I


to be manufactured in month j.

Let yij be the ending inventories of chip i


at the end of month j. (These can be
computed using xij but having separate
variables makes the formulation simpler).
Objective

Min z = 1000x11 + 1000x12 + 1100x13 + 1100x14


+ 600x21 + 600x22 + 660x23 + 660x24
+ w(h1 + h2) + 1.1w(h3+h4)
+ 18 (y11 + y12 + y13 + y14)
+ 13 (y21 + y22 + y23 + y24)
Subject to the constraints
• y14 = 450
y24 = 300
• y11 = 0 + x11 – D11
y12 = y11 + x12 – D12

y21 = 0 + x21 – D21

• y11 + y21 <= 3300

• 2240 + h1 >= 1.3x11 + 0.9x21 >= 2240, h1 <= 320

• Non-negativity
Exercise 2: Transportation Problem
XYZ Soaps operates two factories from which it
distributes soaps to different depots. XYZ has four
depots in the region. The minimum demand for soaps
at these four depots is:

Depot Minimum Demand (in


tonnes)
Delhi 2850
Jhansi 3040
Jabalpur 308
Ghaziabad 3033

M. Raghavachari, "Mathematics for


Management: An Introduction”
Total available supplies at the two factories are as follows:

Factory Production Demand


(in tonnes)
Mumbai 35448
Kolkata 6860
Estimated transportation costs (in Rs.)/ tonne from the
factories to depots are given below:

Factory Depot Delhi Jhansi Jabalpur Ghaziabad


->
Mumbai 95.31 80.39 82.78 90.68
Kolkata 97.11 84.49 82.53 91.68
Formulate as an LP/ ILP/ MILP to help the distribution
manager evolve an optimal scheme for distributing
soaps to different depots.
Exercise 2: Solution Outline
Decision Variables: Let xij be the amount (in tonnes) of soap
transported from factory i to depot j,
i = Mumbai, Kolkata,
j = Delhi, Jhansi, Jabalpur, Ghaziabad.

Objective: Minimize the total transportation cost. That is,


Min 95.31 x11 + 80.39 x12 + … + 91.68 x24

Subject to Supply and Demand constraints. That is:


x11 + x21 >= 2850, and similarly for other depots.
x11 + x12 + x13 + x14 <= 35448, and similarly for the
other factory.
and non-negativity constraints.
Exercise 3: JCG Additional Constraint
• Fuel between 1000 and 1500 pounds (both exclusive)
cannot be uploaded at any location.
Exercise 4
Anita needs to purchase 1000 kilograms of grapes for her business.
Three suppliers A, B and C can supply grapes to her at the rate 200
₹/kg, 220 ₹/kg and 250 ₹/kg. Further, the following information is
available:
a) If any supplier is selected, a contract needs to be signed and a set
up cost will be incurred. For every selected supplier, a fixed cost
of ₹ 10,000 will be incurred by Anita.
b) No supplier should supply more than 500 kg (so that over-
dependence on a supplier is avoided).
c) If supplier C is selected, the minimum order quantity from C
should be 300 kg.
d) Supplier A views B and C as competitors, and has put the
condition “If the purchase from B and C together exceeds ₹
125000, we will not sell more than 200 kgs.”).
Anita needs to decide how much to order from each supplier
and has asked for your help. Formulate this problem as a mixed
integer linear program.
Solution to Exercise 4
• Decision Variables:

Let x1, x2 and x3 be the amounts (in kg) of grapes


to be procured from A, B and C, respectively.

Let y1, y2 and y3 be binary variables, defined as follows.


yi = 1 if xi > 0 (that is supplier i is selected)
(i = 1, 2, 3)
The LP will take care of the other direction
(that is, yi = 0 if xi = 0).

Let u and v be binary DVs for constraint (d). That is,


u = 0 if and only if purchase from B and C <= 125000, and
v = 1 if and only if x1 <= 200.
• Objective Function:
Min z = 200x1 + 220x2 + 250x3 + 10000 (y1 + y2 + y3)

• Subject to the constraints:


x1 + x2 + x3 = 1000 (Total quantity to be purachased)
Constraint (b):
xi <= 500yi , i = 1, 2, 3
Constraint (c):
x3 >= 300y3
Constraint (d):
220x2 + 250x3 <= 125000(1 – u) + Mu,
where M is a large positive constant.
220x2 + 250x3 >= 125000.01u,
assuming 0.01 as the smallest amount (“unit”)
x1 <= 200v + 500(1-v)
v >= u
Non-negativity, integer and binary constraints.
Exercise 5
Consider the following Primal LP:
Maximize: 𝑧 = 7𝑥1 + 3𝑥2 + 𝑥3
Subject to
2𝑥1 + 𝑥2 ≤ 2 (C1)
3𝑥1 + 𝑥3 ≤ 3 (C2)
𝑥1 , 𝑥2 , 𝑥3 ≥ 0

1. Write down the Dual LP formulation of the above Primal LP.


2. What are the shadow prices of constraints (C1) and (C2) of the
Primal LP?
3. What is the optimal value of the objective function, z, and what
are the optimal values of 𝑥1 , 𝑥2 and 𝑥3 , of the Primal LP?
Solution to Exercise 5
1. Let x and y be the dual DVs corresponding to C1 and C2
respectively.

Min z1 = 2x + 3y
s.t.
2x + 3y >= 7 … (i)
x >= 3 … (ii)
y >= 1 … (iii)
x, y >= 0
2. Shadow prices of a primal constraint =
optimal value of the corresponding dual variable

Min value of z1 in the dual is attained when x = 3 and y = 1


((ii) and (iii) are tight and (i) is satisfied). Min value = 9.

Therefore, the shadow price of (C1) = 3, and


the shadow price of (C2) = 1.
3. Optimal value of z (of the Primal) =
optimal value of z1 of the Dual = 9.

Optimal value of Primal variable =


shadow price of corresponding dual constraint.

Shadow price of (i) = 0, as the constraint is slack at optimal.

Increasing RHS of (ii) by 1 increases optimal x by 1 and


hence z1 by 2 (coefficient of x in z1).
Therefore, shadow price of (ii) = 2.

Increasing RHS of (iii) by 1 increases optimal y by 1 and


hence z1 by 3 (coefficient of y in z1).
Therefore, shadow price of (iii) = 3.

Optimal value of x1 = shadow price of (i) = 0.


Optimal value of x2 = shadow price of (ii) = 2.
Optimal value of x3 = shadow price of (iii) = 3.
All the Best

You might also like