Sei sulla pagina 1di 53

Introduction to Quantitative

Decision Making
Sessions 7 and 8
• Integer Linear Program (ILP)

• Mixed Integer Linear Program (MILP)

• Ref: OR Notes, J. E. Beasley


http://people.brunel.ac.uk/~mastjjb/jeb/or/co
ntents.html
Example 1
You are in the process of packing items in your check-in bag for an
international flight. You have some priority (value) of items and want
to maximize the value of items you pack such that the total weight is
within the permissible limit of 32 kgs.

Item Value (points) Weight (kgs)

1 15 12

2 20 6

3 18 15

4 13 7

5 12 7
• This is the classic knapsack problem

• Decision Variables:
xi = 1 if item i is put in knapsack
= 0 if not chosen

• Objective Function and Constraints


• Additional Constraints

– 3 if and only if 4

– If 1, then 2

– If multiple units of each item

– If 1, then at least one unit of 2


Example 2: Capital Investment Problem

➢ A project manager in a company is considering a portfolio of 10


large project investments. These investments differ in the
estimated long-run profit (net present value) they will generate as
well as in the amount of capital required.

➢ Let Pj and Cj denote the estimated profit and capital required


(both given in units of millions of £) for investment opportunity j
(j=1,...,10) respectively. The total amount of capital available for
these investments is Q (in units of millions of £)

6
➢ Investment opportunities 3 and 4 are mutually exclusive and so
are 5 and 6. Furthermore, neither 5 nor 6 can be undertaken
unless either 3 or 4 is undertaken.

➢ At least two and at most four investment opportunities have to be


undertaken from the set {1,2,7,8,9,10}.

➢ The project manager wishes to select the combination of capital


investments that will maximise the total estimated long-run profit
subject to the restrictions described above.

7
Example 3: Production Planning
➢ A toy manufacturer is planning to produce new toys. The setup
cost of the production facilities and the unit profit for each toy are
given below. :

Toy Setup cost (£) Profit (£)

1 45000 12

2 76000 16

The company has two factories that are capable of producing these
toys. In order to avoid doubling the setup cost only one factory could
be used.

8
➢ The production rates of each toy are given below (in units/hour):

Toy 1 Toy 2
Factory 1 52 38
Factory 2 42 23

Factories 1 and 2, respectively, have 480 and 720 hours of


production time available for the production of these toys. The
manufacturer wants to know which of the new toys to produce,
where and how many of each (if any) should be produced so as to
maximise the total profit.

9
Example 4: Staffing Problem
The Clark County Sheriff’s department schedules police officers for 8-hour
shifts. The beginning times for the shifts are 8:00AM, noon, 4:00PM, 8:00PM,
midnight and 4AM. An officer beginning a shift at of these times works for the
next 8 hours. During normal and weekday operations, the number of officers
needed varies depending on the time of the day. The department staffing
guidelines require the following minimum number of officers on duty.
Time of Day Minimum officers on Duty
8:00AM – Noon 5
Noon – 4:00PM 6
4:00PM – 8:00PM 10
8:00PM – Midnight 7
Midnight – 4:00AM 4
4:00AM – 8:00AM 6
The Department wants to minimize the total number of officers needed to meet
all shift requirements.
Formulate as an LP to determine the number of officers that should be scheduled
to begin the each of the 8-hour shifts, so as to minimize the total number of
officers required.

Source - Management Science/Operations Research: A Strategic Approach by David Bell


Decision Variables
x1= # of officers that begin work at 8AM & work shifts (8AM - Noon) & (Noon to
4PM)
x2= # of officers that begin work at Noon & work shifts (Noon - 4PM) & (4PM -
8PM)
x3= # of officers that begin work at 4PM & work shifts (4PM – 8PM) & (8PM to
Midnight)
x4= # of officers that begin work at 8PM & work shifts (8PM - Midnight) &
(Midnight – 4AM)
x5= # of officers that begin work at Midnight & work shifts (Midnight – 4AM) &
(4AM to 8AM)
x6= # of officers that begin work at 4AM & work shifts (4AM – 8AM) & (8AM -
Noon)
Objective Function

Minimize the total number of officers needed to meet all shift


requirements.

That is:
min x1 + x2 + x3 + x4 + x5 + x6
Constraints
Each shift must have at least the minimum number of
officers
• x6+x1 ≥ 5
• x1+x2 ≥ 6
• x2+x3 ≥ 10
• x3+x4 ≥ 7
• x4+x5 ≥ 4
• x5+x6 ≥ 6

Non-negativity constraints
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0, x6 ≥ 0
Integer constraints
min x1 + x2 + x3 + x4 + x5 + x6
s.t.
x6+x1 ≥ 5
x1+x2 ≥ 6
x2+x3 ≥ 10
x3+x4 ≥ 7
x4+x5 ≥ 4
x5+x6 ≥ 6
x1, x2, x3, x4, x5, x6 ≥ 0 , int
Example 5: Product Mix Problem
➢ A company is attempting to decide the mix of products which it should
produce next week. It has seven products, each with a profit (£) per
unit and a production time (person-hours) per unit as shown below:

