MSCI222-IP1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

MSCI222 Optimisation

Integer Programming (1)


Introduction and Modelling

Burak Boyacı
Department of Management Science
History of Integer Programming
• G.B. Dantzig introduced the simplex
method for linear programming in 1947.
• It rapidly became popular and Dantzig
wrote a book in 1956 about it.1
• Non-linear programming emerged shortly
after with a major landmark paper
published in 1952 by Harry Markowitz on
portfolio selection.2
• A few years later people began to realise
that it often makes sense for decision
variables to take integer (whole number)
values.3
1 Linear inequalities and related systems. George Dantzig et. al. Edited by H.W. Kuhn and A.W. Tucker. Princeton University Press.
2 Markowitz, H. (1952), PORTFOLIO SELECTION*. The Journal of Finance, 7: 77-91. https://doi.org/10.1111/j.1540-6261.1952.tb01525.x.
3 Dantzig, George B. “On the Significance of Solving Linear Programming Problems with Some Integer Variables.” Econometrica, vol. 28, no. 1,
[Wiley, Econometric Society], 1960, pp. 30–44, https://doi.org/10.2307/1905292.
MSCI222 - IP (1) - Introduction and
Slide 2
Modelling
Integer-Constrained Variables
• In some cases, it is obvious that certain decision variables should be
integer-constrained:
– Number of items produced
– Number of components used
– Number of trucks, planes, machines, workers, etc. bought, used, assigned or
hired.
• However, there are many situations that binary (0-1) variables would
be useful.
• Terminology:
– An Integer Linear Program (ILP) is like an LP with all variables required to be
integers.
– A Zero-One Linear Program (0-1LP) or a Binary Integer Program (BIP) is like
an LP with all variables required to be binary.
– A Mixed Integer Linear Program (MILP) is like an LP with mixture of integer
(including binary) and continuous variables.
MSCI222 - IP (1) - Introduction and
Slide 3
Modelling
Modelling with Binary Variables
• Binary variables are restricted to take either 0 or 1.
• They can be used to model “logical conditions”:
– 1 means something is true
– 0 means something is false
• We seen binary variables in assignment problem:
– : 1 if machine is assigned to job ; 0 otherwise
• But they can be used much more widely that
allows to model complex problems with linear
programming models.

MSCI222 - IP (1) - Introduction and


Slide 4
Modelling
(1) Selection Constraints
Given a set let us assume is a binary variable and is equal to 1 if element is
selected and 0 otherwise.
• means select at least 1 element of (e.g. at least one factory should be assigned
to each warehouse)

• means select at most 1 element of (e.g. choose at most one very high risk
investment in your portfolio)

• means select exactly 1 element of (e.g. every accountant should be assigned to


one and only one offices.

• We can make the RHS of these constraints for any constant k too.
– (at least elements)
– (at most elements)
– (exactly elements)

• RHS of the constraints could even be another decision variable!


MSCI222 - IP (1) - Introduction and
Slide 5
Modelling
Example 1: Project Selection
• A firm has a budget of £40m and 7 staff
• The expected profits, costs and staff requirements of six potential projects
are as follows:
Project-> 1 2 3 4 5 6
Profit 16 32 24 40 12 2
Cost 8 16 16 32 8 4
Staff 1 4 2 3 1 1
• Which projects should be supported in order to maximise the profit while maintaining the
staff and budget constraints?
For i = 1 to 6, 1 if project is selected; 0 otherwise
𝑚𝑎𝑥 16 𝑥1 +32 𝑥2 +24 𝑥 3 +40 𝑥 4 +12 𝑥5 +2 𝑥6 total profit
subject to
budget limit
available staff
binary variables
MSCI222 - IP (1) - Introduction and
Slide 6
Modelling
Example 2: Minimum Cost Covering
• There are four possible sites in a city for Fire District-> A B C D E
Stations which would cost £3, £4, £2.5 and £3.2 Site 1 16 5 8 6 5
million to build. Site 2 10 10 16 8 11
• The city is divided into 5 districts. The law states
Site 3 8 16 2 3 7
that every street must be within 10 minutes of
a fire station. The journey times for each site to Site 4 9 8 4 13 12
the farthest street in each district are:
• Where should fire stations be built to minimise cost while covering the time
requirement of each district
For i = 1 to 4, 1 if fire station is built on site ; 0 otherwise
𝑚𝑖𝑛3 𝑥1 + 4 𝑥 2+2.5 𝑥 3 +3.2 𝑥 4 total cost This is a type of set covering
s.t. 𝑥2 + 𝑥 3 + 𝑥 4 ≥ 1 cover district A problem. There are set covering
𝑥1 + 𝑥2 + 𝑥 4 ≥ 1 cover district B problems with millions of
𝑥1 + 𝑥3 + 𝑥 4 ≥ 1 cover district C variables, e.g. crew assignment
𝑥1 + 𝑥2 + 𝑥 3 ≥ 1 cover district D problems, driver assignment
𝑥1 + 𝑥3 ≥ 1 cover district E problems, ambulance location
𝑥1 , 𝑥 2 , 𝑥 3 , 𝑥 4 ∈{0,1 } binary variables problems.
MSCI222 - IP (1) - Introduction and
Slide 7
Modelling
(2) Implications
Suppose x, y and z are binary variables representing states and the
following logical conditions are needed:
(1) If x happens then y does not happen (x=1, y=0 or x=0, y=1)

(2) y happens only if x happens (y=1 only if x=1)

(3) y happens only if x does not happen (y=1 only


(Theifsame
x=0)as the first case)

(4) Either x and y happens together or none of them happens

(5) z happens only if x and y happens (z=1 only if x=1 and y=1)

(6) z happens only if x or y happens (z=1 only if x=1 or y=1)

(7) z happens only if either x or y happens (not both) (z=1 only if x=1, y=0 or x=0,
y=1) MSCI222 - IP (1) - Introduction and
Slide 8
Modelling
Example 3: Capital Budgeting
Spencer Enterprises must choose among a series of new investment alternatives. Each project is
summarised with their net present value and capital requirements for each year below. If they
cannot partially invest to any options, what should be their investment plan maximising their
total net present value while satisfying the capital requirements.
Alternative Net Present Year 1 Requirement Year 2 Requirement Year 3 Requirement
Value (M$) (M$) (M$) (M$)
1 4 3 1 4
2 6 2.5 3.5 3.5
3 10.5 6 4 5
4 4 2 1.5 1.8
5 8 5 1 4
6 3 1 0.5 0.9
Funds Available ($) 10.5 7 8.75

How can the following restrictions can be modelled?


a) Two of the projects 1, 3, 5 and 6 must be undertaken.
b) If projects 3 and 5 must be undertaken, they must be taken simultaneously.
c) Project 1 or 4 must be taken but not both.
d) Project 4 cannot be undertaken unless projects 1 and 3 are also undertaken.
e) Project 4 must be undertaken when projects 1 and 3 are undertaken.
An Introduction to Management Science: Quantitative Approaches to Decision Making 14e, page 350-351 Exercise 7 and 8

