Network Flow Problems Example of Network Flow problems: What shipping plan minimizes cost to ship...
-
Upload
caitlin-williamson -
Category
Documents
-
view
214 -
download
0
Transcript of Network Flow Problems Example of Network Flow problems: What shipping plan minimizes cost to ship...
Network Flow Problems
Example of Network Flow problems:
• What shipping plan minimizes cost to ship from m warehouses to n customers?• How do you maximize efficiency of a machine shop through the assignment of jobs to a group of machines?• What is the maximum flow that can be obtained through a series of pipes?• How do you maximize the flow of traffic through a series of one-way streets?• What is the shortest route if a truck must make a “milk-run” through a series of stops (TSP)?• How do you schedule a series of project activities in order to minimize the total project duration time?
Network Flow Problems – Transportation Problem
1
3
2
1
3
2
4Warehouse
Customer
a – warehouse capacityb – customer demand
a1
a2
a3
b1
b2
b3
b4
c11
c12
Network Flow Problems – Transportation Problem
1 2 … n
1 c11 c12 … c1n
Warehouses 2 c21 c22 … c2n
… …
m cm1 cm2 … cmn
Customers
Given:Supply Vector: a = [a1 a2 … am ]Demand Vector: b = [b1 b2 … bn ]Transportation cost matrix: c
Objective: Find shipping plan that minimizes transportation cost that meets all customer demands while being constrained by supply capacities.
Network Flow Problems – Transportation Problem
01
1
1 1
ij
m
ijij
n
jiij
m
i
n
jijij
x
bx
ax
xcZMinimize
s.t.
Total Cost
(supply restriction)
i = 1…m
(demand requirement)
j = 1…n
Network Flow Problems –The Assignment Problem
Consider the problem of assigning n assignees to n tasks. Only one task can be assigned to an assignee, and each task must be assigned.
There is also a cost associated with assigning an assignee i to task j, cij.
The objective is to assign all tasks such that the total cost is minimized.
Network Flow Problems –The Assignment Problem
Examples:• Assign people to project assignments• Assign jobs to machines• Assign products to plants• Assign tasks to time slots
Network Flow Problems –The Assignment Problem
To fit the assignment problem definition, the following assumptions must be satisfied:
• The number of assignees and the number of tasks are the same (denoted by n).• Each assignee is to be assigned to exactly one task.• Each task is to be assigned to exactly one assignee.• There is a cost cij associated with assignee i performing task j.• The objective is to determine how all n assignments should be made to minimize the total cost.
Assignment Problem – Flow Diagram
1
3
2
1
3
2
n
assignees tasks
a – assigneet – tasks a1
a2
a3
t1
t2
t3
t4
c11
c12
n cnn
an
Assignment Problem –Cost Matrix
1 2 … n
1 c11 c12 … c1n
Assignees 2 c21 c22 … c2n
… …
n cn1 cn2 … cnn
Tasks
Let the following represent the standard assignment problem cost matrix, c:
Assignment Problem –Conversion to Standard Cost Matrix
1 2 3 41 10 9 8 7
Assignees 2 4 - 5 63 2 1 8 -
Tasks
Consider following cost matrix, how do you convert to satisfy the standard definition of the assignment problem?
1 2 3 41 10 9 8 7
Assignees 2 4 M 5 63 2 1 8 M4 0 0 0 0
Tasks
Add “big M” to avoid incompatible assignments, and add a dummy assignee (or task) to have equal assignees and tasks.
Assignment Problem – Math Formulation
) and allfor binary, is(
0
1
1
1
1
1 1
jix
x
x
x
xcZ
ij
ij
n
iij
n
jij
m
i
n
jijij
Minimize
s.t.
Total Cost
i
j
Does this formulation look familiar?Is this a Linear Program?
Network Flow Problems –Maximal Flow Problems
Consider the following flow network:
s1
2
3
nks1
k23
k13
k3n
k1n
ks2
k21
The objective is to ship the maximum quantity of a commodity from a source node s to some sink node n, through a series of arcs while being constrained by a capacity k on each arc.
Maximal Flow Problems
Examples:1. Maximize the flow through a company’s distribution
network from its factories to its customers.2. Maximize the flow through a company’s supply network
from its vendors to its factories.3. Maximize the flow of oil through a system of pipelines.4. Maximize the flow of water through a system of aqueducts.5. Maximize the flow of vehicles through a transportation
network.
Maximal Flow Problems
Definitions:Flow network – consists of nodes and arcsSource node – node where flow originatesSink node – node where flow terminateTransshipment points – intermediate nodesArc/Link – connects two nodesDirected arc – arc with direction of flow indicatedUndirected arc – arc where flow can occur in either directionCapacity(kij) – maximum flow possible for arc (i,j)Flow(f ij) – flow in arc (i,j). Forward arc – arcs with flow out of some nodeBackward arc – arc with flow into some nodePath – series of nodes and arcs between some originating and some terminating node Cycle – path whose beginning and ending nodes are the same
Maximal Flow Problems – LP Formulation
s1
2
3
nff
Objective: Maximize Flow (f)Constraints: 1) The flow on each arc, fij, is less than or equal to the capacity on each arc, kij. 2) Conservation of flow at each node. Flow in = flow out.
Maximal Flow Problems – LP Formulation
s1
2
3
nff
Max Z = fsts) fs1 + fs2 = f1) f13 + f1n = fs1 + f21 2) f21 + f23 = fs2
3) f3n = f13 + f23 n) f = f3n + f1n
0 <= fij <= kij
Objective: Maximize Flow (f)Constraints: • The flow on each arc, fij, is less than or equal to the capacity on each arc, kij. • Conservation of flow at each node. Flow in = flow out.
ji,
Maximal Flow Problems – Conversion to Standard Form
s1 1
2
3
n1
What if there are multiple sources and/or multiple sinks?
s2
n2
Maximal Flow Problems – Conversion to Standard Form
f
f
Create a “supersource” and “supersink” with arcs fromthe supersource to the original sources and from the original sinks to the supersink. What capacity should we assign tothese new arcs?
s1 1
2
3
n1
s2
n2
s
n
Maximal Flow Problems – Conversion to Standard Form
s1
2
3
nff
What if there is an undirected arc (flow can occur in either direction)? See arc (1,2).
k12
Maximal Flow Problems – Conversion to Standard Form
s1
2
3
nff
Create two directed arcs with the same capacity. Upon solving the problem and obtaining flows on each arc, replace the two directed arcs with a single arc with flow | fij – fji |, in the directionof the larger of the two flows.
k21k12
Project Management - PERT/CPM
Let each node represent a project event/milestone (node 1 isstart of project, node 11 is end of project).
Let each arc represent a project task/job.
Each arc is identified by a job letter and duration. Note thedummy jobs indicating precedence that jobs H and I must complete before K or L begins.
2A,5
1 3 4 5 6 9 10
7
8
11B,8 C,15
D,12
F,8
E,10G,11
H,5
I,4
J,2K,8
L,14
M,5
N,5
0
0
Project Management - PERT/CPM
What questions might project managers be interested in?
• How long will the project take?• Can I add manpower or tools to reduce the overall project length?• To which tasks should I add manpower?• What tasks are on the critical path?• Is the project on schedule?• When should materials and personnel be in place to begin a task?• Other?…
Project Management - Examples
• University Convocation Center• Windsor Engine Plant• Other major construction projects• Large defense contracts• NASA projects (space shuttle)• Maintenance planning of oil refineries, power plants, etc…• other…
Project Management – Minimum Completion Time
2A,3
1
3
4 5C,4
D,2B,1
E,5
0
LP Solution: Let ti be the time of event i.
Min Z = t5 – t1
s.t. t2 – t1 >= 3 t3 – t2 >= 0
t3 – t1 >= 1t4 – t2 >= 4t4 – t3 >= 2t5 – t4 >= 5 ti >= 0 for all i
CPM – Critical Path MethodCan normal task times be reduced?
Is there an increase in direct costs?• Additional manpower• Additional machines• Overtime, etc…
Can there be a reduction in indirect costs?• Less overhead costs• Less daily rental charges• Bonus for early completion• Avoid penalties for running late• Avoid cost of late startup
CPM addresses these cost trade-offs.
CPM – Critical Path Method
LP Approach:
Let tij – decision variable for time to complete task connecting events i and j. kij – normal completion time of task connecting events i and j. lij – minimum completion time of task connecting events i and j. Cij – incremental cost of reducing task connecting events i and j.
Model I: Given project must be complete by some time T, which tasksshould be reduced to minimize the total cost?
Min
s.t.
i j
ijijij tkCZ )(
01
i
n
ijijij
ijij
t
Ttt
ktl
ttt for all jobs (i,j)
for all jobs (i,j)
for all i
CPM – Critical Path Method
LP Approach:
Model II: Given an additional budget of $B for “crashing” tasks, what minimum project completion time can be obtained while staying within your budget?
Min
s.t.
1ttZ n
0
)(
i
iji j
ijij
ijijij
ijij
t
BtkC
ktl
ttt for all jobs (i,j)
for all jobs (i,j)
for all i