Sunteți pe pagina 1din 11

INSTITUTO TECNOLÓGICO Y DE ESTUDIOS

SUPERIORES DE MONTERREY

CAMPUS ESTADO DE MÉXICO

HW#7: Shortest-path algorithms: Dijkstra, and Multi-label


(multi-objective)”

Design & Improvement of Logistics Systems

Profesor: Dr. Luis Enrique Herrera

Team members

Cesar Vazquez Arzate A01370849


Rodrigo Villanueva Vargas A01371184
José Antonio López Torres A01372388

Due Date: 12/03/2019


Business scenario
Two of the United States’ most visited national parks are Yellowstone National Park (located mostly in
Wyoming) and Yosemite National Park (located in California). Like many other national parks, Yellowstone
and Yosemite are located away from major cities and thoroughfares, so that driving to and from either
one may involve either roundabout travel or travel on small, slower roadways.

A company specializing in nature tours offers two-location camping trips at Yellowstone and Yosemite.
Costumers drive to their choice of either of the two parks, and the company provides tours of the parks,
as well as bus service between the parks. Every few days a bus drives from one park to the other. A bus
from Yosemite to Yellowstone, for example, might have some Yosemite-based campers on their way to
the second part of their tour, and also some Yellowstone-based campers who are heading back at the end
of their tour.

Using the Rand McNally road atlas, the company has identified all of the major roads that might be used
as part of the bus route between the two parks. The roads include, in decreasing order of size and speed,
interstate highways, U.S. highways, and state highways. Interstates highways are denoted by an “I” before
the highway number, U.S. highways by “US” before the highway number, and state highways by the state’s
abbreviation (for example, “CA”) before the highway number. A map of the highways, as well as a table
of the city-to-city connections, is included below.

The company’s transportation director is unsure of the best path for the tour buses to take. Being a new,
financially shaky company, they purchased older, heavily used buses. Therefore, minimizing the mileage
of the buses travel is an important consideration. On the other hand, if the shortest mileage path results
in longer travel times, then the company’s costumers might be dissatisfied, so minimizing the travel time
is also an important consideration. Furthermore, the company is also considering a security factor
associated to each route. This factor reflects the percentage of trips that travel safely, hence a route with
a higher security factor is preferred.
Part I (4 pts)
In the data in the table and map, we assume that travel distances and times are the same both directions
along each arc. Is this a reasonable assumption? Why or why not? Based on this assumption, explain why,
if you have found a shortest path from Yellowstone to Yosemite, reversing the path gives the shortest
path from Yosemite to Yellowstone. Provide an exhaustive and comprehensive explanation and
discussion. Simple and plain answers will severely affect your grade.

After discussing, the team concludes that the travel distances along each arc in both directions may differ
a bit in terms of distances, because the roads are built based on geography of the area in which they are
going to be built as well as in the relief of the land. For example, if in the area where is planned to build a
road, there are mountainous areas, sometimes it is preferable to surround that bodies instead of doing
slopes on it. The members of the team think that although the distance may change a little, the difference
between the original path and the reversing path is minimum, so both paths are almost the same.

The thing is different if it is talked about the travel times since different to what happens with the
distances, the travel times possibly differs a lot. The travel time depends of many factors. For example,
the traffic to go to Yosemite and the traffic to go to Yellowstone may vary based on the tourist interest
generated by each park, suppose that Yosemite generates more tourist interest, this would have as
consequence an increase in the traffic of the route and by it will also increase the travel time.

The structure of the roads also affects the travel time. For example, if the road has many slopes or difficult
curves, the transports should reduce their velocity to avoid accidents, having this as consequence an
increase over travel time.

In general terms, the team think that if the shortest path (only distance) from Yellowstone to Yosemite is
reversed, it could be obtained the shortest path from Yosemite to Yellowstone.

To prove the previous statement, there were created two GAMS programs to calculate the shortest
mileage route of both paths, one for the original path and the other for the reversed path. Below there
can be find both GAMS Programs.

Figure 1. Original Path GAMS Program


Figure 2. Original Path GAMS Solution

Figure 3. Reversed Path GAMS Program

Figure 4. Reversed Path GAMS Solution


Part II (12 pts)
Using the Bellman-Ford algorithm (do some research), calculate the shortest-mileage route between
Yellowstone and Yosemite.

