Professional Documents
Culture Documents
1
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
Contact Session 5
Application of Linear Programming
2
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
Financial Planning
Distribution and Network Models
3
Financial Planning: Example
Year 1 2 3 4 5 6 7 8
$ Required 430 210 222 231 240 195 225 255
The cash requirements (in thousands of dollars) are due at the
beginning of each year.
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: The Data
The corporate treasurer must determine how much money must be set aside today
to meet the eight yearly financial obligations as they come due. The financing plan
for the retirement program includes investments in T-Bonds as well as savings. The
investments in T-Bonds are limited to three choices:
Bond Price $ Rate (%) Years to Maturity
1 1150 8.875 5
2 1000 5.500 6
3 1350 11.750 7
The T-Bonds have a par value of $1000, which means that even with different
prices each bond pays $1000 at maturity. The rates shown are based on the par
value. For purposes of planning, the treasurer assumed that any funds not invested
in bonds will be placed in savings and earn interest at an annual rate of 4%.
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: Decision
Variables
F = total dollars required to meet the retirement plan’s eight-year
obligation
B1 = units of bond 1 purchased at the beginning of year 1
B2 = units of bond 2 purchased at the beginning of year 1
B3 = units of bond 3 purchased at the beginning of year 1
Si = amount placed in savings at the beginning of year i for i = 1, . . . , 8
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: Objective
Function
F = total dollars required to meet the retirement plan’s eight-year
obligation
B1 = units of bond 1 purchased at the beginning of year 1
B2 = units of bond 2 purchased at the beginning of year 1
B3 = units of bond 3 purchased at the beginning of year 1
Si = amount placed in savings at the beginning of year i for i = 1, . . . , 8
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: The
Constraints
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: The
Constraints
Year 1: F – 1.15B1 – 1B2 – 1.35B3 – S1 = 430
Year 2: 0.08875B1 + 0.055B2 + 0.1175B3 + 1.04S1 - S2 = 210
Year 3: 0.08875B1 + 0.055B2 + 0.1175B3 + 1.04S2 – S3 = 222
Year 4: 0.08875B1 + 0.055B2 + 0.1175B3 + 1.04S3 – S4 = 231
Year 5: 0.08875B1 + 0.055B2 + 0.1175B3 + 1.04S4 – S5 = 240
Year 6: 1.08875B1 + 0.055B2 + 0.1175B3 + 1.04S5 – S6 = 195
Year 7: 1.055B2 + 0.1175B3 + 1.04S6 – S7 = 225
Year 8: 1.1175B3 + 1.04S7 – S8 = 255
Non-negativity
Decision VariablesConstraints: All decision variables >= 0
F, B1, B2, B3, Si Bond Price Rate YTM
1 $1150 8.875 5
The cash requirements 2 $1000 5.500 6
Year 1 2 3 4 5 6 7 8 3 $1350 11.750 7
$ Required 430 210 222 231 240 195 225 255 Cash 4
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Distribution and Network Models
10
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Introduction
A network model is one which can be represented by a set of
nodes, a set of arcs, and functions (e.g. costs, supplies,
demands, etc.) associated with the arcs and/or nodes.
Transportation, transshipment, assignment, shortest-route, and
maximal flow problems are all examples of network problems.
Each of the problems of this class can be formulated as linear
programs and solved by general purpose linear programming
codes.
However, there are many computer packages that contain
separate computer codes for these problems which take
advantage of their network structure.
Provided all the coefficients in the constraints are integer, the
optimal solution will consist of integer values
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem
c11
c21
c12
1
c13
2 d2
c22
2
c23
s2 3 d3
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Network Representation & LP Formulation
Using the notation:
xij = number of units shipped from origin i to destination j
cij = cost per unit of shipping from origin i to destination j
si = supply or capacity in units at origin I & dj = demand in units at
destination j
d1 m n
s1
c11
1 Min c x
i 1 j 1
ij ij
c12 d2 n
1
c13
x
j 1
ij si i 1, 2, , m Supply
2 m
c21
c22 d3
x
i 1
ij dj j 1, 2, , n Demand
2
c23
xij > 0 for all i and j
s2 3
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Example
The PSU has 9,000 Kg of material in Mumbai that it wishes to ship to
three installations: B1, B2 & B3. They require 4,000, 2,500, and 2,500
Kg, respectively. Government regulations require equal distribution of
shipping among the three carriers.
The shipping costs per Kg for road, railroad, and airplane transit are
shown below. Destination
Mode B1 B2 B3
Road 12 6 5
Rail 20 11 9
Airplane 30 26 28
Formulate and solve a linear program to determine the shipping
arrangements (mode, destination, and quantity) that will minimize the
total shipping cost.
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Decision Variables
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Objective Function
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Constraints
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Solution Summary
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
LP Formulation Special Cases
• Total supply exceeds total demand:
No modification of LP formulation is necessary
• Total demand exceeds total supply:
Add a dummy origin with supply equal to the shortage amount.
Assign a zero shipping cost per unit. The amount “shipped” from
the dummy origin (in the solution) will not actually be shipped.
• Minimum shipping guarantee from i to j: xij > Lij
• Maximum route capacity from i to j: xij < Lij
• Unacceptable route: Remove the corresponding decision variable
• The objective is maximizing profit or revenue: Solve as a
maximization problem.
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem: Network Representation
c36
3
c13
c37
s1 1 c14 6 d1
c15 c46
c47
4
c23
c24 c56
s2 2 7 d2
c25
5 c57
Sources Destinations
Intermediate Nodes
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem
Using the notation:
xij = number of units shipped from node i to node j
cij = cost per unit of shipping from node i to node j
si = supply at origin node i
dj = demand at destination node j
Min
all arcs
cij xij
s.t.
arcs out
xij si Origin nodes i
arcs out
xij x
arcs in
ij 0 Transhipment nodes
arcs in
xij d j Destination nodes j
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem:
LP Formulation Special Cases
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem:
Example
Kumar’s manufactures suits in two different locations: Textile Parks I & II (TP1 &
TP2). The items are stored in their two warehouses (KumarN & KumarS) from
where they are shipped to the retail outlets: Zrox, Hewes, Rocky.
Currently weekly demands at these outlets are 50 for Zrox, 60 for Hewes, and 40
for Rocky. The factories can supply at most 75 units to its customers.
The unit cost to ship to the warehouses are:
KumarN KumarS
TP1 5 8
TP2 7 4
The unit costs to ship to the final destination:
Zrox Hewes Rocky
KumarN 1 5 8
KumarS 3 4 4
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Network Representation:
Example
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Decision Variables & Objective
Function
xij = amount shipped from manufacturer i to warehouse j
xjk = amount shipped from warehouse j to customer k
where
i = 1 (TP1), 2 (TP2) ZROX
j = 3 (KumarN), 4 (KumarS) 75
Zrox
5
k = 5 (Zrox), 6 (Hewes), 7 (Rocky) 5
1
50
TP1
ARNOLD K_N
5
1 3
8
Minimize Overall Shipping Costs: 8
Hewes
HEWES
Min 5x13 + 8x14 6
75 3 60
+ 7x23 + 4x24 7
TP2 K_S 4 40
+ 1x35 + 5x36 + 8x37 2 4
WASH
4
BURN
4
+ 3x45 + 4x46 + 4x47 Rocky
7
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Constraints
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Solution Summary
Objective Function Value = 1150.000
Variable Value
ZROX
X13 75.000 Zrox 50
X14 0.000 50
5 75 1
X23 0.000 75 ARNOLD
TP1 K_N 5
25
X24 75.000 8 8
X35 50.000 Hewes
HEWES 60
35
X36 25.000 7 3 4
X37 0.000 75 TP2 WASH
K_S 40
BURN
X45 0.000 4 75 4
Rocky 40
X46 35.000
X47 40.000
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Assignment Problem & Network
Representation
An assignment problem seeks to
minimize the total cost assignment
of m workers to m jobs, given that c11
the cost of worker i performing job j 1
c12
1
is cij. c13
Agents Tasks
It assumes all workers are assigned c21
c22
and each job is performed. 2 2
c23
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Assignment Problem:
Linear Programming Formulation
Using the notation:
xij = 1 if agent i is assigned to task j
0 otherwise
m n
Min c x ij ij
cij = cost of assigning agent i to task j i 1 j 1
n
x
j 1
ij 1 i 1, 2, , m Agents
m
x
i 1
ij 1 j 1, 2, , n Tasks
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Assignment Problem: Example
An electrical contractor pays his subcontractors a fixed fee plus
mileage for work performed. On a given day the contractor is faced
with three electrical jobs associated with various projects. Given
below are the distances between the subcontractors and the
projects.
Projects
Subcontractor A B C
Westside 50 36 16
Federated 28 30 18
Goliath 35 32 20
Universal 25 25 14
Subcontractors Projects
50
West. A
36
16 Projects
28 Subcontractor A B C
30
Fed. B Westside 50 36 16
18 Federated 28 30 18
35 32 Goliath 35 32 20
Universal 25 25 14
Gol. 20
C
25
25
Univ. 14
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Linear Programming
Formulation
Min
Subcontractors Projects
50x11+36x12+16x13+28x21+30x22+18x23
50
West. A
36
+35x31+32x32+20x33+25x41+25x42+14x43 16
s.t. x11+x12+x13 < 1 28
30
Fed. B
x21+x22+x23 < 1 18
x31+x32+x33 < 1 35 32
x12+x22+x32+x42 = 1 Univ. 14
x13+x23+x33+x43 = 1
xij = 0 or 1 for all i and j
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: The Optimal Assignment
Subcontractor Project Distance
Westside C 16
Federated A 28
Goliath (unassigned)
Universal B 25
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Assignment Problem:
LP Formulation Special Cases
• An assignment is unacceptable
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Shortest-Route Problem
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Shortest-Route Problem:
Linear Programming Formulation
Decision Variable
xij = 1 if the arc from node i to node j is on the shortest route
0 otherwise
cij = distance, time, or cost associated with the arc from node i to node j
Min
all arcs
c ij xij
s.t.
arcs out
xij 1 Origin node i
arcs out
xij x
arcs in
ij 0 Transhipment nodes
x
arcs in
ij 1 Destination node j
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Network Representation
The following Network represents the cost from travelling from one
node to the next.
Formulate the problem to find the path from 1 to 6 with the least
cost.
60
2
100 5
30
80 90
130
40 130
3
6
180
1
80 30 50 90
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example:
Network Representation
60 Objective Function
2 5
100 Min 80x12 + 40x13 + 80x14 + 130x15 + 180x16
30 + 60x25 + 100x26
80 90
130 + 30x34 + 90x35 + 120x36
40 130
3
180
6 + 30x43 + 50x45 + 90x46
1
80 30 50 90 + 60x52 + 90x53 + 50x54 + 30x56
Node Flow-Conservation Constraints
4
x12 + x13 + x14 + x15 + x16 = 1 (origin)
– x12 + x25 + x26 – x52 = 0 (node 2)
– x13 + x34 + x35 + x36 – x43 – x53 = 0 (node 3)
– x14 – x34 + x43 + x45 + x46 – x54 = 0 (node 4)
– x15 – x25 – x35 – x45 + x52 + x53 + x54 + x56 = 0 (node 5)
x16 + x26 + x36 + x46 + x56 = 1 (destination)
All xij ≥ 0
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Shortest Route: Solution Summary
Minimum total cost = $150
x16 = 0 2 5
30
40 3
6
1
30 50
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956