SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT. BF360 Operations Research

Size: px
Start display at page:

Download "SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT. BF360 Operations Research"

Transcription

1 SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT Unit 4 Distribution and Network Models Moses Mwale moses.mwale@ictar.ac.zm

2

3 Contents Unit 4. Distribution and Network Models The Transportation Model... 3 General Description of a Transportation Problem... 7 Computer Solution of a Transportation Problem The Transshipment Model The Assignment Model Computer Solution of an Assignment Problem The Shortest Route Problem The Maximal Flow Problem... 17

4

5 Unit 4. Distribution and Network Models The models discussed in this Unit belong to a special class of linear programming problems called network flow problems. Five different problems are considered: Transportation problem Trans-shipment problem Assignment problem Shortest-route problem Maximal flow problem The Transportation Model The transportation model is formulated for a class of problems with the following unique characteristics: (1) A product is transported from a number of sources to a number of destinations at the minimum possible cost; (2) each source is able to supply a fixed number of units of the product, and each destination has a fixed demand for the product. Although the general transportation model can be applied to a wide variety of problems, it is this particular application to the transportation of goods that is most familiar and from which the problem draws its name. In a transportation problem, items are allocated from sources to destinations at a minimum cost. Example 4.1 The following example demonstrates the formulation of the transportation model. Wheat is harvested in the Midwest and stored in grain elevators in three different cities Mpika, Serenje, and Chisamba. These grain elevators supply three flour mills, located in Ndola, Livingstone, and Lusaka. Grain is shipped to the mills in railroad cars, each car capable of holding 1 ton of wheat. Each grain elevator is able to 3

6 4 Unit 4. Distribution and Network Models supply the following number of tons (i.e., railroad cars) of wheat to the mills on a monthly basis: Grain Elevator Supply 1. Mpika Serenje Chisamba 275 Total 600 tons Each mill demands the following number of tons of wheat per month: Mill Demand A. Ndola 200 B. Livingstone 100 C. Lusaka 300 Total 600 tons The cost of transporting 1 ton of wheat from each grain elevator (source) to each mill (destination) differs, according to the distance and rail system. (For example, the cost of shipping 1 ton of wheat from the grain elevator at Serenje to the mill at Ndola is $7.) These costs are shown in the following table: Mill Grain Elevator A. NDOLA B. LIVINGSTONE C. LUSAKA 1. Mpika $6 $8 $10 2. Serenje Chisamba The problem is to determine how many tons of wheat to transport from each grain elevator to each mill on a monthly basis to minimize the total cost of transportation. A diagram of the different transportation routes, with supply and demand, is given in Figure 4.1. The linear programming model for a transportation problem has constraints for supply at each source and demand at each destination.

7 Figure 4.1: Network of transportation routes for wheat shipments The linear programming model for this problem is formulated as follows: Minimize z = 6x 1A + 8x 1B + 10x 1C + 7x 2A + 11x 2B + 11x 2C + 4x 2A + 5x 3B + 12x 3C Subject to x 1A + x 1B + x 1C = 150 x 2A + x 2B + x 2C = 175 x 3A + x 3B + x 3C = 275 x 1A + x 2A + x 3A = 200 x 1B + x 2B + x 3B = 100 x 1C + x 2C + x 3C = 300 x ij 0 5

8 6 Unit 4. Distribution and Network Models In this model the decision variables, xij, represent the number of tons of wheat transported from each grain elevator, i (where i = 1, 2, 3), to each mill, j (where j = A, B, C). The objective function represents the total transportation cost for each route. Each term in the objective function reflects the cost of the tonnage transported for one route. For example, if 20 tons are transported from elevator 1 to mill A, the cost ($6) is multiplied by x1a (= 20), which equals $120. The first three constraints in the linear programming model represent the supply at each elevator; the last three constraints represent the demand at each mill. As an example, consider the first supply constraint, x 1A + x 1B + x 1C = 150. This constraint represents the tons of wheat transported from Mpika to all three mills: Ndola (x1a), Livingstone (x1b), and Lusaka (x1c). The amount transported from Mpika is limited to the 150 tons available. Note that this constraint (as well as all others) is an equation (=) rather than a inequality because all the tons of wheat available will be needed to meet the total demand of 600 tons. In other words, the three mills demand 600 total tons, which is the exact amount that can be supplied by the three grain elevators. Thus, all that can be supplied will be, in order to meet demand. This type of model, in which supply exactly equals demand, is referred to as a balanced transportation model. In a balanced transportation model, the supply equals demand, all constraints are equalities. Realistically, however, an unbalanced problem, in which supply exceeds demand or demand exceeds supply, is a more likely occurrence. In our wheat transportation example, if the demand at Lusaka is increased from 300 tons to 350 tons, a situation is created in which total demand is 650 tons and total supply is 600 tons. This would result in the following change in our linear programming model of this problem:

