Math project final 1

13
VIET VIET VIET VIET NAM NAM NAM NAM NATIONAL NATIONAL NATIONAL NATIONAL UNIVERSITY UNIVERSITY UNIVERSITY UNIVERSITY UNIVERSITY UNIVERSITY UNIVERSITY UNIVERSITY OF OF OF OF ECONOMICS ECONOMICS ECONOMICS ECONOMICS AND AND AND AND BUSINESS BUSINESS BUSINESS BUSINESS FACULTY FACULTY FACULTY FACULTY OF OF OF OF BUSINESS BUSINESS BUSINESS BUSINESS ADMINISTRATION ADMINISTRATION ADMINISTRATION ADMINISTRATION Math Math Math Math Project Project Project Project : The The The The Shortest Shortest Shortest Shortest Route Route Route Route Problem Problem Problem Problem Case Case Case Case Study Study Study Study in in in in ABC ABC ABC ABC Shipping Shipping Shipping Shipping Company Company Company Company Group1: Đặng Thị Liên Đoàn Duy Tiến Bùi Thị Phương Loan Đỗ Như Chinh

Transcript of Math project final 1

Page 1: Math project final 1

VIETVIETVIETVIET NAMNAMNAMNAM NATIONALNATIONALNATIONALNATIONAL UNIVERSITYUNIVERSITYUNIVERSITYUNIVERSITY

UNIVERSITYUNIVERSITYUNIVERSITYUNIVERSITY OFOFOFOF ECONOMICSECONOMICSECONOMICSECONOMICS ANDANDANDAND BUSINESSBUSINESSBUSINESSBUSINESS

FACULTYFACULTYFACULTYFACULTY OFOFOFOF BUSINESSBUSINESSBUSINESSBUSINESS ADMINISTRATIONADMINISTRATIONADMINISTRATIONADMINISTRATION

MathMathMathMath ProjectProjectProjectProject :::: TheTheTheThe ShortestShortestShortestShortest RouteRouteRouteRoute ProblemProblemProblemProblem

CaseCaseCaseCase StudyStudyStudyStudy inininin ABCABCABCABC ShippingShippingShippingShipping CompanyCompanyCompanyCompany

Group1:

Đặng Thị Liên

Đoàn Duy Tiến

Bùi Thị Phương Loan

Đỗ Như Chinh

Page 2: Math project final 1

Table of content:Table of content:........................................................................................................................................... 2

I. Introduction of the Shortest Route Problem............................................................................................. 3

II. Math model & Method............................................................................................................................. 4

III. The Shortest Route Solution.....................................................................................................................5

1. Using the shortest route technique...................................................................................................... 5

2. Using linear programing method & QM for window.......................................................................... 12

3. Using Shortest route method in QM for Window...............................................................................14

IV. Conclusion..............................................................................................................................................16

Table of figures:Figure 1: Ha Tay routes..................................................................................................................................2

Figure 2: Network of shipping route............................................................................................................. 3

Figure 3: Network with node 1 in the permanent set...................................................................................5

Figure 4: Network with nodes 1 and 3 in the permanent set....................................................................... 6

Figure 5: Network with nodes 1, 2, and 3 in the permanent set.................................................................. 7

Figure 6: Network with nodes 1, 2, 3, and 4 in the permanent set.............................................................. 8

Figure 7: Network with nodes 1, 2, 3, 4, and 6 in the permanent set.......................................................... 9

Figure 8: Network with nodes 1, 2, 3, 4, 5, and 6 in the permanent set.....................................................10

Figure 9: Network with optimal routes from Phuc Tho to all destinations.................................................10

Figure 10: QM solution for linear programing method...............................................................................13

Figure 11: Data table in QM shortest route method.................................................................................. 14

Figure 12: QM solution for shortest route method.................................................................................... 15

Figure 13: QM solution for any node (example - node 5)...........................................................................15

Page 3: Math project final 1

