Sei sulla pagina 1di 13

VEHICLE ROUTING

DELHI DARSHAN





SUBMITTED TO: DR. HITESH ARORA

SHWETA WATTAL
231151
FMG23-C
INTRODUCTION
The assignment problem is one of the fundamental combinatorial optimization problems in the
branch of optimization or operations research in mathematics. It consists of finding a maximum
weight matching in a weighted bipartite graph.
In its most general form, the problem is as follows:
There are a number of agents and a number of tasks. Any agent can be assigned to perform
any task, incurring some cost that may vary depending on the agent-task assignment. It is
required to perform all tasks by assigning exactly one agent to each task and exactly one
task to each agent in such a way that the total cost of the assignment is minimized.

If the number of agents is equal to the number of tasks then the problem is known as balanced or
standard assignment problem. Otherwise, the problem is called unbalanced or non-standard
assignment problem.
Assuming a balanced assignment problem, let the decision be defined as:

= 1,




= 0,

=




Therefore, the assignment problem is given as follows:
=

=1

=1

=1
= 1, = 1,2, . . ( )

=1
= 1, = 1,2, . . ( )

= 0 1,
In assignment problem, each agent shall be given ONE AND ONLY ONE task through which the
cost can be minimized. There can be n! ways of assigning each agent to a task. Aim is to choose
the optimal permutation or assignment and minimize the cost.
Assignment Problems are solved using a procedure called Hungarian Method (founded by
Hungarian Mathematician called Dr. Koenig). It is one of the most efficient algorithm. The
Hungarian Algorithm involves a series of Matrix Reduction until the reduced cost matrix consists
of zeroes in each row and column in such a way that an optimal assignment is reached.
Assignment Problem has a lot practical applications in various situations and business problems.
One of the applications that will be discussed in this report is Vehicular Routing Problem.
















VEHICLE ROUTING PROBLEM
I am organizing a Delhi tour for my cousin coming from Jammu. A cab has been arranged for the
same from Syndicate Taxi Stand in Mayur Vihar. The following places have been selected for the
tour:-
1. Akshardham Temple
2. Red Fort
3. India Gate
4. Qutub Minar
5. Lotus Temple
6. Jantar Mantar
7. Raj Ghat
8. Teen Murti
Gyandeep Apartments, Mayur Vihar Phase-1 will be the place of origin and the final destination
after the tour completes. After consulting, the Taxi Stand owner, I found that he will charge Rs.
7/km for a NON-AC cab while an AC cab will cost Rs. 12/Km. It was essential to route the tour
in order to minimize the cost of the overall journey. The following table shows the distances that
from each of the locations as mentioned above. All values are in KM.


MV AD RF IG QM LT JM RG TM
Mayur Vihar (MV) 0 3 11.5 10 20 13.2 10 7.6 14
Akshardham (AD) 3 0 7.8 8 18 15 8 7.8 13
Red Fort (RF) 10.2 9.1 0 6.7 17 15 5.7 2.8 10
India Gate (IG) 10 8.6 5.7 0 12 11.3 2.7 4.3 4.4
Qutub Minar (QM) 20.3 20 17 11.2 0 9.4 13 15 10
Lotus Temple (LT) 11.2 12.1 13.6 8.6 10 0 11 12 12
Jantar Mantar (JM) 10.7 9.6 5.8 2.8 13 13.6 0 5.5 10
Raj Ghat (RJ) 8 6.8 2.5 6.6 17 14.5 4.3 0 10
Teen Murti (TM) 13.6 12.2 9.3 3.6 10 11.4 10 9.3 0

SCENARIO 1

Let us first consider, a NON AC cab that will cost Rs. 7 per kilometer. The cost matrix
for a non-ac cab is given below:-


Because of such a large matrix, Solver Add-In of Excel was used to get an optimum
solution.
In the Solver, following constraints were added:-

=1
= 1, = 1,2, . .9