Show ALL your work. Provide documentation of all iterations of your algorithmic solution. A simple answer
and path indication in a map will not suffice and your grade will be severely affected.

The Bellman Ford Algorithm is a relaxation algortihm used to compute shortest paths from a single source
node to all the other nodes in a weighten diagraph, it can be used even if there exist negative weights in
the diagraph. “One might ask how negative weights make sense. If talking about distances on a map, they
probably do not, but various other problems reduce to shortest paths, and in these reductions negative
weights show up.” (Acar, 2013)

Bellman Ford can work with negative weights as it considers all the edges during relaxation, relaxation
takes |V|-1 rounds. When this algorithm is used, if a negative weight cycle is detected, it means that there
isn’t a solution for the diagraph.

The Bellman algorithm works as follows:

𝐼𝑓 (𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒[𝑈] + 𝐶𝑜𝑠𝑡𝑂𝑓𝐸𝑑𝑔𝑒(𝑈, 𝑉) < 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒[𝑉] → 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒[𝑉] = 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒[𝑈] + 𝐶𝑜𝑠𝑡𝑂𝑓𝐸𝑑𝑔𝑒(𝑈, 𝑉)

Below it could be found the process that it was followed in order to find the Shortest Mileage Route
between Yellowstone and Yosemite using the Bellman-Ford Algorithm.

Figure 5. Shortest Mileage Route Calculation

The shortest mileage route is of 859 miles, the optimum path is showed below:

1.Yellowstone3.IdahoFalls8.TwinFalls10.Wells11.Ely13.Bishop15.Yosemite
Part III (12 pts)
What property do the arcs in this problem possess that allows Dijkstra’s to be used? Using the Dijkstra’s
algorithm, calculate the shortest-time route between Yellowstone and Yosemite.

Show ALL your work. Provide documentation of all iterations of your algorithmic solution. A simple answer
and path indication in a map will not suffice and your grade will be severely affected.

Dijkstra’s algorithm is like Bellman Ford Algorithm, in fact it is the same formula, but it differs in the way
it is used. Dijkstra’s algorithm is faster than Bellman Ford as it makes the relaxation in a clever way, always
relaxing the edges from the vertex which is closest to the source. (Panda, 2015)

In this case Dijkstra’s Algorithm can be used due to the positive weight of the edges, if the weight of the
edges were negative, the algorithm couldn’t be used so the Bellman Ford algorithm would be used.

Below it could be found the process that it was followed in order to find the Shortest Time Route between
Yellowstone and Yosemite using the Dijkstra’s Algorithm.

Figure 6. Shortest Time Route Calculation

The shortest time route is of 936 minutes, the optimum path is showed below:

1.Yellowstone3.IdahoFalls8.TwinFalls10.Wells9.Winnemuca12.Reno15.Yosemite
Part IV (15 pts)
Continue using the Dijkstra’s algorithm. Only this time use it to find the maximum-security route between
Yellowstone and Yosemite.

Show ALL your work. Provide documentation of all iterations of your algorithmic solution. A simple answer
and path indication in a map will not suffice and your grade will be severely affected.

As per the request, it was used the Dijkstra’s algorithm to find the maximum-security route between
Yellowstone and Yosemite. The process is the same, but it differs because in this case the weights aren’t
added, they are multiplied as the safety factor is a percentage, so it works as a probability.

Below it could be found the process that it was followed in order to find the Maximum-Security Route
between Yellowstone and Yosemite using the Dijkstra’s Algorithm.

Figure 7. Maximum-Security Route Calculation

The maximum-security route has a safety factor or confidence of 14.04%, the optimum path is showed
below:

1.Yellowstone3.IdahoFalls8.TwinFalls10.Wells9.Winnemuca12.Reno15.Yosemite
Part V (40 pts)
Instead of simply minimizing the total distance or the total time, or maximizing the total security of a
particular route, the company might rather strike a balance between the three cost parameters (e.g., by
taking the maximum security route, subject to a time constraint – for example, no more than 18 hours –,
and a distance constraint – for instance, no more than 2000 miles). Recall from class that if we want to
consider more than one cost parameter, we can use the multi-label algorithm. Use the multi-label
algorithm to find the set of paths that the company should consider.

Show ALL your work. Provide documentation of all iterations of your algorithmic solution. A simple answer
and path indication in a map will not suffice and your grade will be severely affected.

Below it could be found the process that it was followed in order to find the optimum Route between
Yellowstone and Yosemite to strike a balance between the three cost parameters using the Multi Objective
Algorithm.

For this problem there were considered the following parameters:


- Time < 18hrs or 1080 min
- Maximum security factor
- Distance < 2000 miles

Figure 8. Multi Objective Algorithm


In this case, although one seeks to maximize one of the factors (security factor), for the other two factors,
it was only required that they remain below the costs established previously. It turns out that distances
and times almost always stayed below the cost’s limits, so the route was commonly defined by the security
factor.

The best route to strike a balance between the three cost parameters route is showed below.

1.Yellowstone3.IdahoFalls8.TwinFalls10.Wells9.Winnemuca12.Reno15.Yosemite

(Time: 936 min, Security Factor: 14.40%, Distance:880 miles)

Part VI (10 pts)


Suppose you are a member of a three-stakeholder decision making team. Create a decision-making
scenario:

1. Assign different rankings to each of the three members. For instance: suppose you are the leader,
hence your vote weights 50%, and the other two team members are equally weighted to 25%
each.

2. Next, for each team member provide a preference profile. For example: You would make your
choice based on the following weighted criteria: 40% security, 20% time and 30% distance.

3. Based on the decision-making scenario, which route would you tentatively recommend, and why?
Provide an exhaustive and comprehensive explanation and discussion. Simple and plain answers
will severely affect your grade.

In this exercise each member of the team represented the head of important areas of a company i.e.
(Customer Service Team Leader, Logistics Team Leader, etc.) Each member stablished a perspective
based on the position they represent.

Member Position Weight Time Security Distance


Customer
César Service
40% 60% 30% 10%
Vázquez Team
Leader
Logistics
Rodrigo
Team 30% 45% 45% 10%
Villanueva
Leader
José Budget &
Antonio Planning 30% 30% 30% 40%
López Leader
Total Weights 46.50% 34.500% 19.000%

Table 1. Preference profile


- César gave more weight to the time since the customers need to reach their destiny as soon as
possible.
- Rodrigo gave the same weight to time and security, he thinks that it security is as important as travel
time.
- José gave more weight to the Distance because he wanted to reduce the costs generated by the
transportation to avoid huge impacts to the budget.

According to the preference profile it was concluded that the most important factor for this problem is
the time with 46.50%, followed by the security with 34.50% and finally by the distance with 19%.

Due to the previous exercises, it is already which are the best paths for each factor, but the team decided
to use the Multi Objective algorithm to validate. The algorithm threw the same results as in the previous
exercises, below it could be found the process that it was followed.

Figure 9. Multi Objective Algorithm

There are two paths to follow R1 in which the time is minimized, and the security maximized, and R2 in
which the distance is minimized. Below it is showed a diagraph with the resulting weights of each route.
Figure 10. Possible Routes

Based on the preference profile, it was defined that the best route to follow is R1 as time and security
have higher weights than distance. The path to follow is showed below:

1.Yellowstone3.IdahoFalls8.TwinFalls10.Wells9.Winnemuca12.Reno15.Yosemite

(Time: 936 min, Security Factor: 14.40%, Distance:880 miles)

Definitively this route is the best as in this one the time and security are optimized, and the distance it is
not too different to the optimum. By following this route, the members of the decision support system
were satisfied as costs will surely be reduced and the customers will be satisfied due to their fast and
safety travel, having this as consequence obtaining their confidence and loyalty.

References

Chopra, S., & Peter, M. (2013). Administración de la Cadena de Suministros. Naucalpan de Juaréz:
Pearson.

Demaine, E. (s.f.). Shortest Paths II. Obtenido de


https://courses.csail.mit.edu/6.006/spring11/lectures/lec15.pdf

Lecture 13-Shortest Weighted Paths II. (2013). En A. Umut, Partallel and Sequential Data Structures and
Algorithms.

Panda, T. (4 de December de 2015). Quora. Obtenido de Quora: https://www.quora.com/What-is-the-


difference-between-Dijkstra-and-bellman-ford

S-ar putea să vă placă și