IIII.... IntroductionIntroductionIntroductionIntroduction ofofofof thethethethe ShortestShortestShortestShortest RouteRouteRouteRoute Problem.Problem.Problem.Problem.The ABC Shipping Company transports oranges by six trucks from Phuc Tho to six

other districsts in Ha Tay. The different routes between Phuc Tho and the destinationdistricts and the distance, in km between those districts to travel each route are shownin Figure 1.

Figure 1: Ha Tay routes

The shortest route problem is to find the shortest distance between an origin andvarious destination points. The shipping company manager wants to determine the bestroutes (in terms of the distance) for the trucks to take to reach their destinations.

II.II.II.II. MathMathMathMath modelmodelmodelmodel &&&& MethodMethodMethodMethodThis problem can be solved by using the shortest route solution technique. In

applying this technique, it is convenient to represent the system of truck routes as anetwork, as shown in Figure 2.

Page 4: Math project final 1

Figure 2: Network of shipping route

To repeat our objective as it relates to Figure 2, we want to determine the shortestroutes from the origin (node 1) to the six destinations (nodes 2 through 7).

The steps of the shortest route solution method are as follows:

1. Select the node with the shortest direct route from the origin.

2. Establish a permanent set with the origin node and the node that was selected in thefirst step

3. Determine all nodes directly connected to the permanent set nodes.

4. Select the node with the shortest route (branch) from the group of nodes directlyconnected to the permanent set nodes.

5. Repeat steps 3 and 4 until all nodes have joined the permanent set.

We can also solve the shortest route problem with QM for Windows by formulatingand solving the shortest route network as an integer linear programming problem.

In addition, we use the method of shortest route in QM to check the solutions.

III.III.III.III. TheTheTheThe ShortestShortestShortestShortest RouteRouteRouteRoute Solution.Solution.Solution.Solution.1.1.1.1. UsingUsingUsingUsing thethethethe shortestshortestshortestshortest routerouterouteroute techniquetechniquetechniquetechnique.

Page 5: Math project final 1

We begin the shortest route solution technique by starting at node 1 (the origin) anddetermining the shortest distance required to get to a directly connected node. Thethree nodes directly connected to node 1 are 2, 3, and 4, as shown in Figure 3

Of these three nodes, the shortest distance is 9 km to node 3. Thus, we havedetermined our first shortest route from nodes 1 to 3 (i.e., from Phuc Tho to ThachThat). We will now refer to nodes 1 and 3 as the permanent set to indicate that we havefound the shortest route to these nodes. (Because node 1 has no route to it, it isautomatically in the permanent set.)

Figure 3: Network with node 1 in the permanent set

So we determine the initial shortest route from the origin (node 1) to the closestnode (3)

Notice in Figure 3 that the shortest route to node 3 is drawn with a heavy line, andthe shortest time to node 3 (9 km) is enclosed by a box. The table accompanying Figure3 describes the process of selecting the shortest route. The permanent set is shown tocontain only node 1. The three branches from node 1 are 12, 14, and 13, and this lastbranch has the minimum distance of 9 km.

Next, we will repeat the foregoing steps used to determine the shortest route tonode 3. First, we must determine all the nodes directly connected to the nodes in thepermanent set (nodes 1 and 3). Nodes 2, 4, and 6 are all directly connected to nodes 1and 3, as shown in Figure 4.

Page 6: Math project final 1

Figure 4: Network with nodes 1 and 3 in the permanent set

The next step is to determine the shortest route to the three nodes (2, 4, and 6)directly connected to the permanent set nodes. There are two branches starting fromnode 1 (12 and 14) and two branches from node 3 (34 and 36). The branch with theshortest distance is to node 2, with a distance of 16 km. Thus, node 2 becomes part ofthe permanent set. Notice in our computations accompanying Figure 4 that the distanceto node 6 (branch 36) is 31 km, which is determined by adding the branch 36 distanceof 22 km to the shortest route distance of 9 km at node 3.

