5-1 Network Modeling Chapter 5

  • 1,147 views
Uploaded on

 

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,147
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
28
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Network Modeling Chapter 5
  • 2. Introduction
    • A number of business problems can be represented graphically as networks.
    • Advantages of Network Models versus LPs:
      • Networks are convenient way to think about and model many problems
      • Network flow models yield integer solutions naturally as long as the supply and demand data is integer
      • Specialized extremely fast algorithms have been developed for network problems  Critical for very large problems. However, Solver does include these algorithm and we shall simply use the regular LP simplex algorithm available
    • We will focus on a few such problems:
      • Transshipment
      • Shortest Path
      • Transportation/Assignment
      • Maximal Flow
  • 3. Network Flow Problem Characteristics
    • General network flow problems (transshipment problems) can be represented as a collection of nodes connected by arcs.
    • There are three types of nodes:
      • Supply
      • Demand
      • Transshipment
    • We’ll use negative numbers to represent supplies and positive numbers to represent demand.
    • There exists efficient algorithms for the transshipment problem that are one or more orders of magnitude faster than the standard Simplex LP solver; however, Solver only has one generic Simplex solver for all LP problems
  • 4. A Transshipment Problem: The Bavarian Motor Company Newark 1 Boston 2 Columbus 3 Atlanta 5 Richmond 4 J'ville 7 Mobile 6 $30 $40 $50 $35 $40 $30 $35 $25 $50 $45 $50 -200 -300 +80 +100 +60 +170 +70
  • 5. Defining the Decision Variables
    • For each arc in a network flow model
    • we define a decision variable as:
    • X ij = the amount being shipped (or flowing) from node i to node j
    For example… X 12 = the # of cars shipped from node 1 (Newark) to node 2 (Boston) X 56 = the # of cars shipped from node 5 (Atlanta) to node 6 (Mobile)
    • Notes:
    • The number of arcs determines the number of variables
    • Lower and upper bounds could be placed on the flow
  • 6. Defining the Objective Function
    • Minimize total shipping costs.
    • MIN : 30X 12 + 40X 14 + 50X 23 + 35X 35
    • +40X 53 + 30X 54 + 35X 56 + 25X 65
    • + 50X 74 + 45X 75 + 50X 76
  • 7. Constraints for Network Flow Problems: Balance-of-Flow Concepts or “Rules” Supply Nodes: Inflow – Outflow = Supply Demand Nodes: Inflow – Outflow = Demand Transshipment Nodes: Inflow – Outflow = 0 Total Supply = Total Demand Supply Nodes: Inflow – Outflow = Supply ( Not Inflow – Outflow <= Supply) Demand Nodes: Inflow – Outflow <= Demand Transshipment Nodes: Inflow – Outflow = 0 Total Supply < Total Demand Supply Nodes: Inflow – Outflow >= Supply Demand Nodes: Inflow – Outflow >= Demand (Or Inflow – Outflow = Demand) Transshipment Nodes: Inflow – Outflow = 0 Total Supply > Total Demand Apply The Following: For Minimum Cost Network Flow Problem Where:
  • 8. Motivation Behind “Rules” Consider the following two cases for a hypothetical node 1 (rest of network not shown): Case B Case A 1 X 21 +100 X 13 X 41 X 15 1 X 21 -100 X 13 X 41 X 15
  • 9. Illustration of Rule 1 Case A Case B Total Supply > Total Demand which means, in general, we should be able to meet all the demand  Inflow-Outflow >= Supply or Demand Case A: X 21 +X 41 -X 13 -X 15 >=-100, or -X 21 -X 41 +X 13 +X 15 <=100 (i.e., not all supply from node 1 has to be used) Case B: X 21 +X 41 -X 13 -X 15 >=100, or X 21 +X 41 -X 13 -X 15 =100 (i.e., all demand at node 1 has to be met) 1 X 21 +100 X 13 X 41 X 15 1 X 21 -100 X 13 X 41 X 15
  • 10. Illustration of Rule 2 Case A Case B Total Supply < Total Demand which means, we cannot to meet all the demand even if use all the supply  Inflow-Outflow = Supply Inflow –Outflow <= Demand Case A: X 21 +X 41 -X 13 -X 15 =-100, or -X 21 -X 41 +X 13 +X 15 =100 (i.e., all supply from node 1 is used) Note that -X 21 -X 41 +X 13 +X 15 > =100 is wrong! Case B: X 21 +X 41 -X 13 -X 15 <=100, or (i.e., not all demand at node 1 has to be met) 1 X 21 +100 X 13 X 41 X 15 1 X 21 -100 X 13 X 41 X 15
  • 11. Illustration of Rule 3 Case A Case B Total Supply = Total Demand which means, we should be able to exactly meet all the demand  Inflow-Outflow = Supply or Demand Case A: X 21 +X 41 -X 13 -X 15 =-100, or -X 21 -X 41 +X 13 +X 15 =100 (i.e., all supply from node 1 is used) Case B: X 21 +X 41 -X 13 -X 15 =100, or (i.e., all demand at node 1 is met) 1 X 21 +100 X 13 X 41 X 15 1 X 21 -100 X 13 X 41 X 15
  • 12. A Word of Caution
    • These rules are there to help us write the proper flow balance constraints.
    • In reality, the essential underlying rule is that what comes into a node (via arcs or external supply) comes out of the node (again via arcs or external demand).
    • Note that the stated rules make the implicit assumption that the supplies, regardless at what nodes they occur at, can be routed through the network to meet demands at their appropriate nodes.
      • This assumption may not always be true.
      • When this assumption is untrue, we may have an infeasible model
      • We will look later on at one way to handle the infeasibility
  • 13. Defining the Constraints
    • In the BMC problem:
      • Total Supply = 500 cars
      • Total Demand = 480 cars
    • For each supply or demand node we need a constraint like this:
      • Inflow - Outflow >= Supply or Demand
    • Constraint for node 1:
      • –X 12 – X 14 >= – 200 (Note: there is no inflow for node 1)
    • This is equivalent to:
      • +X 12 + X 14 <= 200
    (Supply >= Demand)
  • 14. Defining the Constraints
    • Flow constraints
      • – X 12 – X 14 >= –200 } node 1
      • +X 12 – X 23 >= +100 } node 2
      • +X 23 + X 53 – X 35 >= +60 } node 3
      • + X 14 + X 54 + X 74 >= +80 } node 4
      • + X 35 + X 65 + X 75 – X 53 – X 54 – X 56 >= +170} node 5
      • + X 56 + X 76 – X 65 >= +70 } node 6
      • – X 74 – X 75 – X 76 >= –300 } node 7
    • Nonnegativity conditions
      • X ij >= 0 for all ij
  • 15. Implementing the Model
    • See file Fig5-2.xls
  • 16. Optimal Solution to the BMC Problem Newark 1 Boston 2 Columbus 3 Atlanta 5 Richmond 4 J'ville 7 Mobile 6 $30 $40 $50 $40 $50 $45 -200 -300 +80 +100 +60 +170 +70 120 80 20 40 70 210
  • 17. The Shortest Path Problem
    • Many decision problems boil down to determining the shortest (or least costly) route or path through a network.
      • Ex. Emergency Vehicle Routing
    • This is a special case of a transshipment problem where:
      • There is one supply node with a supply of -1
      • There is one demand node with a demand of +1
      • All other nodes have supply/demand of +0
    • There exists efficient algorithms for the shortest path problem that can solve huge networks (say, with 10,000 nodes and 1 million variables) in a matter of seconds; however, Solver only has one generic Simplex solver for all LP problems.
  • 18. The American Car Association B'ham Atlanta G'ville Va Bch Charl. L'burg K'ville A'ville G'boro Raliegh Chatt. 1 2 3 4 6 5 7 8 9 10 11 2.5 hrs 3 pts 3.0 hrs 4 pts 1.7 hrs 4 pts 2.5 hrs 3 pts 1.7 hrs 5 pts 2.8 hrs 7 pts 2.0 hrs 8 pts 1.5 hrs 2 pts 2.0 hrs 9 pts 5.0 hrs 9 pts 3.0 hrs 4 pts 4.7 hrs 9 pts 1.5 hrs 3 pts 2.3 hrs 3 pts 1.1 hrs 3 pts 2.0 hrs 4 pts 2.7 hrs 4 pts 3.3 hrs 5 pts -1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0
  • 19. 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
  • 20. 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…
  • 21. The Compu-Train Company
    • Compu-Train provides hands-on software training.
    • Computers must be replaced at least every two years.
    • Two lease contracts are being considered:
      • Each requires $62,000 initially
      • Contract 1:
        • Prices increase 6% per year
        • 60% trade-in for 1 year old equipment
        • 15% trade-in for 2 year old equipment
      • Contract 2:
        • Prices increase 2% per year
        • 30% trade-in for 1 year old equipment
        • 10% trade-in for 2 year old equipment
  • 22. Network for Contract 1 Cost on arc: cost of new computers minus salvage value for traded in computers Costs for arcs out of node 1: Cost of trading after 1 year (arc to node 2): 1.06*$62,000 - 0.6*$62,000 = $28,520 Cost of trading after 2 years (arc to node 3): 1.06 2 *$62,000 - 0.15*$62,000 = $60,363 Costs for arcs out of node 2: Cost of trading after 1 year (arc to node 3): 1.06 2 *$62,000 - 0.6*1.06*$62,000 = $30,231 Cost of trading after 2 years (arc to node 4): 1.06 3 *$62,000 - 0.15*1.06*$62,000 = $63,985 And so on … 1 3 5 2 4 -1 +1 +0 +0 +0 $28,520 $60,363 $30,231 $63,985 $32,045 $67,824 $33,968
  • 23. Solving the Problem
    • See file Fig5-12.xls
  • 24. Transportation & Assignment Problems
    • Some network flow problems don’t have trans-shipment nodes; only supply and demand nodes. These are termed “transportation problems” (Example covered in Chapter 3).
    • Transportation problems with flows that are either zero or 1 are called “assignment problems” (e.g., assigning jobs to machines on next slide).
    • There exists efficient algorithms for each of these two different problems that are one or more orders of magnitude faster than generic LP solvers ; however, Solver only has one generic Simplex solver for all LP problems.
    These problems are implemented more effectively using the approach in Chapter 3 (Fig 3-24.xls). Mt. Dora 1 Eustis 2 Clermont 3 Ocala 4 Orlando 5 Leesburg 6 Distances (in miles) Capacity Supply 275,000 400,000 300,000 225,000 600,000 200,000 Groves Processing Plants 21 50 40 35 30 22 55 25 20
  • 25.
    • Assignment models are used to assign, on a one-to-one basis, members of one set to members of another set in a least-cost (or least-time) manner.
    • Assignment models are special cases of transportation models where all flows are 0 or 1.
    • It is identical to the transportation model except with different inputs.
    Assignment Problems
  • 26.
    • There are four jobs that must be completed by five machines. Machines 1, 3 and 5 can hold at most one job each, whereas machines 2 and 4 can handle two jobs each.
    1 1 1 2 2 1 1 1 1 Machine 1 Machine 2 Machine 3 Machine 4 Machine 5 Job 1 Job 2 Job 3 Job 4 $14 $5 $8 $7 . . . Example
  • 27.
    • The objective is to minimize the overall cost.
    • Refer to Assignment.xls file referenced under Lecture.
    Assignment Problem Example - Continued Machine Job $8 $4 $5 $5 5 $10 $6 $4 $2 4 $9 $3 $8 $7 3 $5 $6 $12 $2 2 $7 $8 $5 $14 1 4 3 2 1
  • 28. The Maximal Flow Problem
    • In some network problems, the objective is to determine the maximum amount of flow that can occur through a network.
    • The arcs in these problems have upper and lower flow limits.
    • Examples
      • How much water can flow through a network of pipes?
      • How many cars can travel through a network of streets?
    • There exists efficient algorithms for the maximal problem that can solve huge networks (say, with 10,000 nodes and 1 million variables) in a matter of seconds; however, Solver only has one generic Simplex solver for all LP problems.
  • 29. The Northwest Petroleum Company Oil Field Pumping Station 1 Pumping Station 2 Pumping Station 3 Pumping Station 4 Refinery 1 2 3 4 5 6 UB =6 UB = 4 UB = 3 UB = 6 UB = 4 UB = 5 UB = 2 UB = 2
  • 30. The Northwest Petroleum Company Oil Field Pumping Station 1 Pumping Station 2 Pumping Station 3 Pumping Station 4 Refinery 1 2 3 4 5 6 UB = 6 UB = 4 UB = 3 UB = 6 UB = 4 UB = 5 UB = 2 UB = 2
  • 31. Formulation of the Max Flow Problem
    • MAX: X 61
    • Subject to: +X 61 - X 12 - X 13 = 0
    • +X 12 - X 24 - X 25 = 0
    • +X 13 - X 34 - X 35 = 0
    • +X 24 + X 34 - X 46 = 0
    • +X 25 + X 35 - X 56 = 0
    • +X 46 + X 56 - X 61 = 0
    • with the following bounds on the decision variables:
    • 0 <= X 12 <= 6 0 <= X 25 <= 2 0 <= X 46 <= 6
    • 0 <= X 13 <= 4 0 <= X 34 <= 2 0 <= X 56 <= 4
    • 0 <= X 24 <= 3 0 <= X 35 <= 5 0 <= X 61 <= inf
  • 32. Implementing the Model
    • See file Fig5-24.xls
  • 33. Optimal Solution Oil Field Pumping Station 1 Pumping Station 2 Pumping Station 3 Pumping Station 4 Refinery 1 2 3 4 5 6 6 4 3 6 4 5 2 2 5 3 2 4 2 5 4 2
  • 34. Special Modeling Considerations: Flow Aggregation 1 2 3 4 5 6 -100 -100 +75 +50 +0 +0 $3 $4 $4 $5 $5 $5 $3 $6 Suppose the total flow into nodes 3 & 4 must be at least 50 and 60, respectively. How would you model this?
  • 35. 1 2 3 4 5 6 -100 -100 +75 +50 +0 +0 $3 $4 $4 $5 $5 $5 $3 $6 30 40 +0 +0 L.B.=50 L.B.=60 Nodes 30 & 40 aggregate the total flow into nodes 3 & 4, respectively. This allows us to place lower bounds on the aggregate flows into these nodes. Special Modeling Considerations: Flow Aggregation
  • 36. Special Modeling Considerations: Multiple Arcs Between Nodes 1 -75 $8 2 +50 Two (or more) arcs can share the same beginning and ending nodes. You just need to label them differently in the algebraic formulation : e.g., X 121 and X 122 . Implementation in Excel would be identical to before. The book also offers an alternative scheme … $6 U.B. = 35 1 10 2 +0 +50 -75 $0 $6 U.B. = 35 $8
  • 37. Special Modeling Considerations: Capacity Restrictions on Total Supply
    • Supply exceeds demand, but the upper bounds prevent the demand from being met.
    • Note that this situation may even happen without the capacity restrictions. It may be that the network is not connected in a fashion to allow the available supply to reach the required demand.
    1 -100 2 -100 3 +75 4 +80 $5, UB=40 $3, UB=35 $6, UB=35 $4, UB=30
  • 38. Special Modeling Considerations: Capacity Restrictions on Total Supply
    • Now, demand exceeds total supply and you can use Rule 2.
    • As much “real” demand as possible will be met in the least costly way.
    1 -100 2 -100 3 +75 4 +80 $5, UB=40 $3, UB=35 $6, UB=35 $4, UB=30 0 +200 $999, UB=100 $999, UB=100
  • 39. End of Chapter 5