0% found this document useful (0 votes)
97 views34 pages

5 Networks

The document describes a transshipment problem where cars must be shipped between ports and locations at minimum cost. It provides the costs, supplies, and demands for shipping cars between nodes on a network. The objective is to minimize total shipping costs given the constraints of meeting supply and demand at each node. Variables are defined for the flow between each pair of nodes and constraints are defined for the balance of flow at each node based on its supply or demand. The optimal solution can be found by solving the linear programming model.

Uploaded by

Crypto Genius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views34 pages

5 Networks

The document describes a transshipment problem where cars must be shipped between ports and locations at minimum cost. It provides the costs, supplies, and demands for shipping cars between nodes on a network. The objective is to minimize total shipping costs given the constraints of meeting supply and demand at each node. Variables are defined for the flow between each pair of nodes and constraints are defined for the balance of flow at each node based on its supply or demand. The optimal solution can be found by solving the linear programming model.

Uploaded by

Crypto Genius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 34

A Transshipment Problem:

Cars must be +100


shipped from
ports in Boston $30
Newark and $50 2 Newark –200
Jacksonville to 1
other locations
+60 Columbus
at minimum 3 $40
cost.
$40
The costs, $35 $30 Richmond +80
supplies, and Atlanta 4
demands are +170 5
shown on the $50
$25
network. $35 $45

+70 Mobile J'ville –300


$50 7
6

1
Defining the Decision Variables

For each arc in a network flow model


we define a decision variable as:
Xij = the amount being shipped (or flowing) from node i to node
j

For example…
X12 = the # of cars shipped from node 1 (Newark) to node 2 (Boston)
X56 = the # of cars shipped from node 5 (Atlanta) to node 6 (Mobile)

Note: The number of arcs determines


the number of variables!
Defining the Objective Function

Minimize total shipping costs.

MIN: 30X12 + 40X14 + 50X23 + 35X35


+40X53 + 30X54 + 35X56 + 25X65
+ 50X74 + 45X75 + 50X76
Total Supply = 500 cars
Total Demand = 480 cars

If Total Supply > Total Demand then for every node,


Inflow - Outflow >= Supply or Demand

For example at Node 3,


Inflow = X23 + X53
Outflow = X35
=> X23 + X53 – X35 ≥ 60
Constraint for node 1:
–X12 – X14 >= – 200 (Note: there is no inflow for node 1!)

This is equivalent to:


+X12 + X14 <= 200
Defining the Constraints
Flow constraints
–X12 – X14 >= –200 } node 1
+X12 – X23 >= +100 } node 2
+X23 + X53 – X35 >= +60 } node 3
+ X14 + X54 + X74 >= +80 } node 4
+ X35 + X65 + X75 – X53 – X54 – X56 >= +170 } node 5
+ X56 + X76 – X65 >= +70} node 6
–X74 – X75 – X76 >= –300 } node 7

Nonnegativity conditions
Xij >= 0 for all ij
Constraints for Network Flow Problems:
The Balance-of-Flow Rules
ILP: there is a constraint that solutions should be integers

LP relaxation: ILP with integrality constraints removed (can accept decimals)

With integrity conditions: we can’t use Simplex but “Branch and bounds”

24.10.09
LP Model for Network Model

 The optimal solution of a Network Model can be found by solving an


associated Linear Programming model:

 xij = # of units of flow from node i to node j (for some pairs i-j)

 Minimize the total cost: ∑ cijxij

 Balance flow in each node i:


 If Total Supply > Total Demand: Inflow – Outflow ≥ bi
 If Total Supply < Total Demand: Inflow – Outflow ≤ bi
 If Total Supply = Total Demand: Inflow – Outflow = bi

 Limit each variable xij: lij ≤ xij ≤ uij

9
LP Model for Network Model

 Remember:
 For each arc there always is one decision variable
 For each node there always is one flow balancing constraint

 Special structure of the network flow constraints:


 Each variable appears in two constraints only, once with
coefficient equal to 1, and once with coefficient equal to -1.
 If Demand and Supply are integers, then the optimal solution
is always integer

10
Optimal Solution to the LP
+100

Boston $30
$50 2 Newark -200
120 1
20
Columbus 80
+60
3 $40
$40

40 Richmond
+80
Atlanta 4
+170 5

$45
210
70
+70 Mobile
6 J'ville -300
$50 7
LP Model in Excel

See file Fig5-2.xls and Fig5-2generic.xls

12
The Shortest Path Problem
 Many decision problems boil down to determining one
shortest (or cheapest) route or path through a network.
 Shortest way to drive a car from a city to another city
 Fastest way for an ambulance to get to an accident
 Easiest way to walk across the mountains
 The Shortest Path Problem is a special case of the
Network Flow Problem:
 There is one source node with 1 unit of supply (b i = –1)
 There is one destination node with 1 unit of demand (b i = 1)
 All other nodes do not have any supply or demand (b i = 0)

13
The American Car Association
What is the fastest way +0 L'burg 3.3 hrs
+1
to get from B’ham 9 Va Bch
to Virginia Beach? 5.0 hrs
11
2.0 hrs