9 Minimize z = 6x 1A + 8x 1B + 10x 1C + 7x 2A + 11x 2B + 11x 2C + 4x 2A + 5x 3B + 12x 3C Subject to x 1A + x 1B + x 1C = 150 x 2A + x 2B + x 2C = 175 x 3A + x 3B + x 3C = 275 x 1A + x 2A + x 3A 200 x 1B + x 2B + x 3B 100 x 1C + x 2C + x 3C 350 x ij 0 One of the demand constraints will not be met because there is not enough total supply to meet total demand. If, instead, supply exceeds demand, then the supply constraints would be. General Description of a Transportation Problem In general, a transportation problem is specified by the following information: 1. A set of m supply points from which a good is shipped. Supply point i can supply at most si units. In example 4.1, m = 3, s1 = 150, s2 = 175, and s3 = A set of n demand points to which the good is shipped. Demand point j must receive at least dj units of the shipped good. In example 4.1, n = 3, d1 = 200, d2 = 100 and d3 = Each unit produced at supply point i and shipped to demand point j incurs a variable cost of cij. In the Powerco example, c12 = 8. Let x ij = number of units shipped from supply point i to demand point j then the general formulation of a transportation problem is 7

10 8 Unit 4. Distribution and Network Models i=m j=m min c ij x ij i=1 j=1 j=n x ij = s i j=1 i=m x ij = d i i=1 (j = 1,2,, m) (j = 1,2,, m) x ij 0 (j = 1,2,, m; j = 1,2,, m) Sometimes one or more of the routes in the transportation model may be prohibited. That is, units cannot be transported from a particular source to a particular destination. When this situation occurs, we must make sure that the variable representing that route does not have a value in the optimal solution. This can be accomplished by assigning a very large relative cost as the coefficient of this prohibited variable in the objective function. For example, in our wheat-shipping example, if the route from Mpika to Ndola is prohibited (perhaps because of a rail strike), the variable x1a is given a coefficient of 100 instead of 6 in the objective function, so x1a will equal zero in the optimal solution because of its high relative cost. Alternatively the prohibited variable can be deleted from the model formulation. Computer Solution of a Transportation Problem Because a transportation problem is formulated as a linear programming model, it can be solved with Excel. We will first demonstrate how to solve a transportation problem by using Excel. A transportation problem must be solved in Excel as a linear programming model, using Solver. Figure 4.2. Transportation network solution for wheat shipping example

11 Exercise 1. A company supplies goods to three customers, who each require 30 units. The company has two warehouses. Warehouse 1 has 40 units available, and warehouse 2 has 30 units available. The costs of shipping 1 unit from warehouse to customer are shown in Table below. There is a penalty for each unmet customer unit of demand: With customer 1, a penalty cost of $90 is incurred; with customer 2, $80; and with customer 3, $110. Formulate a balanced transportation problem to minimize the sum of shortage and shipping costs. To From Customer 1 Customer 2 Customer 3 Warehouse 1 $15 $35 $25 Warehouse 2 $10 $50 $40 2. A company imports goods at two ports: Philadelphia and New Orleans. Shipments of one product are made to customers in Atlanta, Dallas, Columbus, and Boston. For the next planning period, the supplies at each port, customer demands, and shipping costs per case from each port to each customer are as follows: CUSTOMERS PORT Atlanta Dallas Columbus Boston Port Supply PHILADELPHIA NEW ORLEANS DEMAND