As we move to the next step, the permanent set consists of nodes 1, 2, and 3. Thisindicates that we have found the shortest route to nodes 1, 2, and 3. We must nowdetermine which nodes are directly connected to the permanent set nodes. Node 5 isthe only adjacent node not presently connected to the permanent set, so it is connecteddirectly to node 2. In addition, node 4 is now connected directly to node 2 (becausenode 2 has joined the permanent set). These additions are shown in Figure 5.

Figure 5: Network with nodes 1, 2, and 3 in the permanent set

Page 7: Math project final 1

Five branches lead from the permanent set nodes (1, 2, and 3) to their directlyconnected nodes, as shown in the table accompanying Figure 7.6. The branchrepresenting the route with the shortest distance is 34, with a distance of 24 km. Thus,we have determined the shortest route to node 4, and it joins the permanent set. Noticethat the shortest distance to node 4 (24 km) is the route from node 1 through node 3.The other routes to node 4 from node 1 through node 2 are longer; therefore, we will notconsider them any further as possible routes to node 4.

To summarize, the shortest routes to nodes 1, 2, 3, and 4 have all been determined,and these nodes now form the permanent set.

Next, we repeat the process of determining the nodes directly connected to thepermanent set nodes. These directly connected nodes are 5, 6, and 7, as shown inFigure 6. Notice in Figure 6 that we have eliminated the branches from nodes 1 and 2 tonode 4 because we determined that the route with the shortest time to node 4 does notinclude these branches.

Figure 6: Network with nodes 1, 2, 3, and 4 in the permanent set

From the table accompanying Figure 6 we can see that of the branches leading tonodes 5, 6, and 7, branch 36 has the shortest cumulative distance, of 31 km. Thus,node 6 is added to our permanent set. This means that we have now found the shortestroutes to nodes 1, 2, 3, 4, and 6.

Repeating the process, we observe that the nodes directly connected (adjacent) toour permanent set are nodes 5 and 7, as shown in Figure 7. (Notice that branch 46 hasbeen eliminated because the best route to node 6 goes through node 3 instead of node4.)

Page 8: Math project final 1

Figure 7: Network with nodes 1, 2, 3, 4, and 6 in the permanent set

Of the branches leading from the permanent set nodes to nodes 5 and 7, branch 45has the shortest cumulative distance, of 38 km. Thus, node 5 joins the permanent set.We have now determined the routes with the shortest distances to nodes 1, 2, 3, 4, 5,and 6 (as denoted by the heavy branches in Figure 7).

The only remaining node directly connected to the permanent set is node 7, asshown in Figure 8. Of the three branches connecting node 7 to the permanent set,branch 47 has the shortest distance, of 43 km. Therefore, node 7 joins the permanentset.

Figure 8: Network with nodes 1, 2, 3, 4, 5, and 6 in the permanent set

The routes with the shortest distance from the origin (node 1) to each of the othersix nodes and their corresponding travel distance are summarized in Figure 9 and thefollowing table.

Page 9: Math project final 1

Figure 9: Network with optimal routes from Phuc Tho to all destinations

From Phuc Tho to: Route Total distance (km)

Hoai Duc (node 2) 12 16

Thach That (node 3) 13 9

Ha Dong ( node 4) 134 24

Thuong Tin (node5) 1345 38

Chuong My (node6) 136 31

Thanh Oai (node 7) 1347 43

2.2.2.2. UsingUsingUsingUsing linearlinearlinearlinear programingprogramingprogramingprograming methodmethodmethodmethod &&&& QMQMQMQM forforforfor windowwindowwindowwindowIn order to formulate the linear programming model, we first define a decision

variable for each branch in the network, as follows:

Xij = 0 if branch ij is not selected as part of the shortest route and 1 if branch ij isselected

To reduce the complexity and size of our model formulation, we will also assume thatitems can flow only from a lower node number to a higher node number (e.g., 3 to 4 butnot 4 to 3). This greatly reduces the number of variables and branches to consider.

Page 10: Math project final 1