4.7 hrs 2.7 hrs


+0 1.1 hrs
K'ville
5 2.0 hrs G'boro Raliegh
3.0 hrs
8 10 +0
+0
1.7 hrs
A'ville 1.5 hrs
6 +0 2.3 hrs

+0 Chatt. 2.8 hrs


3 2.0 hrs Charl.
7 +0
3.0 hrs 1.7 hrs

1.5 hrs
+0 G'ville
4
Atlanta +0
B'ham 2 2.5 hrs
1 2.5 hrs

-1
14
+0
L'burg 5 pts +1
9 Va Bch
11
9 pts
4 pts

+0 9 pts
+0 4 pts

K'ville 3 pts
5 G'boro Raliegh
9 pts 4 pts 8 10
+0
5 pts
A'ville
6 +0 3 pts
+0 3 pts
Chatt.
3 7 pts
Charl.
8 pts 7
+0
4 pts 4 pts

G'ville 2 pts What is the most scenic


4
Atlanta way to get from B’ham to Va
B'ham +0
2 3 pts Bch?
1
3 pts +0
-1
Solving the Problem
There are two possible objectives for this problem

 Finding the quickest route (minimizing travel time)

 Finding the most scenic route (maximizing the scenic rating


points)

See file Fig5-7.xls


The Equipment Replacement Problem

 The problem of determining when to replace


equipment is another common business problem.

 It can also be modeled as a shortest path problem…


The Compu-Train Company
 Compu-Train provides hands-on software training.

 Computers must be replaced at least every two years.

 A lease contract is being considered:


Initially the equipment is bought at a cost of $62,000

Prices increase 6% per year


60% trade-in for 1 year old equipment
15% trade-in for 2 year old equipment
 Cost of trading after 1 year =
1.06*62,000 - 0.6*62,000 = $28,520

 Cost of trading after 2 years =


1.062*62,000 - 0.15*62,000 = $60,363

24.10.09
Network for Contract
+0 +0
$63,985
2 4
$28,520 $30,231 $33,968
$32,045

-1 1 3 5 +1
$60,363 $67,824
+0

Cost of trading after 1 year: 1.06*$62,000 - 0.6*$62,000 = $28,520


Cost of trading after 2 years: 1.062*$62,000 - 0.15*$62,000 = $60,363
etc, etc….
24.10.09
Compu-Train – model
xij = 1 if replacement associated with arc i-j is chosen
= 0 otherwise
Min 28,520x12 + 60,363x13 + 30,231x23 + 63,985x24 +
32,045x34 + 67,824x35 + 33,968x45 (total cost)
s.t. – x12 – x13 = –1 (1)
x12 – x23 – x24 = 0 (2)
x13 + x23 – x34 – x35 = 0 (3)
x24 + x34 – x45 = 0 (4)
x35 + x45 = 1 (5)
All xij >= 0


22
See file Fig5-12.xls – one model for both contracts.
Worker Assignment Problem
 Three workers, Ann, Bob, and Cindy, should be assigned
jobs such that the total work time is minimized.
 Three jobs are available and the work time (in hours) for
each worker on each job is given in the table below.
Jobs
Worker 1 2 3
Ann 21 50 40
Bob 35 30 22
Cindy 55 20 25
 Each worker should be assigned exactly one job.

23
Assignment Model
Xij = 1 if worker i is assigned to job j, Employees Work tim e Jobs

=0 otherwise i=A..C, j=1..3 Ann


21
-1 1 +1
A 50

min 21XA1 + 50XA2 + 40XA3 + 40

35XB1 + 30XB2 + 22XB3 +


35
55XC1 + 20XC2 + 25XC3 Bob 30
2
-1 +1
B
(total work time) 22

XA1 + XA2 + XA3 = 1 (Ann) 55

XB1 + XB2 + XB3 = 1 (Bob) -1


Cindy 20
3 +1
C
XC1 + XC2 + XC3 = 1 (Cindy) 25

XA1 + XB1 + XC1 = 1 (job 1)


XA2 + XB2 + XC2 = 1 (job 2)
What if another worker was available?
XA3 + XB3 + XC3 = 1 (job 3) What if job 3 required 2 workers?
All X24
ij >= 0
Some network flow problems don’t have
trans-shipment nodes; only supply and
demand nodes

Processing
Supply Groves Distances (in miles) Plants
Capacity

Mt. Dora
21
Ocala
These problems are
200,000
275,000
1 50 4 implemented more
40
effectively using the
35 technique described
Eustis 30 Orlando 600,000
400,000
2
22
5 Previously.

55

Clermont 20 Leesburg
300,000 225,000
3 25 6

24.10.09
Transportation Problem: Tropicsun
 Transportation problem is a special case of the network flow
Xij = # of bushels shipped from node i
Processing
to node j, i=1..3, j=4..6 Supply Groves Distances (in miles) Plants
Capacity
min 21X14 + 50X15 + 40X16 + Mt. Dora
21
275,000 Ocala 200,000
35X24 + 30X25 + 22X26 + 1 50 4
40
55X34 + 20X35 + 25X36
(total bushel-miles) 35
Eustis 30 Orlando 600,000
X14 + X15 + X16 = 275,000 (1) 400,000
2 5
22
X24 + X25 + X26 = 400,000 (2)
X34 + X35 + X36 = 300,000 (3) 55
X14 + X24 + X34 <= 200,000 (4) Clermont 20 Leesburg
300,000 225,000
X15 + X25 + X35 <= 600,000 (5) 3 25 6