MSCI222 - IP (1) - Introduction and


Slide 9
Modelling
(3) Disjunctive Constraints
• Let is a continuous variable and and be two constraints with non-
negative coefficients.
• If we want to satisfy at least one of these constraints (either or or
both):

• If we want to expand this to ’s as for and want to satisfy at least of


them then:
for all

– could be here even be another decision variable.

MSCI222 - IP (1) - Introduction and


Slide 10
Modelling
(4) Fixed Costs
• In the manufacturing industry, there are often fixed costs
associated with things like setting up machines
• Suppose,
– represents the amount of a product produced by some
machine ,
– there is a fixed charge of incurred if machine is used,
– and we want to add to the cost function if , but not if .
• We can achieve this by defining a binary variable, say .
– is 1 if machine produce products; 0 otherwise.
– We add to the cost function
– Then we add the constraint for all
Where is a very big number such as the upper bound on the
amount of product produced.
MSCI222 - IP (1) - Introduction and
Slide 11
Modelling
Example 4: Production Planning
Hart Manufacturing makes three products. Each product requires manufacturing operations
in three departments. The company makes different profit values per product produced. In
addition there is an associated fixed cost of setting up the line. All this information including
the labour requirements and the available number of hours next week are as follows:
Department Product 1 Product 2 Product 3 Available
A 1.50h 3.00h 2.00h 450h
B 2.00h 1.00h 2.50h 350h
C 0.25h 0.25h 0.25h 50h
Profit ($/unit) 25 28 30
Setup Cost ($) 400 500 600

Management also stated that we should not consider making more than 175 units of
product 1, 150 units of product 2 and 140 units of product 3. Write a mathematical
model that maximises the total net profit of the company while satisfying all the
production and sales constraints. If the company wants to produce at most two of
these products, how can this restriction be added to the mathematical model?
An Introduction to Management Science: Quantitative Approaches to Decision Making 14e, page 352 Exercise 11

MSCI222 - IP (1) - Introduction and


Slide 12
Modelling
(5) Restricted Set of Values and Threshold
Levels
• Restricted Set of Values: If variable can take only values from a set
such as (e.g. capacity of airplanes) then we can write it as:

for all

• Threshold Levels: If x can take value of 0 or something between m and


M (this time M is a parameter given to you) (e.g. when a machine is
used, it has to produce a minimum number of products), i.e. , then you
can write constraints as:

– If there is a fixed cost and a variable cost (proportional to value of ) , then can
be addedMSCI222
regarded as the total cost.
- IP (1) - Introduction and
Slide 13
Modelling
(6) Cardinality Constraints
• Suppose are all non-negative continuous variables, and we want no more
than of them to take positive values.
• This kind of constraints are called cardinality constraints.
• Cardinality constraints arise frequently in finance (e.g. portfolio
optimisation) and statistics (e.g. best-subset regression).

• Let’s assume we have binary variables, that we want at most of them to


be 1 and rest of them zero. We can write this constraint as:

• Now let’s expand this to our example. If we have continuous variables, ,


and we want at most k of them to be positive. We can do these by these
two sets of constraints:
for all (as we did in the fixed costs)
(as we have just done)
MSCI222 - IP (1) - Introduction and
Slide 14
Modelling
Example 5: Investment Planning
Fund Type Expected Annual
Dave has $100K to invest in 10 mutual fund Return (%)
alternatives. He cannot invest more than 1 Growth 6.70
$25K in any of one fund. If a fund is chosen 2 Growth 7.65
for investment, then at least $10K will be 3 Growth 7.55
invested in it. No more than two of the 4 Growth 7.45
funds can be pure growth funds and at 5 Growth & Income 7.50
least one pure bond fund must be selected. 6 Growth & Income 6.45
The total amount invested in pure bond 7 Growth & Income 7.05
funds must be at least as much as the 8 Stock & Bond 6.90
amount invested in pure growth funds. If 9 Bond 5.20
each of the fund has the following returns, 10 Bond 5.90
what should be the mathematical model
that maximises average expected annual
return while satisfying all restrictions?

An Introduction to Management Science: Quantitative Approaches to Decision Making 14e, page 359-360, Exercise 24

MSCI222 - IP (1) - Introduction and


Slide 15
Modelling

You might also like