The objective function is formulated by minimizing the sum of the products of eachbranch value times the travel distance for each branch:

Minimize Z = 16X12+ 9X13 + 35X14 + 12X24 + 25X25 + 15X34 + 22X36 + 14X45 + 17X46 +19X47 + 8X57 + 14X67

There is one constraint for each node, indicating that whatever comes into a nodemust also go out. This is referred to as conservation of flow. This means that one "truck"leaves node 1 (Phuc Tho) either through branch 12, branch 13, or branch 14. Thisconstraint for node 1 is formulated as

X12 + X13 + X14 = 1

At node 2, a truck would come in through branch 12 and depart through 24 or 25, asfollows:

X12 = X24 + X25

This constraint can be rewritten as X12 - X24 - X25 = 0

Constraints at nodes 3, 4, 5, 6, and 7 are constructed similarly, resulting in the completelinear programming model, summarized as follows:

MinimizeMinimizeMinimizeMinimize ZZZZ ==== 16X16X16X16X12121212++++ 9X9X9X9X13131313 ++++ 35X35X35X35X14141414 ++++ 12X12X12X12X24242424 ++++ 25X25X25X25X25252525 ++++ 15X15X15X15X34343434 ++++ 22X22X22X22X36363636 ++++ 14X14X14X14X45454545 ++++ 17X17X17X17X46464646 ++++19X19X19X19X47474747 ++++ 8X8X8X8X57575757 ++++ 14X14X14X14X67676767

Subject to the constraints:XXXX12121212 ++++ XXXX13131313 ++++ XXXX14141414 ==== 1111

XXXX12121212 –––– XXXX24242424 –––– XXXX25252525 ==== 0000

XXXX13131313 –––– XXXX34343434 –––– XXXX36363636 ==== 0000

XXXX14141414 ++++ XXXX24242424 ++++ XXXX34343434 –––– XXXX45454545 –––– XXXX46464646 –––– XXXX47474747 ==== 0000

XXXX25252525 ++++ XXXX45454545 –––– XXXX57575757 ==== 0000

XXXX36363636 ++++ XXXX46464646 –––– XXXX67676767 ==== 0000

XXXX47474747 ++++ XXXX57575757 ++++ XXXX67676767 ==== 1111

XXXXijijijij ==== 0000 orororor 1111

The QM for Windows solution for the shortest route from node 1 to node 7 for the ABCShipping Company example is shown in Figure 10.

Page 11: Math project final 1

Figure 10: QM solution for linear programing method

The QM solution is shown in Figure 10. Notice that cells X13, X34, and X47 havevalues of 1 in them, indicating that these branches, 13, 34, and 47, are on the shortestroute. The total distance in travel distance is 43 km, as shown in cell RHS.

3.3.3.3. UsingUsingUsingUsing ShortestShortestShortestShortest routerouterouteroute methodmethodmethodmethod inininin QMQMQMQM forforforfor WindowWindowWindowWindow

The data table is shown in Figure 11.

Figure 11: Data table in QM shortest route method

Page 12: Math project final 1

The solution screen in Figure 12 provides the shortest route from the start node, 1(Phuc Tho), to the end node, 7 (Thanh Oai)

Figure 12: QM solution for shortest route method

The shortest route from any node in the network to any other node can bedetermined by indicating the desired origin and destination nodes at the top of thesolution screen. For example, the shortest route from node 1 to node 5 is shown inFigure 13.

Figure 13: QM solution for any node (example - node 5)

IV.IV.IV.IV. ConclusionConclusionConclusionConclusionIn our project, we use two methods to solve the problem of shortest route. The first

is shortest route technique and the second is linear programing method. We also useQM for Windows to check the solution. Generally, both two methods give the samesolution which is similar to the solution from QM. That is the shortest route is from PhucTho (node1) to Thach That (node3) then go to Ha Dong (node4), finally reach ThanhOai (node 7) with total distance of 43km.

Page 13: Math project final 1