=1
= 1, = 1,2, . .9

These are the normal assignment problem constraints. But in our case, another constraint
had to be added in order to ensure that no sub-routing happens i.e. we could go from say
MV to AD but we shouldnt come back from AD-MV as that would not cover all the 9

MV AD RF IG QM LT JM RG TM
MV
99999 21 80.5 70 140 92.4 70 53.2 84.5
AD
21 99999 54.6 56 127.4 105 56 54.6 87.5
RF
71.4 63.7 99999 46.9 119 105 39.9 19.6 71.4
IG
70 60.2 39.9 99999 81.9 79.1 18.9 30.1 30.8
QM
142.1 140 119 78.4 99999 65.8 92.4 107.8 72.8
LT
78.4 84.7 95.2 60.2 70 99999 79.1 81.2 81.9
JM
74.9 67.2 40.6 19.6 89.6 95.2 99999 38.5 70.7
RJ
56 47.6 17.5 46.2 117.6 101.5 30.1 99999 71.4
TM
95.2 85.4 65.1 25.2 72.8 79.8 70 65.1 99999
places and hence will not be called an optimum assignment case. In order to avoid this
scenario, we added another constraint as given below:-

=1
+

=1
1, = 1,2, . .9 = 1,2, .9

The above constraint ensured that, if the cab was routed from Mayur Vihar to Akshardham
then MV-AD would be assigned 1 and if there is a sub-route of AD-MV then that would
also be assigned 1 which would violate the above mentioned condition. We can also not
put equal to one as we are not sure of the kind of assignment that will take place. This
condition was added explicitly for each sub-route. Therefore, the number of constraints for
this function was 36. (8+7+6+5+4+3+2+1)
On Solving the following optimal solution is achieved:-














MV AD RF IG QM LT JM RG TM
MV
0 1 0 0 0 0 0 0 0
AD
0 0 1 0 0 0 0 0 0
RF
0 0 0 0 0 0 0 1 0
IG
0 0 0 0 0 0 0 0 1
QM
0 0 0 0 0 1 0 0 0
LT
1 0 0 0 0 0 0 0 0
JM
0 0 0 1 0 0 0 0 0
RJ
0 0 0 0 0 0 1 0 0
TM
0 0 0 0 1 0 0 0 0
Thus, from the above optimal table the following route is the most cost efficient route:-


1
9


2 6
8

4 7
3
5













Thus the minimum cost incurred for the above optimal assignment is Rs. 392.7

ROUTE
NUMBER
ROUTE KM COST
1 Mayur Vihar Akshardham 3 21
2 Akshardham Red Fort 7.8 54.6
3 Red Fort Raj Ghat 2.8 19.6
4 Raj Ghat Jantar Mantar 4.3 30.1
5 Jantar Mantar India Gate 2.8 19.6
6 India Gate Tree Murti 4.4 30.8
7 Tree Murti Qutub Minar 10.4 72.8
8 Qutub Minar Lotus Temple 9.4 65.8
9 Lotus Temple Mayur Vihar 11.2 78.4
TOTAL 56.1 392.7
MV
AD
LT
IG
TM
RG
JM
RF
QM
SCENARIO 2

Now let us first consider, an AC cab that will cost Rs. 12 per kilometer. The cost matrix
for an AC cab is given below:-


Because of such a large matrix, Solver Add-In of Excel was used to get an optimum
solution.
In the Solver, following constraints were added:-

=1
= 1, = 1,2, . .9

=1
= 1, = 1,2, . .9

These are the normal assignment problem constraints. But in our case, another constraint
had to be added in order to ensure that no sub-routing happens i.e. we could go from say
MV to AD but we shouldnt come back from AD-MV as that would not cover all the 9