12 10 Unit 4. Distribution and Network Models The Transshipment Model The transshipment model is an extension of the transportation model in which intermediate transshipment points are added between the sources and destinations. An example of a transshipment point is a distribution center or warehouse located between plants and stores. THE TRANSSHIPME NT MODEL INCLUDES INTERMEDIAT E POINTS BETWEEN SOURCES AND DESTINATIONS. In a transshipment problem, items may be transported from sources through transshipment points on to destinations, from one source to another, from one transshipment point to another, from one destination to another, or directly from sources to destinations, or some combination of these alternatives. In what follows, we define a supply point to be a point that can send goods to another point but cannot receive goods from any other point. Similarly, a demand point is a point that can receive goods from other points but cannot send goods to any other point. A transshipment point is a point that can both receive goods from other points and send goods to other points. Example 4.2 We will expand our wheat shipping example to demonstrate the formulation of a transshipment model. Wheat is harvested at farms in Kabwe and Chibombo before being shipped to the three grain elevators in Mpika, Serenje, and Chisamba, which are now transshipment points. The amount of wheat harvested at each farm is 300 tons. The wheat is then shipped to the mills in Ndola, Livingstone, and Lusaka. The shipping costs from the grain elevators to the mills remain the same, and the shipping costs from the farms to the grain elevators are as follows: Grain Elevator Farm 3. MPIKA 4. SERENJE 5. CHISAMBA 1. Kabwe $16 $10 $12 2. Chibombo $15 $14 $17 Figure 4.3. Network of trans-shipment routes

13 As with the transportation problem, a linear programming model is developed with supply and demand constraints. The available supply constraints for the farms in Kabwe and Chibombo are x 13 + x 14 + x 15 = 300 x 23 + x 24 + x 25 = 300 The demand constraints at the Ndola, Livingstone, and Lusaka mills are x 36 + x 46 + x 56 = 200 x 37 + x 47 + x 57 = 100 x 38 + x 48 + x 58 = 300 Next we must develop constraints for the grain elevators (i.e., transshipment points) at Mpika, Serenje, and Chisamba. To develop these constraints we follow the principle that at each transshipment point, the amount of grain shipped in must also be shipped out. For example, the amount of grain shipped into Mpika is and the amount shipped out is x 13 + x 23 x 36 + x 37 + x 38 Thus, because whatever is shipped in must also be shipped out, these two amounts must equal each other: or x 13 + x 23 = x 36 + x 37 + x 38 x 13 + x 23 x 36 x 37 x 38 = 0 11

14 12 Unit 4. Distribution and Network Models The transshipment constraints for Serenje and Chisamba are constructed similarly: x 14 + x 24 x 46 x 47 x 48 = 0 x 15 + x 25 x 56 x 57 x 58 = 0 The complete linear programming model, including the objective function, is summarized as follows: Maximize z = 16x x x x x x x x x x x x x x x 58 Subject to x 13 + x 14 + x 15 = 300 x 23 + x 24 + x 25 = 300 x 36 + x 46 + x 56 = 200 x 37 + x 47 + x 57 = 100 x 38 + x 48 + x 58 = 300 x 13 + x 23 x 36 x 37 x 38 = 0 x 14 + x 24 x 46 x 47 x 48 = 0 x 15 + x 25 x 56 x 57 x 58 = 0 x ij 0 Figure 4.4. Trans-shipment network solution for wheat shipping example

15 4.3.0 The Assignment Model Assignment model An assignment model is for a special form of transportation problem in which all supply and demand values equal one. The assignment model is a special form of a linear programming model that is similar to the transportation model. There are differences, however. In the assignment model, the supply at each source and the demand at each destination are each limited to one unit. The following example will demonstrate the assignment model. Example 4.3 The Zone Six Games has four basketball games on a particular night. The conference office wants to assign four teams of officials to the four games in a way that will minimize the total distance traveled by the officials. The supply is always one team of officials, and the demand is for only one team of officials at each game. The distances in miles for each team of officials to each game location are shown in the following table: The travel distances to each game for each team of officials Game Sites Officials OYDC NASDEC ISL UNZA A B C D The linear programming formulation of the assignment model is similar to the formulation of the transportation model, except all the supply values for each source equal one, and all the demand values at each destination equal one. Thus, our example is formulated as follows: Minimize z = 210x AO + 90x AN + 180x AI + 160x AU + 100x BO + 70x BN + 130x BI + 200x BU + 175x CO CN + 140x CI + 170x Cu + 80x DO + 65x DN + 105x DI + 120x DC Subject to x AO + x AN + x AI + x AU = 1 x BO + x BN + x BI + x BU = 1 x CO + x CN + x CI + x CU = 1 x DO + x DN + x DI + x DU = 1 x AO + x BO + x CO + x DO = 1 x AN + x BN + x CN + x DN = 1 13

