Download presentation
Presentation is loading. Please wait.
Published byPercival Jones Modified over 9 years ago
1
Two Discrete Optimization Problems Problem: The Transportation Problem
2
2 Formulating Graph Problems You already know the following steps for formulating a graph problem (such as the TSP and the Shortest-Path Problem): 1. Identify the vertices that represent objects in a problem. 2. Identify the edges that are lines connecting selected pairs of vertices to indicated a relationship between the objects associated with the two connected vertices. 3. Identify additional data by writing those values next to the corresponding vertices and/or edges. 4. State the objective in the context of the graph and given data. Let’s do this for a new problem…
3
3 The Transportation Problem (TP) CCC has 1000 computers at each of three plants this month. Three customers have requested 1100, 800, and 1100 computers, respectively. These data are summarized in the table below, along with the cost of shipping one computer from each plant to each customer. You have been asked to develop a least-cost shipping plan for CCC.
4
4 Creating a Graph for the TP Step 1: Identify the Vertices. Step 2: Identify the Edges. Use an edge to connect a vertex i to a vertex j to represent the possibility of shipping computers from Plant i to Customer j. Plants 1 2 3 Customers 2 3 1 Use one vertex for each plant and one for each customer: Note: An edge is a relationship and not a number.
5
5 Creating a Graph for the TP 1000 (Supplies) 1100 800 1100 (Demands) Step 3: Identify Additional Data. Plants 1 2 3 Customers 2 3 1 4 3 7 6 8 7 4 2 5 (Unit Shipping Costs)
6
6 Step 4: State the Objective OR use variables, objective function, and constraints: Step 4(a): Identify the variables, which are those quantities whose values, once determined, constitute the solution to the problem. 1. What can you choose or control? 2. What decisions do you have to make? 3. What items affect costs or profits? 4. If you had to implement the solution, what information would you need to know? You can use words, for example, for the TSP: To identify the variables, ask yourself the following questions: Find the order in which to visit every vertex exactly once and return to the starting vertex with least total “cost”.
7
7 Identifying Variables for CCC X ij = the number of computers to ship from Plant i to Customer j (i, j = 1, 2, 3) A = the number of computers to ship from P1 to C1. X 1 = the number of computers to ship from P1 to C1. OR X 2 = the number of computers to ship from P1 to C2. Question: What does X 5 mean for this problem? Note: Choose notation that is easy to understand. Cust 1Cust 2Cust 3 Plant 1X 11 X 12 X 13 Plant 2X 21 X 22 X 23 Plant 3X 31 X 32 X 33
8
8 Identifying the Obj. Func. For CCC Minimize total transportation cost Step 4(b): Identify the Objective Function (a math expression in terms of the variables and data that reflect the goal). Decompose: Total transportation cost = Decompose (again): Transportation cost from Plant 1 = Key Point: You can use decomposition more than once. Math: 5X 11 + 3X 12 + 2X 13 Plant 1Plant 2Plant 3 Words:
9
9 Identifying Constraints for CCC Demand Constraints ( ) Words: Mathematics: Total number of computers received by Customer 1 should be equal to the number requested. Decompose: Total number of computers received by Customer 1 = 3 Step 4(c): Identify Constraints (restrictions on the values of the variables so that those values are acceptable). Note: Use grouping to identify groups of constraints.
10
10 Identifying Constraints for CCC Supply Constraints ( ) Words: Step 4(c): Identify Constraints (cont.) Mathematics: 3 Total number of computers shipped from Plant 1 should be equal to the available supply. Decompose: Total number of computers shipped from Plant 1 = Logical Constraints: and integer
11
11 Transportation Problem of CCC Find values for the variables X ij (i = 1, 2, 3; j = 1, 2, 3) so as to s. t. Demand Constraints Supply Constraints Logical Constraints NO…it is an integer program. 3000 Balanced TP Qn: Is this a linear program?
12
12 Handling Too Much Demand (Supplies) PlantsCustomers (Demands) 2 1 2 33 1 4 3 7 6 8 7 4 2 5 1000 1100 800 1600 The algorithm for solving the transportation problem requires that total supply = total demand. Question: What do you do if total supply < total demand? Dum 3000 3500 0 0 0 500 3500 Note: Shipping one unit from the Dummy Plant to Customer j means that Customer j will not receive one unit of their demand. Means that some customers will not receive all of their demand.
13
13 Handling Too Much Supply (Supplies) PlantsCustomers (Demands) 2 1 2 33 1 4 3 7 6 8 7 4 2 5 1500 1000 1100 800 1100 The algorithm for solving the transportation problem requires that total supply = total demand. Question: What do you do if total supply > total demand? Dum 35003000 0 0 0 500 3500 Note: Shipping one unit from Plant i to the Dummy Customer means that Plant i will have one unit of supply not shipped. Means that some plants will not ship all of their supplies.
14
14 Review of Simplex Alg. for LP x1x1 x2x2 10050 100 150 x d t* x’ = x + t*d Step 0. Initialization: Find an initial extreme point, x. Step 1. Test for Optimality: Perform a relatively easy computation to see if the current extreme point x is optimal. If so, stop. Step 2. Move: Use the fact that the current extreme point x is not optimal to: (a) DOM: Find a direction of movement d pointing from x along an edge of the feasible region that leads to improve- ment of the objective function. (b) AOM: Determine the amount t * to move from x in the direction d to reach the next extreme point. (c) Move: Move from x to x’ = x + t * d. Set x = x’ and return to Step 1. This is a Finite Improvement Algorithm (FIA).
15
15 Finding an Initial Shipping Plan = cost 1000 100 1000 0 100 0 900 0 100 0 800 0 0 12600 Step 0 (Initialization). Find an initial shipping plan. Note: Cells in which nothing is being shipped (cells 11, 12, 22, and 23) are called nonbasic cells. The others are called basic cells (cells 13, 21, 31, 32, and 33). Likewise for the variables.
16
16 The Test for Optimality = cost TFO: First compute a reduced cost there for each nonbasic (“empty”) cell. The reduced costs indicates the change in the current total costs if one unit is shipped in that nonbasic cell. If the reduced cost of every nonbasic cell is ≥ 0, then the current shipping plan is optimal. +1
17
17 Computing Reduced Costs = cost +1 11 11 +5 2 6 = + 4 +1 ≥ 0 Note: To compute rc(x ij ), start in cell ij and, using only the basic cells, alternate between rows and columns to find the unique “cycle” that returns to cell ij. Then, alternately add and subtract the unit shipping costs around this cycle.
18
18 Test for Optimality = cost +1 11 11 +3 2 2 + 4 7 = 2 < 0 +7 +1 11 4 + 6 7 = +2 > 0 +1 11 +8 4 + 6 4 = +6 > 0 Not optimal
19
19 Find the Direction of Movement Find the cycle that starts and ends at the nonbasic cell whose reduced cost is most negative (the rule of steepest descent). = cost +1 11 11
20
20 Find the Amount of Movement = cost Question: Because rc(x 12 ) = –2, you can improve the current plan by shipping 1 unit in cell 12. In fact, each unit shipped in cell 12 reduces the costs by 2. So why not ship 1000 units there? Answer: Because each unit shipped in cell 12 requires reducing the shipment in some of the basic cells by the same amount...and the values of these basic variables cannot be reduced below 0, so t* =800
21
21 Move to the New Shipping Plan Having determined that t* = 800 is the amount to ship in the chosen nonbasic cell, create the new shipping plan by adjusting the amounts shipped in each basic cell in the associated cycle. Note: The nonbasic cell whose value increased to t* becomes basic (cell 12, in this example) and the basic cell in the cycle whose value decreases to 0 becomes nonbasic (cell 32, in this example). = cost +1 11 +1+1 11 +800 800 +800 800 200 9000 11000
22
22 Computing Reduced Costs Again = cost +1 11 11 11 +7 4 + 6 4 +4 > 0 + 2 3 = optimal
23
23 The Stepping Stone Algorithm Step 0: (Initialization) Find an initial shipping plan x (for example, by using the Matrix Minimum Method). Step 1: (Move) Compute a reduced cost for each nonbasic cell. If all reduced costs are 0, then stop. Otherwise, choose any nonbasic cell ij whose reduced cost is < 0, create a new shipping plan as follows, and then return to Step 1: (a) Find the cycle of cells that starts and ends at cell ij. (b) Set t* = min{x ij : x ij is being reduced in the cycle}. (c) Starting in cell ij, alternately increase and decrease the values of the cells in the cycle by t*. The cell whose value reduces to 0 becomes nonbasic. Question: Is the final shipping plan x* obtained by the algorithm the best, that is, is x* optimal? Yes!
24
24 Variations of the Trans. Prob. Capacitated/Uncapacitated Problems Prohibited Routes Transshipment Nodes Incorporating Unequal Production Costs Incorporating Unequal Revenue Lower Bounds on Supplies and Demands
25
25 Summary Formulating a graph problem involves the following steps: 1. Identify the vertices by using circles to represent objects in a problem. 2. Identify the edges by using lines to connect selected pairs of vertices to indicated a relationship between the objects associated with the two connected vertices. 3. Identify other data by writing those values next to the corresponding vertices and/or edges. 4. State the objective in the context of the graph using either: Words, or Variables, an objective function, and constraints.
26
26 Summary The transportation problem is a combinatorial optimization problem. For a balanced problem, in which the total supply equals the total demand, the Stepping Stone Algorithm is a finite improvement algorithm that generates a sequence of shipping plans, each of which has less total cost that the preceding one. The Matrix Minimum Method is one algorithm for finding an initial feasible solution, that is, an initial shipping plan (see the next slide for details).
27
27 The Matrix Minimum Method Repeat the following steps until there are no more cells: Step 1. Identify a remaining cell ij whose unit shipping cost is the least. Step 2. Set x ij = min{remaining supply at Plant i, remaining demand for Customer j}. Step 3. Reduce the supply at Plant i and the demand for Customer j by x ij. Step 4. If the supply at Plant i has decreased to 0, then cross off row i. Otherwise, the demand for Customer j is now 0, so cross off column j.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.