Product Profit (£ per unit) Production time (person-hours per unit)

1 10 1.0

2 22 2.0

3 35 3.7

4 19 2.4

5 55 4.5

6 10 0.7

7 115 9.5

15
➢ The company has 720 person-hours available next week.

➢ Formulate the problem of how many units (if any) of each product
to produce next week as an integer linear program.

16
Additional Constraints:

❖ If any of product 7 are produced an additional fixed cost of £2000


is incurred.

❖ Each unit of product 2 that is produced over 100 units requires a


production time of 3.0 person-hours instead of 2.0 person-hours
(e.g. producing 101 units of product 2 requires 100(2.0) + 1(3.0)
person-hours).

❖ Units of product 2 above 100 require 1 hour each.

❖ If both product 3 and product 4 are produced 75 person-hours are


needed for production line set-up and hence the (effective)
number of person-hours available falls to 720 - 75 = 645.
17
Example 6: Food Mix Problem

➢ A food is manufactured by refining raw oils and blending them


together. The raw oils come in two categories:

Vegetable oil: VEG1 VEG2

Non-vegetable oil: OIL1 OIL2 OIL3

The prices for buying each oil are given below (in £/tonne)

VEG1 VEG2 OIL1 OIL2 OIL3

115 128 132 109 114

18
➢ The final product sells at £180 per tonne. Vegetable oils and non-
vegetable oils require different production lines for refining. It is not
possible to refine more than 210 tonnes of vegetable oils and more than
260 tonnes of non-vegetable oils. There is no loss of weight in the refining
process and the cost of refining may be ignored.

➢ There is a technical restriction relating to the hardness of the final


product. In the units in which hardness is measured this must lie between
3.5 and 6.2. It is assumed that hardness blends linearly and that the
hardness of the raw oils is:

VEG1 VEG2 OIL1 OIL2 OIL3

8.8 6.2 1.9 4.3 5.1

➢ It is required to determine what to buy and how to blend the raw oils so
that the company maximises its profit.

19
➢ Additional Constraints:

❖ the food may never be made up of more than 3 raw oils

❖ if an oil (vegetable or non-vegetable) is used, at least 30 tonnes


of that oil must be used

❖ if either of VEG1 or VEG2 are used then OIL2 must also be used

20
Example 7: Production Planning Problem
➢ In the planning of the monthly production for the next six months
a company must, in each month, operate either a normal shift or
an extended shift (if it produces at all). A normal shift costs
£100,000 per month and can produce up to 5,000 units per
month. An extended shift costs £180,000 per month and can
produce up to 7,500 units per month. Note here that, for either
type of shift, the cost incurred is fixed by a union guarantee
agreement and so is independent of the amount produced.

➢ It is estimated that changing from a normal shift in one month to


an extended shift in the next month costs an extra £15,000. No
extra cost is incurred in changing from an extended shift in one
month to a normal shift in the next month.

21
➢ The cost of holding stock is estimated to be £2 per unit per month
(based on the stock held at the end of each month) and the initial
stock is 3,000 units (produced by a normal shift). The amount in
stock at the end of month 6 should be at least 2,000 units. The
demand for the company's product in each of the next six months
is estimated to be as shown below:

Month 1 2 3 4 5 6

Demand 6,000 6,500 7,500 7,000 6,000 6,000

➢ Production constraints are such that if the company produces


anything in a particular month it must produce at least 2,000
units.

➢ The company wants a production plan for the next six months that
avoids stockouts, formulate their problem as an integer program.22
Example 8: Capital Budgeting Problem
There are four possible projects, which each run for 3 years and have
the following characteristics.

Capital requirements

Project Return Year 1 2 3

1 0.2 0.5 0.3 0.2

2 0.3 1.0 0.8 0.2

3 0.5 1.5 1.5 0.3

4 0.1 0.1 0.4 0.1

Available capital 3.1 2.5 0.4

Which projects would you choose in order to maximise the total


return?

Ref: J. E. Beasley, O.R. Notes


Additional constraint: Either project 1 or project 2 needs to be
chosen.
Example 9: Blending Problem
A manufacturer of animal feed produces feed mix for dairy cattle.
The feed mix contains two active ingredients and a filler to provide
bulk. One kg of feed mix must contain a minimum quantity of each
of four nutrients as below:
Nutrient A B C D
gram 90 50 20 2
The ingredients have the following nutrient values and cost
A B C D Cost/kg
Ingredient 1 (gram/kg) 100 80 40 10 40
Ingredient 2 (gram/kg) 200 150 20 - 60
➢ What should be the amounts of active ingredients and filler in one
kg of feed mix?
➢ if we use any of ingredient 2 we incur a fixed cost of 15

➢ we need not satisfy all four nutrient constraints but need only
satisfy three of them
Example 10: Yet Another Staffing
Problem

Daily requirements in the HR department of a company are as follows:

Day Mon Tue Wed Thu Fri Sat Sun

Requirement 5 3 2 4 5 2 2

