You are on page 1of 40

BA ZC412:

MODELS & APP IN OPERATIONS


RESEARCH
BITS Pilani RAKHEE
Department of Mathematics
Pilani|Dubai|Goa|Hyderabad

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

Hewlitt Corporation established an early retirement program as part


of its corporate restructuring. At the close of the voluntary sign-up
period, 68 employees had elected early retirement. As a result of
these early retirements, the company incurs the following obligations
over the next eight years:

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

The objective is to minimize the funds needed to meet the plan’s


eight-year obligation:
Min F

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Financial Planning: The
Constraints

A key feature of this type of financial planning problem is that a


constraint must be formulated for each year of the planning horizon.

It’s form is:


(Funds available at the beginning of the year)
- (Funds invested in bonds and placed in savings)
= (Cash obligation for the current year)

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

The transportation problem seeks to minimize the total


shipping costs of transporting goods from m origins (each
with a supply si) to n destinations (each with a demand dj),
when the unit shipping cost from an origin, i, to a
destination, j, is cij.
dd1
s1 1 1

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

We want to determine the Kgs of material, xij , to be shipped by


mode i to destination j. The following table summarizes the
decision variables:
B1 B2 B3
Road x11 x12 x13
Rail x21 x22 x23
Airplane x31 x32 x33

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Objective Function

Decision Variables Shipping Costs


B1 B2 B3 B1 B2 B3
Road x11 x12 x13 12 6 5
Rail x21 x22 x23 20 11 9
Airplane x31 x32 x33 30 26 28

The objective is to minimize the total shipping cost.


Min: (shipping cost per Kg for each mode per destination pairing) * (number of
Kg shipped by mode per destination pairing)
Min: 12x11 + 6x12 + 5x13 + 20x21 + 11x22 + 9x23 + 30x31 + 26x32 + 28x33

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Constraints

Equal use of transportation modes:


(1) x11 + x12 + x13 = 3000 (Road)
(2) x21 + x22 + x23 = 3000 (Rail)
(3) x31 + x32 + x33 = 3000 (Air) The PSU has 9,000 Kg of material in
Mumbai that it wishes to ship to
Destination material requirements: three installations: B1, B2 & B3. They
(4) x11 + x21 + x31 = 4000 require 4,000, 2,500, and 2,500 Kg,
(5) x12 + x22 + x32 = 2500 respectively. Government regulations
(6) x13 + x23 + x33 = 2500 require equal distribution of shipping
among the three carriers.
Non-negativity of variables:
xij > 0, i = 1, 2, 3 and j = 1, 2, 3

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transportation Problem:
Solution Summary

Objective Function Value = 142000.00 • B1 will receive 1000 Kg by road and


Variable Value Reduced 3000 Kg by airplane.
Cost • B2 will receive 2000 Kg by road and
x11 1000.000 0.000 500 Kg by rail.
x12 2000.000 0.000 • B3 will receive 2500 Kg by railroad.
x13 0.000 1.000 • The total shipping cost will be
x21 0.000 3.000
x22 500.000 0.000 $142,000.
x23 2500.000 0.000
x31 3000.000 0.000
x32 0.000 2.000
x33 0.000 6.000

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

Transshipment problems are transportation problems in


which a shipment may move through intermediate nodes
(transshipment nodes) before reaching a particular
destination node.

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Transshipment Problem: Network Representation

The network representation for a transshipment problem with two


sources, three intermediate nodes, and two destinations is shown
below.

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

xij > 0 for all i and 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

• Total supply not equal to total demand


• Maximization objective function
• Route capacities or route minimums
• Unacceptable routes

The LP model modifications required here are identical to those


required for the special cases in the transportation problem.

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

Unit transportation cost:


KumarN KumarS
Zrox
75
1 TP1 5 8
5 50 TP2 7 4
ARNOLD
TP1 K_N 5
The costs to ship to final
8 8 destination:
Hewes
HEWES Zrox Hewes Rocky
75 3 60 KumarN 1 5
7
40 8
WASH
4 KumarS 3 4 4
TP2 K_S
BURN
4 4
Rocky

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

Amt Out of TP1: x13 + x14 < 75


Amt Out of TP2: x23 + x24 < 75
Amt Through KumarN: x13 + x23 - x35 - x36 - x37 = 0
Amt Through KumarS: x14 + x24 - x45 - x46 - x47 = 0
Amt Into Zrox: x35 + x45 = 50
Amt Into Hewes: x36 + x46 = 60 ZROX
Zrox
75 5
Amt Into Rockrite: x37 + x47 = 40 1
TP1 5 K_N 50
ARNOLD
5
1 3
Non-negativity of Variables: 8 8
Hewes
xij > 0, for all i and j. HEWES
6
75 3 60
7
TP2 K_S
K_S 4 40
WASH
2 4 4
BURN
4
Rocky
7

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

An assignment problem is a special c31


c32
case of a transportation problem in 3 c33 3
which all supplies and all demands
are equal to 1; hence assignment
problems may be solved as linear
programs.

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

xij > 0 for all i and j

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

How should the contractors be assigned so that total mileage is


minimized?
17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example: Network Representation

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

x41+x42+x43 < 1 Gol. 20 C


x11+x21+x31+x41 = 1 25
25

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

Total Distance = 69 miles

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

•  Number of agents exceeds the number of tasks

• Number of tasks exceeds the number of agents

• The assignment alternatives are evaluated in terms of revenue or profit

• An assignment is unacceptable

• An agent is permitted to work t tasks:

17-08-2019 BA ZC412 Rakhee BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Shortest-Route Problem

The shortest-route problem is concerned with finding the shortest path


in a network from one node (or set of nodes) to another node (or set of
nodes).
If all arcs in the network have nonnegative values then a labeling
algorithm can be used to find the shortest paths from a particular node
to all other nodes in the network.
The criterion to be minimized in the shortest-route problem is not
limited to distance even though the term "shortest" is used in
describing the procedure. Other criteria include time and cost.
(Neither time nor cost are necessarily linearly related to distance.)
“It is not crazy to say that the internet wouldn't work as efficiently as it
does if it wasn't for Dijkstra’s algorithm for computing the shortest path
between two nodes”

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

x12 = 0 x25 = 0 x34 = 1 x43 = 0 x52 = 0


x13 = 1 x26 = 0 x35 = 0 x45 = 1 x53 = 0
x14 = 0 x36 = 0 x46 = 0 x54 = 0
x15 = 0 x56 = 1

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

You might also like