16 14 Unit 4. Distribution and Network Models x AI + x BI + x CI + x DI = 1 x AU + x BU + x CU + x DU = 1 x ij 0 This is a balanced assignment model. An unbalanced model exists when supply exceeds demand or demand exceeds supply. Computer Solution of an Assignment Problem Figure 4.5. Assignment network solution for games officials example Problems 1. Five employees are available to perform four jobs. The time it takes each person to perform each job is given in the table below. Determine the assignment of employees to jobs that minimizes the total time required to perform the four jobs. 2. Doc Councillman is putting together a relay team for the 400- meter relay. Each swimmer must swim 100 meters of breaststroke, backstroke, butterfly, or freestyle. Doc believes that each swimmer will attain the times given below. To minimize the

17 team s time for the race, which swimmer should swim which stroke? The Shortest Route Problem Example 4.4 In this section we consider a problem in which the objective is to determine the shortest route, or path, between two nodes in a network. We will demonstrate the shortest-route problem by considering the situation facing Powerco Energy Company. Suppose that when power is sent from plant 1 (node 1) to city 1 (node 6), it must pass through relay substations (nodes 2 5). For any pair of nodes between which power can be transported, Figure 4.6 gives the distance (in miles) between the nodes. Thus, substations 2 and 4 are 3 miles apart, and power cannot be sent between substations 4 and 5. Powerco wants the power sent from plant 1 to city 1 to travel the minimum possible distance, so it must find the shortest path in Figure 4.6 that joins node 1 to node 6. Figure 4.6 A key to developing a model for the shortest-route problem is to understand that the problem is a special case of the trans-shipment problem. Specifically, the Powerco shortest route problem can be viewed as a trans-shipment problem with one origin node (node 1), one 15

18 16 Unit 4. Distribution and Network Models destination node (node 6), and four trans-shipment nodes (nodes 2, 3, 4, and 5). To find the shortest route between node 1 and node 6, think of node 1 as having a supply of 1 unit and node 6 as having a demand of 1 unit. Let x ij denote the number of units that flow or are shipped from node i to node j. Because only 1 unit will be shipped from node 1 to node 6, the value of x ij will be either 1 or 0. Thus, if x ij = 1, the arc from node i to node j is on the shortest route from node 1 to node 6; if x ij = 0, the arc from node i to node j is not on the shortest route. Because we are looking for the shortest route between node 1 and node 6, the objective function for the Powerco problem is min z = 4x x x x x x x 56 To develop the constraints for the model, we begin with node 1. Because the supply at node 1 is 1 unit, the flow out of node 1 must equal 1. Thus, the constraint for node 1 is written x 12 + x 13 = 1 For trans-shipment nodes 2, 3, 4, and 5, the flow out of each node must equal the flow into each node; thus, the flow out minus the flow in must be 0. The constraints for the four trans-shipment nodes are as follows: Flow in = Flow out Node 2 x 12 = x 24 + x 25 Node 3 x 13 = x 35 Node 4 x 24 = x 46 Node 5 x 25 + x 35 = x 56 Because node 6 is the destination node with a demand of one unit, the flow into node 6 must equal 1. Thus, the constraint for node 6 is written as x 46 + x 56 = 1 Including the negative constraints x ij 0 for all i and j, the linear programming model for the Powerco shortest-route problem is shown below min z = 4x x x x x x x 56 s.t x 12 + x 13 = 1 x 46 + x 56 = 1 x 12 x 24 x 25 = 0 x 13 x 35 = 0 x 24 x 46 = 0 x 25 + x 35 x 56 = 0

19 x ij 0 where i = 1,2,34,5 and j = 2,3,4,5, The Maximal Flow Problem In the shortest route problem we determined the shortest route from the origin to six destinations. However, there are network problems in which the branches of the network have limited flow capacities. The objective of these networks is to maximize the total amount of flow from an origin to a destination. These problems are referred to as maximal flow problems. The objective in a maximal flow problem is to determine the maximum amount of flow (vehicles, messages, fluid, etc.) that can enter and exit a network system in a given period of time. In this problem, we attempt to transmit flow through all arcs of the network as efficiently as possible. The amount of flow is limited due to capacity restrictions on the various arcs of the network. For example, highway types limit vehicle flow in a transportation system, whereas pipe sizes limit oil flow in an oil distribution system. The maximum or upper limit on the flow in an arc is referred to as the flow capacity of the arc. Even though we do not specify capacities for the nodes, we do assume that the flow out of a node is equal to the flow into the node. Example 4.5 Consider the north south interstate highway system passing through Cincinnati, Ohio. The north south vehicle flow reaches a level of 15,000 vehicles per hour at peak times. Due to a summer highway maintenance program, which calls for the temporary closing of lanes and lower speed limits, a network of alternate routes through Cincinnati has been proposed by a transportation planning committee. The alternate routes include other highways as well as city streets. Because of differences in speed limits and traffic patterns, flow capacities vary, depending on the particular streets and roads used. The proposed network with arc flow capacities is shown in Figure 4.7. Figure