A person works for 5 consecutive days and takes 2 days off. Assuming
that a cyclical schedule is to be made find the minimum number of people
that will meet the daily requirements.
Decision Variables
• xi= Number of people who begin work on i th
day
Formulation
Min Z= x1 + x2 + x3 + x4 + x5 + x6 + x7

Subjected to
x1 + x4 + x5 + x6 + x7 >=5
x1 + x2 + x5 + x6 + x7 >=3
x1 + x2 + x3 + x6 + x7 >=2
x1 + x2 + x3 + x4 + x7 >=4
x1 + x2 + x3 + x4 + x5 >=5
x2 + x3 + x4 + x5 + x6 >=2
x3 + x4 + x5 + x6 + x7 >=2
x1 , x2 , x3 ,x4 ,x5 , x6 ,x7 >= 0
Optimal Solution
x1 = 3
x4 = 2
x2 ,x3 , x5 , x6 , x7 =0
Example 11
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
How should the distribution manager evolve an
optimal scheme for distributing soaps to
different depots?
• Additional constraint:
Each soap is of weight 125g and 200 such soaps
are packed in a carton. Only such (full) cartons
are shipped.
Example 12: Another Production
Planning Problem
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 February 2016 to May 2016.

• 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, 2016, 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 February
2016, implying no inventory to begin with.

• At the end of May 2016, 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.

• Each IC101 chip requires 1.3 labour hours, and each


IC222 chip requires 0.9 labour hours.

Formulate as an LP/ ILP/ MILP.


Example 13: Mini-Sudoku
JCG Global Air Services

• MILP (Mixed Integer Linear Program)


Formulation
Decision Variables
• Let x1 be the amount of fuel (in pounds)
purchased at KMLI before the start of trip.

• Let x2, x3, x4 be the amounts of fuel purchased at


KBOS, KTEB, KDAL respectively.

• Let x5 be the amount of fuel purchased at KMLI


to bring up the fuel in the tank to 7000 pounds.

(Remember to convert gallons to pounds


everywhere)
• Introduce the following binary variables.

• Let y2 = 1 if ramp fee is paid at KBOS, 0


otherwise (if ramp fee is waived, that is, if x2
>= 500*6.7 pounds. Refer exhibit 1).

• Similarly, let y3 = 1 and y4 = 1 if ramp fees are


paid at KTEB and KDAL respectively, 0
(respectively) otherwise.
Objective function

Min (3.97/6.7)x1 + (8.35/6.7)x2 + (7.47/6.7)x3


+ (6.01/6.7)x4 + (3.97/6.7)x5
+ 800y2 + 450y3 + 400y4
Constraints
• Fuel-tank capacity
• Ramp weight
• Landing weight
• Fuel >= 2400 on landing
• Fuel on landing back at KMLI + x5 >= 7000
• To begin with, we have 7000 pounds of fuel
Fuel tank capacity constraints:
At each airport:
Fuel on arrival + Fuel upload <= 13000 (Ref. exhibit 2)

• At KMLI:
7000 + x1 <= 13000
• At KBOS:
7000 + x1 – 4800 + x2 <= 13000
• At KTEB:
7000 + x1 – 4800 + x2 – 2000 + x3 <= 13000
• At KDAL:
7000 + x1 – 4800 + x2 – 2000 + x3 – 5300 + x4 <= 13000
• Upon return to KMLI: (This constraint is redundant. Why?):
7000 + x1 – 4800 + x2 – 2000 + x3 – 5300 + x4 – 3100 + x5 <= 13000
Constraint on min. fuel on landing
• 7000 + x1 – 4800 >= 2400
• 7000 + x1 – 4800 + x2 – 2000 >= 2400
• 7000 + x1 – 4800 + x2 – 2000 + x3 – 5300 >= 2400
• 7000 + x1 – 4800 + x2 – 2000 + x3 – 5300 + x4 – 3100 >= 2400

Constraint on min. fuel after arrival at KMLI


• 7000 + x1 – 4800 + x2 – 2000 + x3 – 5300 + x4 – 3100 + x5 >= 7000
Maximum Ramp Weight
From each airport:
BOW + Fuel on arrival + Fuel upload + Weight of passengers<= 36400
• From KMLI:
22200 + 7000 + x1 + 2*200 <= 36400
• Etc. (Note: Number of passengers is 2 from KMLI to KBOS, 4 from
KBOS to KTEB, 8 subsequently).

Maximum Landing Weight


Upon landing at each airport:
Ramp weight at previous airport – fuel burn <= 31800
• At KBOS:
22200 + 7000 + x1 + 2*200 – 4800 <= 31800
• Etc.
• How do we relate y2 and x2? y3 and x3, y4
and x4?
Additional Constraints

• If fuel is uploaded at a location, at least 100


pounds are uploaded

• Fuel is never uploaded at consecutive


locations
• If the amount of fuel uploaded is at least 1000
pounds more than the minimum fuel required
to waive the ramp fee at that location, a 10%
discount is offered on the fuel price at that
location
• Fuel between 1000 and 1500 pounds (both
inclusive) cannot be uploaded at any location
Questions?
Thank You

Potrebbero piacerti anche