X16 + X26 + X36 <= 225,000 (6)


All Xij >= 0

26
Note: can state the constraints as inflow-outflow<=0
LP Model for Network Model

 The optimal solution of a Network Model can be found by solving an


associated Linear Programming model:

 xij = # of units of flow from node i to node j (for some pairs i-j)

 Minimize the total cost: ∑ cijxij

 Balance flow in each node i:


 If Total Supply > Total Demand: Inflow – Outflow ≥ bi
 If Total Supply < Total Demand: Inflow – Outflow ≤ bi
 If Total Supply = Total Demand: Inflow – Outflow = bi

 Limit each variable xij: lij ≤ xij ≤ uij

27
Relationship of Network Flow Problems
Generalization Integer solutions
guaranteed if all
bi, lij, uij are integer

Special Case

 Some problems that do not look like network flow


problems may have a network flow problem structure.
 Example: equipment replacement problem

28
Generalized Network Flow Problems
 In some problems, a gain or loss occurs in flows.
 Example of gain
 Interest or dividends on investments
 Examples of loss
 Oil or gas shipped through a leaky pipeline
 Imperfections in raw materials entering a production process
 Spoilage of food items during transit
 Theft during transit

 Generalized Network Flow Problem can be used:


 Arc i-j has yield aij (gain if >1, loss if <1)
 Outflow from i is xij cij aij
 Inflow to j is aijxij i j
[lij, uij]
29
Coal Bank Hollow Recycling Problem
 Coal Bank Hollow Recycling specializes in collecting and recycling paper.
Collected used paper goes through recycling process 1 or 2, and then it is used to
produce paper pulp for newsprint, packaging paper, and print stock. Supply,
demand, costs, and yields (changes of mass) are shown below.
 Taking the Raw Material trough Process 1 and 2:
 To Process 1 To Process 2
 Material Cost Yield Cost Yield Supply
 Newspaper $13 90% $12 85% 70 tons
 Mixed Paper $11 80% $13 85% 50 tons
 White Office Paper $9 95% $10 90% 30 tons
 Cardboard $13 75% $14 85% 40 tons
 Using the paper material from process 1 and 2 to produce final products
 Newsprint Packaging Paper Print Stock
 Pulp Source Cost Yield Cost Yield Cost
Yield
 From Process 1 $5 95% $6 90% $8 90%
 From Process 2 $6 90% $8 95% $7 95%
 Demand 60 tons 40 tons 50 tons

30
Network for Recycling Problem
-70 Newspaper $13
1
$12 Newsprint
95%
90% +0 pulp +60
$5
7
$11 80%
Mixed Recycling 90%
-50 paper 95%
Process 1 $6
2 5
$13 $8
75% 90% Packing
paper
pulp
+40
$9 85% 95% 8
White
85%
-30 office
paper
$6
3 $10 Recycling $8 90%
90% Process 2
$7 Print
6
$13 85% 95%
stock
pulp
+50
+0 9

-40 Cardboard
$14
4

31
Model part 1
 Xij = # of tons of paper material flowing out of node i
on arc i-j (note: flow into node j = yield*Xij)
 Minimize total cost
 Min 13X15 + 12X16 + 11X25 + 13X26
+ 9X35 + 10X36 + 13X45 + 14X46
+ 5X57 + 6X58 + 8X59 + 6X67 + 8X68 + 7X69
 Raw materials constraints
 – X15 – X16 >= –70 (node 1)
 – X25 – X26 >= –50 (node 2)
 – X35 – X36 >= –30 (node 3)
 – X45 – X46 >= –40 (node 4)
32
Model part 2
 Recycling processes constraints
 0.9X15+0.8X25+0.95X35+0.75X45-X57- X58-X59 >= 0 (node 5)
 0.85X16+0.85X26+0.9X36+0.85X46-X67-X68-X69 >= 0 (node 6)

 Paper pulp
 +0.95X57 + 0.90X67 >= 60 (node 7)
 +0.90X57 + 0.95X67 >= 40 (node 8)
 +0.90X57 + 0.95X67 >= 50 (node 9)

 Nonnegativity
 All Xij >= 0

 See file Fig5-17.xls


33
Important Modeling Point
 In generalized network flow problems, gains and/or losses associated
with flows across each arc effectively increase and/or decrease the
available supply.
 This can make it difficult to tell if the total supply is adequate to
meet the total demand. When in doubt, do the following:
 Assume sufficient supply (inflow – outflow >= b i) and try to solve the
problem in Excel.
 If infeasible, assume insufficient supply (inflow – outflow <= b i) and
solve the problem again.
 Unlike in Network Flow Problems, in Generalized Network Flow
Problems integer solutions are not guaranteed because of fractional
gains or losses.

34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy