Presentation is loading. Please wait.

Presentation is loading. Please wait.

Two Discrete Optimization Problems Problem: The Transportation Problem.

Similar presentations


Presentation on theme: "Two Discrete Optimization Problems Problem: The Transportation Problem."— Presentation transcript:

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; HOWEVER… 3000 Qn: Is this a linear program?

12 12 The Optimal Solution for CCC If you solve the problem as an LP, the optimal solution will have all integer values for the variables (this is because of the special mathematical properties of the Supply and Demand constraints). The following optimal solution for CCC was obtained using the Excel file TransportationAlg.xlsm posted on the web at: http://cgm.cs.mcgill.ca/~avis/Kyoto/courses/ia/2015/ia.html Customer 1Customer 2Customer 3Supplies Plant 108002001000 Plant 2100000 Plant 310009001000 Demands11008001100Cost =11000 Optimal Solution for CCC

13 13 More Efficient Methods There are “special purpose” computer packages for solving the Transportation Problem (and many other graph problems) much more efficiently than as an LP. However, these algorithms require that the Transportation Problem be balanced, that is, total supply = total demand. This was the case for the problem of CCC, but what should you do if your problem is not balanced?

14 14 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 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.

15 15 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 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.

16 16 Solving Another Problem The ABC Consulting Company has 3 consultants in Miami, 4 in New Orleans, and 5 in Los Angeles. Their offices in Atlanta, Austin, Sacramento and Boston want 3, 2, 4, and 5 of those consultants, respectively. Given the following travel distances in miles, determine how many consultants to send from Miami, New Orleans and Los Angeles to the offices in Atlanta, Austin, Sacramento and Boston to incur the least total miles traveled. Which offices do not receive all of the consultants they want? Supplies Demands 4 5 3 3 245

17 17 The Optimal Solution for ABC AtlantaAustinSacramentoBostonSupplies Miami00033 New Orleans31004 Los Angeles01405 DUMMY00022 Demands3245 Cost =13159 The following optimal solution for the unbalanced problem of ABC was obtained using the Excel file TransportationAlg.xlsm. Question: Which office does not receive the number of consultants they want? Answer: Because 2 consultants are sent from the DUMMY to Boston, this means that Boston will not receive 2 of the 5 consultants they wanted.

18 18 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

19 19 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.


Download ppt "Two Discrete Optimization Problems Problem: The Transportation Problem."

Similar presentations


Ads by Google