You are on page 1of 8

Examples

Problem 1
In this issue, we will see how the algorithm responds when there are 5 clients. In
this case, we will leave the time constraints very lax to check if the algorithm works
correctly for multiple clients and selecting the locations closer to the depot when
temporary windows play no role. The problem has the following data shown in the
Table.

Table 1
The cost of the solution is 15.98 units and the runtime is 4.45 seconds. Below is a chart
with the proposed solution:
Illustration 1

Problem 2
This issue is the same as above, but with a larger number of clients, in this case
10 clients, totaling 20 nodes in the resolution.
The problem data is in the following table, Table 2.
Table 2
The cost is 87.60 and the runtime is 23.36 seconds. Compared to Problem 1, this
one has twice as many customers, but the runtime is five times longer, so you can see
that the problem is actually NP-hard.
The graph with the solution displayed visually can be found on the next page.
Illustration 2
Problem 3
In this problem we will check with 2 customers, if the algorithm meets the two
additional main restrictions of VRPMD regarding the usual VRP issues, that is: that you
only visit one node for each client and that you respect the temporary visit windows.
The data for this issue are as follows:

Tabla 3
The solution is shown below:

Illustration 3
It can be observed that the solution is a single route [0 2 4]. The cost of this
solution is 17.79 units and the runtime was 2.15 seconds.
Let's examine what would be all the admissible solutions to this problem:

Table 4
It can be seen that the solution found by the algorithm, the fourth in the table, is
indeed the lowest cost.
Looking at the problem graph, we could think that the solution that includes
nodes 1-4 could be the one with the lowest cost, but if we look at the restrictions in
terms of time windows, we see that it would be necessary to make two different routes,
leaving and returning to the depot in each of them.
Problem 4
Now we solve a problem with the same clients and locations as in Problem 2 but we
will make each client have in its two nodes, different time windows. In this way, we can
model the real situation of distribution of goods to different customers and that each of
them is in a different geographical location depending on the stretch of the day.
The problem data are as follows:

Table 5
The cost of the solution is 119.24 units and is higher than the cost of Problem 2,
as Problem 4 is more restrictive in terms of time windows.
Because of restrictions in the clients' time windows, it is not possible to visit
them all on one route, having to make three departures, as shown in the graph below,
where each route is drawn in a different color.
Illustration 4
The execution time was 10.26 seconds. The routes and the corresponding nodes
are the following:
Route 1: 12 – 20 – 16 – 18 – 4
Route 2: 8 – 14 – 2 – 6
Route 3: 10

You might also like