20 18 Unit 4. Distribution and Network Models The direction of flow for each arc is indicated, and the arc capacity is shown next to each arc. Note that most of the streets are one-way. However, a two-way street can be found between nodes 2 and 3 and between nodes 5 and 6. In both cases, the capacity is the same in each direction. We will show how to develop a capacitated trans-shipment model for the maximal flow problem. First, we will add an arc from node 7 back to node 1 to represent the total flow through the highway system. Figure 4.8 Figure 4.8 shows the modified network. The newly added arc shows no capacity; indeed, we will want to maximize the flow over that arc. Maximizing the flow over the arc from node 7 to node 1 is equivalent to maximizing the number of cars that can get through the north south highway system passing through Cincinnati. The decision variables are as follows: x ij = amount of traffic flow from node i to node j

21 The objective function that maximizes the flow over the highway system is Max x 71 As with all trans-shipment problems, each arc generates a variable and each node generates a constraint. For each node, a conservation of flow constraint represents the requirement that the flow out must equal the flow in. For node 1, the flow out is x 12 + x 13 + x 14, and the flow in is x 71. Therefore, the constraint for node 1 is x 12 + x 13 + x 14 = x 71, The conservation of flow constraints for the other six nodes are developed in a similar fashion: Flow Out Flow In Node 2 x 23 + x 25 = x 12 + x 32 Node 3 x 32 + x 34 = x 35 + x 36 + x 13 + x 23 Node 4 x 46 + x 14 = x 34 Node 5 x 56 + x 57 = x 25 + x 35 + x 65 Node 6 x 65 + x 67 + x 36 = x 46 + x 56 Node 7 x 71 + x 57 = x 67 Additional constraints are needed to enforce the capacities on the arcs. These 14 simple upper-bound constraints are given: x 12 5 x 13 6 x 14 5 x 23 2 x 25 3 x 32 2 x 34 3 x 35 3 x 36 7 x 46 5 x 56 1 x 57 8 x 65 1 x 67 7 Note that the only arc without a capacity is the one we added from node 7 to node 1. The solution to this 15-variable, 21-constraint linear programming problem is shown in Figure 4.9. We note that the value of the optimal solution is 14. This result implies that the maximal flow over the highway system is 14,000 vehicles. Figure 4.9 shows how the vehicle flow is routed through the original highway network. We note, for instance, that 5000 vehicles per hour are routed between nodes 1 and 2, 2000 vehicles per hour are routed between nodes 2 and 3, and so on. Figure

22 20 Unit 4. Distribution and Network Models The results of the maximal flow analysis indicate that the planned highway network system will not handle the peak flow of 15,000 vehicles per hour. The transportation planners will have to expand the highway network, increase current arc flow capacities, or be prepared for serious traffic problems. If the network is extended or modified, another maximal flow analysis will determine the extent of any improved flow. Exercise 1. Find the shortest route from node 1 to node 7 in the network shown. 2. Morgan Trucking Company operates a special pickup and delivery service between Chicago and six other cities located in a four-state area. When Morgan receives a request for service, it dispatches a truck from Chicago to the city requesting service as soon as possible. With both fast service and minimum travel costs as objectives for Morgan, it is important that the dispatched truck take the shortest route from Chicago to the specified city. Assume that the following network (not drawn to scale) with distances given in miles represents the highway network for this problem. Find the shortest-route distance from Chicago to node 6.

23 3. A long-distance telephone company uses a fiber-optic network to transmit phone calls and other information between locations. Calls are carried through cable lines and switching nodes. A portion of the company s transmission network is shown here. The numbers above each arc show the capacity in thousands of messages that can be transmitted over that branch of the network. To keep up with the volume of information transmitted between origin and destination points, use the network to determine the maximum number of messages that may be sent from a city located at node 1 to a city located at node 7. 21