MV AD RF IG QM LT JM RG TM
MV
99999 36 138 120 240 158.4 120 91.2 162
AD
36 99999 93.6 96 218.4 180 96 93.6 150
RF
122.4 109.2 99999 80.4 204 180 68.4 33.6 122.4
IG
120 103.2 68.4 99999 140.4 135.6 32.4 51.6 52.8
QM
243.6 240 204 134.4 99999 112.8 158.4 184.8 124.8
LT
134.4 145.2 163.2 103.2 120 99999 135.6 139.2 140.4
JM
128.4 115.2 69.6 33.6 153.6 163.2 99999 66 121.2
RJ
96 81.6 30 79.2 201.6 174 51.6 99999 122.4
TM
163.2 146.4 111.6 43.2 124.8 136.8 120 111.6 99999
places and hence will not be called an optimum assignment case. In order to avoid this
scenario, we added another constraint as given below:-

=1
+

=1
1, = 1,2, . .9 = 1,2, .9

The above constraint ensured that, if the cab was routed from Mayur Vihar to Akshardham
then MV-AD would be assigned 1 and if there is a sub-route of AD-MV then that would
also be assigned 1 which would violate the above mentioned condition. We can also not
put equal to one as we are not sure of the kind of assignment that will take place. This
condition was added explicitly for each sub-route. Therefore, the number of constraints for
this function was 36. (8+7+6+5+4+3+2+1)
On Solving the following optimal solution is achieved:-














MV AD RF IG QM LT JM RG TM
MV
0 1 0 0 0 0 0 0 0
AD
0 0 1 0 0 0 0 0 0
RF
0 0 0 0 0 0 0 1 0
IG
0 0 0 0 0 0 0 0 1
QM
0 0 0 0 0 1 0 0 0
LT
1 0 0 0 0 0 0 0 0
JM
0 0 0 1 0 0 0 0 0
RJ
0 0 0 0 0 0 1 0 0
TM
0 0 0 0 1 0 0 0 0
Thus, from the above optimal table the following route is the most cost efficient route:-


1
9


2 6
8

4 7
3
5













Thus the minimum cost incurred for the above optimal assignment is Rs. 673.2

ROUTE
NUMBER
ROUTE KM COST
1 Mayur Vihar Akshardham 3 36
2 Akshardham Red Fort 7.8 93.6
3 Red Fort Raj Ghat 2.8 33.6
4 Raj Ghat Jantar Mantar 4.3 30.1
5 Jantar Mantar India Gate 2.8 51.6
6 India Gate Tree Murti 4.4 52.4
7 Tree Murti Qutub Minar 10.4 124.8
8 Qutub Minar Lotus Temple 9.4 112.8
9 Lotus Temple Mayur Vihar 11.2 134.4
TOTAL 56.1 673.2
MV
AD
LT
IG
TM
RG
JM
RF
QM

CONCLUSION
It can be concluded from both the scenarios that there is no change in the route followed by the
cab even the price is increased from Rs. 7 to Rs. 12. This is because the optimum route as found
in the solution by solver takes the minimum distance while also minimizing the cost. Hence even
though the price changes, the KMs or the distance between the locations remain the same.
The overall change in the price when shifted from a NON-AC cab to an AC cab is Rs. 280.5.
However, it may be noted that such problems are usually solved manually because of such large
number of constraints to be included in the solver. Here we have considered only sub-routes of
length 2 (MV-AD and AD-MV). As the number of rows and columns in the cost matrix increases,
these constraints will also increase because we would have to consider all possible lengths of sub-
routes (MV-AD, AD-IG, IG-MV; MV-AD, AD-IG, IG-JM, JM-MV etc). Thus the number of
constraints will increase exponentially with the increase in the possible routes.
Thus assignment problem helped to find the best optimal route for the tour DELHI DARSHAN
while paying the least possible cost. Practical problems pertaining to both personal as well as
business use can be easily solved using this technique.




NON-AC CAB SOLVER SCREENSHOT





AC CAB SOLVER SCREENSHOT

Potrebbero piacerti anche