school of science and engineering vehicle routing problem routing... · 2016-12-26 · vehicle...
TRANSCRIPT
SCHOOL OF SCIENCE & ENGINEERING – AL AKHAWAYN UNIVERSITY
SCHOOL OF SCIENCE AND ENGINEERING
VEHICLE ROUTING PROBLEM
Capstone Design
EGR 4402 – 01
Final Report
Soufiane Tahri
November 22nd 2016
Approved by the supervisor
_____________________________________________________
Dr. Ilham Kissani
ii
ACKNOWLEDGEMENTS
I have taken efforts in the realization of this project. However, it would not have been
possible without the kind support and help of one particular individual. I am highly indebted to
my capstone supervisor, Dr. Ilham Kissani, Project Manager at AlAkhawayn University, for
her guidance and constant supervision, for providing me with the necessary information
regarding my project as well as her continuous support during the whole semester. I would also
like to thank my coworker Alae Serraj, who helped me getting familiar again with the basics of
C programming language and MATLAB.
iii
Contents
ACKNOWLEDGEMENTS .................................................................................................................................... ii
ABSTRACT ............................................................................................................................................................iv
INTRODUCTION.................................................................................................................................................... 5
ALGORITHMS........................................................................................................................................................ 6
CODING ................................................................................................................................................................ 11
VRP SPREADHEET SOLVER ............................................................................................................................. 14
SCOPE AND LIMITATIONS ........................................................................................................................... 16
STRUCTURE OF THE WORKSHEETS .......................................................................................................... 17
VRP SOLVER CONSOLE ................................................................................................................................ 18
LOCATIONS ................................................................................................................................................. 21
DISTANCES .................................................................................................................................................. 23
VEHICLES .................................................................................................................................................... 23
SOLUTION .................................................................................................................................................... 24
VISUALIZATION ......................................................................................................................................... 25
FUNCTIONS ..................................................................................................................................................... 25
DATA ................................................................................................................................................................. 27
CONCLUSION ...................................................................................................................................................... 29
REFERENCES ....................................................................................................................................................... 30
APPENDICES ....................................................................................................................................................... 31
iv
ABSTRACT
In this paper, our main purpose is to define the Vehicle Routing Problem. The variables
and constraints are analyzed in the algorithm. Using both the algorithms and codes in
MATLAB, we’ll discuss our findings concerning the VRP and the main factors that have an
impact on it. The STEEPLE will also be conducted to determine the relevance of the Vehicle
Routing Problem.
Keywords—Vehicle Routing Problem; variables, constraints, capacity, time; algorithm.
pg. 5
INTRODUCTION
Logistics is concerned with the effective distribution of the total flow of goods, from the
acquisition of raw materials to the delivery of finished products to the final customer. The
Vehicle Routing Problem lies at the heart of distribution management, which is why the object
of this capstone is to produce an optimal delivery or collection routes from one or several depots
to a number of geographically scattered cities or customers, subject to side constraints. For this
objective, multiple algorithms were developed for VRP. These algorithms will be divided into
three categories: direct tree search methods, dynamic programming, and integer linear
programming.
The first part will consist of defining the variables and the constraints of the several
versions of the problem. The variables may be the cost, the distance, the time travelled… and
constraints such as one way route. We will also consider a wide variety of exact and
approximate algorithms that have been proposed for its solution and the creation and alteration
of our own algorithm.
The second part will cover the codes and functions used to develop the VRP using
MATLAB. Both the algorithm and the code may be subject to alteration later on after this report
depending on the feedback.
The third part includes VBA and solving VRPs in Excel spreadsheet.
This is followed by the conclusion and then a number of references which might prove
useful. Finally, Appendices will include the STEEPLE Analysis, the MATLAB code, and the
spreadsheet solver.
pg. 6
ALGORITHMS
A network model is one which can be represented by a set of nodes, a set of arcs, and
functions (e.g. costs, supplies, demands, etc.) associated with the arcs and/or nodes.
Before moving to VRPs, we should get familiar with other basic network problems that
are simpler to get a basic idea about network models. Transportation, assignment,
transshipment, shortest-route, and maximal flow problems are all examples of network
problems.
Each of the five models can be formulated as linear programs and solved by general
purpose linear programming codes.
For each of the five models, if the right-hand side of the linear programming
formulations are all integers, the optimal solution will be in terms of integer values for the
decision variables.
Transportation
The transportation problem seeks to minimize the total shipping costs of transporting
goods from m origins (each with a supply 𝑠𝑖) to n destinations (each with a demand 𝑑𝑗), when
the unit shipping cost from an origin, i, to a destination, j, is 𝑐𝑖𝑗.
Using the notation:
xij = number of units shipped from origin i to destination j
cij = cost per unit of shipping from origin i to destination j
si = supply or capacity in units at origin i
dj = demand in units at destination j
pg. 7
Shortest-Route Problem
The shortest-route problem is concerned with finding the shortest path in a network from
one node (or set of nodes) to another node (or set of nodes).
If all arcs in the network have nonnegative values then a labeling algorithm can be used
to find the shortest paths from a particular node to all other nodes in the network.
The criterion to be minimized in the shortest-route problem is not limited to distance
even though the term "shortest" is used in describing the procedure. Other criteria
include time and cost. (Neither time nor cost are necessarily linearly related to distance.)
Linear Programming Formulation
Using the notation:
xij = 1 if the arc from node i to node j is on the shortest route
0 otherwise
cij = distance, time, or cost associated with the arc from node i to node j
pg. 8
Maximal Flow Problem
The maximal flow problem is concerned with determining the maximal volume of flow
from one node (called the source) to another node (called the sink).
In the maximal flow problem, each arc has a maximum arc flow capacity which limits
the flow through the arc.
A capacitated transshipment model can be developed for the maximal flow problem.
We will add an arc from the sink node back to the source node to represent the total flow
through the network. There is no capacity on the newly added sink-to-source arc. We want to
maximize the flow over the sink-to-source arc.
Linear Programming Formulation:
o There is a variable for every arc.
o There is a constraint for every node; the flow out must equal the flow in.
pg. 9
o There is a constraint for every arc (except the added sink-to-source arc); arc capacity
cannot be exceeded.
o The objective is to maximize the flow over the added, sink-to-source arc.
In order to fulfill the objective of this project, multiple algorithms were developed for VRP.
These algorithms will be divided into three categories: direct tree search methods, dynamic
programming, and integer linear programming. The variables in the algorithms will be as
follow:
V={1,…,n} : set of vertices representing cities with depot as vertex 1
A: set of Arcs; 𝑐𝑖𝑗: travel cost/time ; 𝑚: available vehicles stationed at the depot.
With the following constraints:
Each city in V\{1} is visited exactly once by one vehicle
All vehicles started and end at the depot
Capacity restrictions, CVRPs: a demand 𝑑𝑖 is attached to each city 𝑖 >1
Total time restrictions, DVRPs: a bound 𝐿 is prescribed to routes
Time windows: city 𝑖 must be visited within time interval [𝑎𝑖,𝑏𝑖]
Precedence relations: city 𝑖 has to be visited before city 𝑗
pg. 10
Exact algorithms exist to solve the VRP, but their success in solving realistic instances with
larger size is limited. Direct tree search methods, dynamic programming, and inter linear
programming are the three main types of methods within this category.
Direct tree search methods solve the VRP by sequentially building routes by using a
branch and bound tree. Their algorithm branches on arcs, and branches are created by
either including or excluding an arc in the solution. This resulted in wide search trees
with a limited depth. Only easy or small instances could be solved with these algorithms.
Dynamic programming is an optimization approach that can solve complex problems
by dividing them into a sequence of simpler sub-problems. These sub-problems are
solved in multiple stages so that in each stage a part is added to the partial solution. In
the last stage, the optimal solution is found. The number of stages is the number of nodes
that are available in DP. Each stage can have multiple states, which are partial solutions
of the main problem. The discussed DP algorithm creates only one route and applying
it to the VRP is therefore not straightforward.
Integer linear programming: Vehicle flow formulations are by far the most widely used
among the integer linear programming (ILP) methods. Variables indicating how many
times edge [i,j] appears in the solution are used in the two-index variant. The three-index
variant adds the vehicle making the route to this variable. However, the most successful
VRP algorithms partially use a set partitioning formulation.
We will focus on integer linear programming in the next part. Concerning Vehicle Routing
Problem, we can formulate it as an integer program, the VRP is:
pg. 11
Expression (2) states that a customer must be visited exactly once. Expression (3) states
that if a vehicle visits a customer, it must also depart from it. Expressions (4) and (5) are the
capacity and "cost" limitations on each route. Expression (6) states that a vehicle must be used
exactly once. Expression (7) is the subtour-elimination condition which also forces each route
to pass through the depot; and (8) are the integrality conditions. It is quite clear that the above
formulation is too complex to be useful in solving VRPs of non-trivial size.
CODING
We mainly used MATLAB to test the algorithm developed. Appendix C will refer to
the main function used for developing this code. At first, we used random data to create our
model. After running the program based on iterations, the results displayed are the best cost,
the number of iterations computed to find the best cost, and a graph. However, the graph plotted
pg. 12
still doesn’t display the final path, and we hope we will solve this issue in the nearest time
possible.
Example 1:
Figure 1.1: Example of graph showing the nodes with random data (*)
(*): This plot is not optimal since the best path is not shown clearly.
pg. 13
Figure 1.2: Plot showing the best cost and the number of iteration needed to find it
Example 2:
Figure 2.1: Example of graph showing the nodes with random data (*)
(*): This plot is not optimal since the best path is not shown clearly.
pg. 14
Figure 2.2: Plot showing the best cost and the number of iteration needed to find it
Refer to Appendix C and E for the code and algorithm
VRP SPREADHEET SOLVER
The following VRP Spreadsheet Solver is a free and open source tool for representing,
solving, and visualizing the results of Vehicle Routing Problems developed by Developed by
Dr. Güneş Erdoğan in 2013.
VRP Spreadsheet solver has been designed for simplicity above all. Using the menu
item “VRP Spreadsheet Solver” in the tab “Add-ins” (for Macs, it is under the “Tools” menu),
you may issue the commands in their increasing numerical index, filling in data to each
worksheet as it is generated. This menu is automatically generated when the file is opened, and
deleted when it is closed. If the menu is not available for some reason, you can run the macro
pg. 15
SetupMenuItems to reset it. A step by step guide is given below. Note that GIS based functions
are not available for Mac computers, due to the unavailability of certain VBA libraries.
Enter all relevant data in the “VRP Solver Console” worksheet.
- Execute “1.1 Setup Locations Worksheet” and enter the names, beginning and the end of the
time window, service time, pickup amount, delivery amount, and profit of each location.
- Optionally, you may enter the addresses and execute “1.2 Optional – Populate Lat / Lon using
addresses”. You need a Bing Maps key and an active internet connection to use this function.
- Optionally, you may execute “1.3 Optional – Sort locations alphabetically” for easier access
through the solution worksheet (to be setup later).
- Execute “2.1 Setup Distances Worksheet”, and fill in the distance and duration data, either
manually or by executing “2.2 Optional – Populate Distances Worksheet”. You need a Bing
Maps key and an active internet connection to populate the distances using Bing Maps.
- Execute “3. Setup Vehicles Worksheet” and fill in the vehicle type names, capacity, cost,
distance limit, work start time, driving time limit, working time limit, and fleet size.
- Execute “4. Setup Solution Worksheet”.
- Optionally, you may execute “5. Optional – Setup Visualization Worksheet”. All coordinates
for the locations must be input for this worksheet to be created. You need a Bing Maps key and
an active internet connection to have a static map as the background.
- You may want to manually solve your VRP from this point on, by choosing locations from
the drop down menus (the green cells under the columns “Location name”) in the solution
worksheet. Alternatively, you can execute “6.1 Engage the VRP Spreadsheet Solver” and wait
for the run to end. The longer time you allow the solver, the better the result.
pg. 16
- Check the solution and modify it to suit your objectives. Optionally, you can execute “6.2
Optional – Feasibility Check” function to see if the modified solution is still feasible.
- Optionally, you may invoke an external solver you have developed and compiled into a
Dynamically Linked Library (DLL). This is an advanced feature, requires above average
programming knowledge. More details of how to build this DLL is given in Section 5.12.
Unfortunately, this option is not available for Macs.
- The “Watch the tutorial video on YouTube” command will navigate your default web browser
to the tutorial video. Feel free to like it and share it on social media.
- The “Send feedback / ask a question” command will start an e-mail addressed at me. All
(positive) feedback is welcome. Please provide details of your problem when you are asking a
question.
- The “About” command will display the version of the workbook, the web address to download
the latest version, and my contact information. Please cite the software and this manual in all
projects they have been used.
SCOPE AND LIMITATIONS
Among many others, VRP Spreadsheet Solver operates on the following assumptions:
- The number of customers is limited to 200. This limit can be increased by editing the code,
but you are advised against it since the efficiency of VBA does not allow the VRP Spreadsheet
Solver to handle instances of that size. If you have built an external solver, you may attempt to
solve larger instances, but the other features will be quite slow (GIS functions, setting up
worksheets, etc.)
- The vehicles incur a fixed cost if they execute a route (may be zero), and a cost per
unit distance (may be zero as well), but they do not incur any other costs.
pg. 17
- The travel distances and durations are fixed and known beforehand. Note that Bing
Maps returns driving times for a car, which may be considerably shorter than that of a truck.
You may need to modify the duration data accordingly.
- Every location other than the depot can be visited by at most one vehicle, at most once
(no split deliveries). The visit must pick up all the supply and deliver all the demand, and partial
service is not allowed. The supply, the demand, the profit obtained, and the amount of time a
vehicle spends at a location are fixed and known beforehand.
STRUCTURE OF THE WORKSHEETS
VRP Spreadsheet Solver adopts an incremental flow of information, with subsets of data
being kept in separate worksheets. Initially, the workbook only contains the worksheet named
VRP Solver Console. The remaining worksheets, 1.Locations, 2.Distances, 3.Vehicles,
4.Solution, 5.Visualization, should be generated in the sequence denoted by their indices. The
names of the worksheets are hardcoded within the VBA code, so you are strongly advised
against renaming them. You are also advised against inserting or deleting cells (or columns or
rows) in these worksheets. With a few exceptions, if a worksheet is modified then the
worksheets with a larger index will need to be generated again, and the previous information
will be permanently overwritten. If you would like to do a what-if analysis on the parameters,
you are strongly advised to make copies of the worksheets before doing so.
The cells containing the data in the worksheets are colour-coded with the following scheme:
The cells with a black background are set by the worksheets and should not be modified.
The cells with a green background are parameters to be set by the user.
The cells with a yellow background are to be computed by the worksheets (but can be edited).
The cells with an orange background signal a warning.
The cells with a red background signal an error.
pg. 18
VRP SOLVER CONSOLE
This worksheet is central to the workbook, and it should not be deleted. If it is deleted,
please run the macro SetupConsoleWorksheet, or close and reopen the workbook to generate it
again. The parameters defined within the worksheet are described below.
Sequence: Instead of having a wizard interface, which is very easy to use but also very
restrictive, the workbook numbers the worksheets in the order of progress. The parameters
related to each worksheet are presented along with their sequence number. Please stick to the
sequence unless you know what you are doing.
Bing Maps Key: Having a Bing Maps License is optional. You can still use the
workbook without a Bing Maps License. A valid key is required for populating the Latitude /
Longitude, the distances and duration, and for generating visualization of the locations and the
routes on a map. You can generate a free key at https://www.bingmapsportal.com/. Just copy
and paste your key into cell C2 of the console worksheet.
Number of depots: Depots serve as starting and ending points for the vehicle routes.
Number of customers: This parameter does not include the depot(s), so it is the number
of locations your vehicles are serving.
Distance / duration computation: This parameter describes how the distances should be
populated, if they will be. The options are Manual entry, Euclidian distances, Rounded
Euclidian distances, Hamming (Manhattan) distances, Bird’s flight distances (km), Bird’s flight
distances (miles), Bing Maps driving distances (km) and Bing Maps driving distances (miles).
The option Manual entry disables the distance population function. The option Euclidian
distances computes the distance between points (𝑥1, 𝑦1)and (𝑥2, 𝑦2) as
𝑑12 = √(𝑥1 − 𝑥2)2 + (𝑦1 − 𝑦2)2 and the results of the formula are not in kilometers
or miles. The option rounded Euclidian distances uses the Euclidian distance formula and
pg. 19
rounds the result to the closest integer, and again the results of the formula are not in kilometres
or miles. The option Hamming (Manhattan) distances computes the distance between points
(𝑥1, 𝑦1)and (𝑥2, 𝑦2) as 𝑑12 = |𝑥1 − 𝑥2| + |𝑦1 − 𝑦2|, and the results of the formula are still not
in kilometers or miles. The options Bird’s flight distances (km) and Bird’s flight distances
(miles) use a spherical approximation for the surface of the Earth. These options are useful if
you need routes for boats or aircraft instead of vehicles. The options Bing Maps driving
distances (km) and Bing Maps driving distances (miles) use the web service of Bing Maps.
Bing Maps route type: This parameter describes the type of route returned by Bing
Maps. The options are Shortest, Fastest, and Fastest - Real Time Traffic. Shortest option will
find the shortest path, which usually goes through city centers, is subject to strict speed limits,
and often results in a very long duration. The recommended option is Fastest. The option Fastest
- Real Time Traffic will give you estimates at the time the distances are populated, which may
change drastically based on the traffic conditions at that instant.
Average vehicle speed: The results of the distance computation are divided by the value
of this parameter to determine the travel time. Note that this value is not used when the distance
population method is Bing Maps, which provides the estimated travel time of a car based on the
speed restrictions on the path. You may want to modify the travel duration if your vehicles are
considerably slower.
Number of vehicle types: For the purposes of this workbook, the differentiating factors
between two vehicle types are the fixed cost per trip, the variable cost per trip, the distance
limit, the work start time, the driving and working time limits, and the carrying capacity. If your
fleet includes two vehicles of different model and make, yet with the same values for these
parameters, then the vehicles can be considered to be of the same type. Most of the studies in
pg. 20
the literature assume that all vehicles are of the same type, and problems involving multiple
types of vehicles are called Heterogeneous VRPs (HVRP).
Vehicles must return to the depot? : The option Yes forces all vehicles to return to the depot
at the end of their service. The option No relaxes this constraint, and is useful when the vehicles
are outsourced and billed only for the service rather than the return, or when the vehicles should
follow the same trip in the same direction when return. The problems corresponding to the No
option are called Open VRP in the literature.
Time window type: “Hard” time windows mean that a solution in which a vehicle visits a
customer location outside the given time window is infeasible. With the “Soft” time windows,
such a solution is undesirable but feasible.
Backhauls? : VRP with Backhauls refers to the VRP variant with pickups and deliveries, where
pickups must be performed after the deliveries in each route, i.e. a vehicle cannot travel from a
location with nonnegative pickup value to another location with positive delivery value. If your
problem does not involve pickups and deliveries, you can leave it as “No”.
Visualization background: The options are Bing Maps and Blank. If Bing Maps is selected,
the workbook will download the appropriate map containing the coordinates of the locations,
and use it as the background image of the scatter chart depicting the routes.
Location labels: The options are Blank, Location IDs, Location names, (Time window
start;Time window end), Service time, Pickup amount, Delivery amount, (Pickup amount;
Delivery amount), and Profit. If Location IDs is selected, the ID number of the location will be
displayed on top of to the location on the map. If Location names is selected, the name of the
location will be displayed on top of the location on the map. The other options correspond to
various data that are associated to the locations, to be extracted from the 1.Locations worksheet.
pg. 21
Warm start: If “Yes” is selected, the solution algorithm will attempt to use the existing solution
on the solution worksheet as a starting point.
Show progress on the status bar: If “Yes” is selected, the solution algorithm will display the
iteration number and the best solution value obtained in the bottom left of the Excel window.
This takes a fraction of a second for every time it is displayed (i.e. every iteration), and may
steal away the precious CPU time from the solver. It is better suited for larges instances where
fewer iterations will be performed, and the time required to display the result becomes
insignificant.
CPU time limit: This parameter denotes the runtime limit of the VRP Spreadsheet Solver. As
a general rule, a longer run gives a higher probability of finding a good solution. The VRP
Spreadsheet Solver will not stop before completing the first iteration, which may be longer than
the time limit provided. The solver can be interrupted by pressing and holding down the ESC
key for a few seconds (sometimes you need to repeatedly press it, one of the joys of using
Microsoft products).
LOCATIONS
The columns in this worksheet are explained below.
Location ID: This column is automatically generated, and must not be deleted or altered.
Name: The entries in this column must be unique. You may want to use the addresses in this
column as well as the Address column.
Address: Please make sure that the address you provide is precise enough. For example, the
coordinates of “Cambridge” may resolve as those of “Cambridge, US” rather than those of
“Cambridge, UK”. Whenever possible, use a postcode to increase the precision.
Latitude (y) : The letter in the parenthesis refers to the axis on which these values correspond
to.
pg. 22
Longitude (x): The letter in the parenthesis refers to the axis on which these values correspond
to.
Time window start: The beginning of the time window of visit for each location. Must be
between 00:00 and 23:59.
Time window end: The end of the time window of visit for each location. Must be between
00:00 and 23:59.
Must be visited? : The options are Must be visited, May be visited, and Don’t visit. The option
May be visited leaves the choice to the solver, which decides based on the total profit. The
option Don’t visit simply takes the location out of consideration without altering the rest of the
data. Note that for the first location (with ID 0) the value is Depot, which is generated by the
system. The VRPs involving locations that may or may not be visited are called “Profit
Collecting VRPs” in general. If a limit exists on the driving distance or time, they may be
referred to as “Orienteering Problems” as well.
Service time: The amount of time a vehicle spends during a visit. The service time counts
towards the working time limit, and should be less than or equal to the difference of the time
window start and time window end.
Pickup amount: Denotes the amount to be picked up. The unit of the amount is unspecified,
but must be the same for that of the capacity of the vehicles. Note that the items being picked
up and delivered are assumed to be different types of items (e.g. full and empty gas cans), and
are not substitutes of each other. Starting from version 2.1, you can use negative values for the
pickup amount to solve One-Commodity Pickup and Delivery Problems. As confusing as it may
sound, these problems are different from VRPs with Pickup and Delivery. To be able to
implement this variant within the existing spreadsheet structure, I had to make the assumption
that the depot always has a demand/supply of 0, and the vehicles can return to the depot loaded.
pg. 23
Delivery amount: Denotes the amount to be delivered. The unit of the amount is unspecified,
but must be the same for that of the capacity of the vehicles. Note that the items being picked
up and delivered are assumed to be different types of items (e.g. full and empty gas cans), and
are not substitutes of each other. All amounts should be non-negative.
Profit: The amount of monetary gain associated with visiting a location. The unit of the profit
is unspecified, but must be the same for this parameter, the fixed cost per trip, and the cost per
unit distance for the vehicles.
DISTANCES
The columns in this worksheet are explained below.
From: The origin for the arc.
To: The destination for the arc.
Distance: The unit of the distance is kilometers if it is computed using Bird flight distances or
Bing Maps driving distances. There are no units for using the Euclidian distance formula or the
Manhattan distances.
Duration: Computed by dividing the distance by the average vehicle speed, unless the option
Bing Maps is selected. As mentioned above, the Bing Maps option returns the driving time for
a car rather than a truck, which you may want to modify.
VEHICLES
The columns in this worksheet are explained below.
Vehicle type ID: This column is automatically generated and should not be deleted.
Type name: To better distinguish the types of vehicles.
Capacity: VRP Spreadsheet Solver supports only one dimension of capacity. This may be
weight, volume, number of passengers, or whatever is relevant to your problem.
pg. 24
Fixed cost per trip: This cost is incurred if a vehicle of this type performs a trip. This parameter
can be used for determining the fleet mix or “buy / hire” decisions.
Cost per unit distance: This is the cost incurred per unit distance this type of vehicle traverses.
Distance limit: This parameter denotes the maximum amount of distance a vehicle can be
driven.
Work start time: This parameter denotes the time at which the vehicles depart from the depot.
Driving time limit: This parameter denotes the maximum amount of time a vehicle can be
driven.
Working time limit: This parameter denotes the maximum amount of time a driver can work
in a day. The service times and the waiting times (a vehicle waits if it arrives before the start of
the time window) count towards working time.
Number of vehicles: The number of vehicles of the given type. Must be a nonnegative integer.
Note that for multiple depots, you need to enter the data for Vehicle type, Capacity, Fixed cost
per trip, Cost per unit distance, and Distance limit of a vehicle type only for the first depot.
These data will be replicated for the other depots. You may manually alter the replicated data
if you need to.
SOLUTION
For each vehicle a set of columns detailing its route will be generated. You may scroll
right to see the routes of other vehicles. Column A also contains the List of detected
infeasibilities, below the stops of the first vehicle. The columns in this worksheet are explained
below.
Stop count: Number of stops the vehicle makes, including the return to the depot if it does.
Location name: This column is composed of cells with drop down menus, populated with the
names of the locations rather than the indices.
pg. 25
Distance travelled: Cumulative distance traversed by the vehicle.
Driving time: Cumulative driving time of the vehicle.
Arrival time: Arrival time of the vehicle at the stop.
Departure time: Departure time of the vehicle from the stop.
Working time: The sum of the driving times and service times, up to and including the stop.
Profit collected: Cumulative amount of profit collected by the vehicle.
Load: Total amount (picked up and to be delivered) on board, at the time of departure.
VISUALIZATION
This worksheet is optional, and if generated it contains a scatter chart showing the
locations and the routes of the vehicles. The chart can be formatted as any other Excel chart.
The current design adopts a “less ink” approach. You can zoom in or out, add axes and gridlines,
or remove labels as you see fit.
FUNCTIONS
Optional – Reset the workbook
This is a quick way of deleting the data worksheets and refreshing the console
worksheet. Be careful, it is irreversible. Corresponds to the macro ResetWorkbook.
Setup Locations Worksheet
Corresponds to the macro SetupLocationsWorksheet.
Optional - Populate Lat/Lon using addresses
An active internet connection and a Bing Maps key are required for this function. Please
make sure that the limitations of your key match with the size of your problem instance. An
instance with n customers will require n + 1 queries to populate the whole set of coordinates.
Corresponds to the macro PopulateLatitudeAndLongitude.
pg. 26
Optional - Sort locations alphabetically
The drop down menus of the solution worksheet are populated by the list of locations.
To have alphabetically ordered drop down menus, you need to sort the locations. Corresponds
to the macro SortLocations.
Setup Distances Worksheet
Corresponds to the macro SetupDistancesWorksheet.
Optional - Populate Distances Worksheet
An active internet connection and a Bing Maps Key are required for this function. Please
make sure that the limitations of your key match with the size of your problem instance. An
instance with n locations will require approximately n * (n + 1) / 24 queries to populate the
whole set of distances. Corresponds to the macro PopulateDistances.
Setup Vehicles Worksheet
Corresponds to the macro SetupVehiclesWorksheet.
Setup Solution Worksheet
Corresponds to the macro SetupSolutionWorksheet.
Optional - Setup Visualization Worksheet
Corresponds to the macro SetupVisualizationWorksheet.
Engage VRP Spreadsheet Solver
Corresponds to the macro VRP_Solver.
Optional – Feasibility Check
This function is supplied for checking the feasibility of the data and the solution after manual
alterations. Corresponds to the macro FeasibilityCheckDataAndSolution.
Optional – Engage external solver
pg. 27
Using the .NET platform, you can build a DLL and invoke your own solution algorithm
from VRP Spreadsheet Solver. Although this can be done in any language within the platform
and any suitable compiler, I will only describe how it can be done using Visual Studio C++.
You first need a “def” file (e.g. vrp_spreadsheet_solver_def.def), which should read:
LIBRARY vrp_spreadsheet_solver
EXPORTS
vrp_spreadsheet_solver
DATA
For the data, we considered a simple example of a company with 3 vehicles of
transportation. The depot is set in Casablanca. The 17 locations to be visited are Salé, Béni
Mellal, Berrechid, Bouskoura, El Jadida, Fez, Guercif, Had Soualem, Hoceima, Kénitra,
Meknès, Mohammedia, Moulay Bousselham, Nouasseur, Settat, Sidi Maarouf, and Tangier. In
the table below the location is set by latitude (y) and longitude (x)
Table 1: Locations
pg. 28
For the Vehicles, we chose 3 for this example only,
For the distances, they were calculated using Bing Maps. Refer to appendices D, and E for
the parameters, and the calculation of the distances. Then refer to appendix F for the solution
provided by the spreadsheet. Below you’ll find a visualization of the solution.
Figure 3: Visualization of the Solution
DepotSalé
Béni Mellal
BerrechidBouskoura
El Jadida
FezGuercif
Had Soualem
Hoceima
KénitraMeknès
Mohammedia
Moulay Bousselham
Nouasseur
Settat
Sidi Maarouf
Tangier
V1
V2
V3
Vehicle type Capacity
Fixed cost per trip
Cost per unit distance
Distance limit
Work start time
Driving time limit
Working time limit
Return depot
Number of vehicles
T1 1 0.00 1.00 1560.00 08:00 21:00 22:00 Depot 3
pg. 29
CONCLUSION
The work done so far has reached the phase of an operational program. The fulfillment
of the capstone design project is a requisite to obtain the Bachelor degree of Al Akhawayn
University. As far as I am concerned, this capstone has allowed me to use the lessons and skills
learned through the classes taken in the university.
The most interesting and yet challenging experience of my capstone project was the
coding of the algorithm used in the project. As my major is Engineering and Management
Science, I was only familiar with the basics of VBA, C language and MATLAB. I learned to
not only use those basics but deepen them. Overall, I am pleased and thankful that I had the
chance to work with Dr. Kissani in solving the VRP as it introduced me to new career paths and
new engineering majors to consider for my graduate studies.
pg. 30
REFERENCES
Adams, S. "The Dilbert Principle." Boxtree Ltd (1997).
Christofides, N., A. Mingozzi and Toth P. "Exact Algorithms for the Vehicle Routing Problem,
Based On Spanning Tree and Shortest Path Relaxations." Mathematical Programming
20 (1981): 255-282.
Erdoğan, Güneş. "User’s Manual for VRP Spreadsheet Solver." University of Bath, School of
Management, 2015.
G., Laporte, Nobert Y. and Taillefer S. "A Branch-And-Bound Algorithm for the Asymmetrical
Distance-Constrained Vehicle Routing Problem." Mathematical Modeling 9.12 (1987):
857-868.
Golden, B., C. Groër and E. Wasil. "A library of local search heuristics for the vehicle routing
problem." Math. Prog. Comp. 2 (2010): 79-101.
Laporte, G. "The Vehicle Routing Problem: An overview of exact and approximate algorithms."
European Journal of Operational Research 59 (1992): 345-358.
Pisinger, D. and S. Ropke. "A general heuristic for vehicle routing problems." Computers &
Operations Research 34 (2007): 2403–2435.
Shaw., P. "Using constraint programming and local search methods to solve vehicle routing
problems." In Proceedings of the 4th International Conference on Principles and
Practice of Constraint Programming. New York: Springer, 1998. 417–431.
Wright., G. Clarke and J.W. "Scheduling of Vehicles from a Central Depot to a Number of
Delivery Points." Operations Research 12 (1964): 568-581.
pg. 31
APPENDICES
APPENDIX A: STEEPLE ANALYSIS
SOCIO-CULTURAL
No great impact on society or culture.
TECHNOLOGICAL
A good technical infrastructure would lead to better distribution logistics, resulting in
reduced wastage and lower costs.
ECONOMIC
Interest rates and Rate of inflation affects the cost of the transport, including price of fuel
and the employee’s salary, etc.
pg. 32
ECOLOGICAL
Might affect the business but same as the socio-cultural, it will not greatly impact
transportation. Ecological trends tend to impact agricultural businesses.
POLITICAL
Government regulations regarding transportation capacity.
LEGAL
Legal restrictions on speed limits and weight restrictions.
ETHICAL
Social Responsibility in consideration of vehicle emissions and such
pg. 33
APPENDIX B: Initial Specification
TAHRI Soufiane
EMS
TRANSPORT ROUTINE
KISSANI I.
Fall 2016
The Vehicle Routing Problem lies at the heart of distribution management, which is
why the object of this capstone is to produce an optimal delivery or collection routes from one
or several depots to a number of geographically scattered cities or customers, subject to side
constraints.
The analysis phase will consist of defining the variables and the constraints of the
several versions of the problem. The variables may be the cost, the distance, the time
travelled… and constraints such as one way route.
The design phase will consider a wide variety of exact and approximate algorithms
that have been proposed for its solution and create our own algorithm.
Implementation and testing will go hand in hand and will be designed to produce a
viable version of the algorithm. When receiving the data, the algorithm will be subject to a
coding program using MATLAB. Both the algorithm and the code may be subject to
alteration after the first results are obtained.
The progress of this project will be recorded in each phase. All tools and approaches
used will be properly documented.
pg. 34
APPENDIX C: Main Function (MATLAB)
Problem Definition
model=SelectModel(); % Select Model of the Problem
model.eta=0.1;
CostFunction=@(q) MyCost(q,model); % Cost Function
SA Parameters
MaxIt=1200; % Maximum Number of Iterations
MaxIt2=80; % Maximum Number of Inner Iterations
Initialization
% Create Initial Solution
x.Position=CreateRandomSolution(model);
[x.Cost, x.Sol]=CostFunction(x.Position);
% Update Best Solution Ever Found
BestSol=x
% Array to Hold Best Cost Values
BestCost=zeros(MaxIt,1);
SA Main Loop
pg. 35
for it=1:MaxIt
for it2=1:MaxIt2
% Create Neighbor
xnew.Position=CreateNeighbor(x.Position);
[xnew.Cost, xnew.Sol]=CostFunction(xnew.Position);
if xnew.Cost<=x.Cost
% xnew is better, so it is accepted
x=xnew;
else
% xnew is not better, so it is accepted conditionally
delta=xnew.Cost-x.Cost;
p=exp(-delta/T);
if rand<=p
x=xnew;
end
pg. 36
end
% Update Best Solution
if x.Cost<=BestSol.Cost
BestSol=x;
end
end
% Store Best Cost
BestCost(it)=BestSol.Cost;
% Display Iteration Information
if BestSol.Sol.IsFeasible
FLAG=' *';
else
FLAG='';
end
disp(['Iteration ' num2str(it) ': Best Cost = ' num2str(BestCost(it)) FLAG]);
pg. 37
% Plot Solution
figure(1);
PlotSolution(BestSol.Sol,model);
pause(0.01);
end
Results
figure;
plot(BestCost,'LineWidth',2);
xlabel('Iteration');
ylabel('Best Cost');
grid on
pg. 38
APPENDIX D: Solver Spreadsheet (Excel)
Sequence Parameter Value Remarks
0.Optional - GIS License Bing Maps Key You can get a free key at https://www.bingmapsportal.com/
1.Locations Number of depots 1 [1,20]
Number of customers 10 [5,200]
2.Distances Distance / duration computation Bing Maps driving distances (km)
Bing Maps route type Fastest Recommendation: use Fastest
Average vehicle speed 70 Not used for the 'Bing Maps driving distances' options
3.Vehicles Number of vehicle types 1 Heterogeneous VRP if greater than 1
4.Solution Vehicles must return to the depot? Yes Open VRP if no return
Time window type Hard
Backhauls? No If activated, delivery locations must be visited before pickup locations
5.Optional - Visualization Visualization background Bing Maps
Location labels Blank
6.Solver Warm start? Yes
Show progress on the status bar? No May slow down the optimization algorithm
CPU time limit (seconds) 60 Recommendation: At least 60 seconds
pg. 39
APPENDIX E: Distances and duration from Depot to other
locations
From To Distance Duration
Depot Depot 0.00 0:00
Depot Salé 106.06 1:21
Depot Béni Mellal 232.59 2:38
Depot Berrechid 84.66 0:59
Depot Bouskoura 23.09 0:25
Depot El Jadida 106.46 1:12
Depot Fez 304.25 3:09
Depot Guercif 483.46 4:48
Depot Had Soualem 690.89 7:12
Depot Hoceima 566.34 6:08
Depot Kénitra 152.29 1:46
Depot Meknès 256.95 2:42
Depot Mohammedia 45.40 0:40
Depot Moulay Bousselham 237.90 2:27
Depot Nouasseur 28.54 0:31
Depot Settat 77.03 1:01
Depot Sidi Maarouf 10.63 0:17
Depot Tangier 347.39 3:33
Salé Depot 104.56 1:19
Salé Salé 0.00 0:00
Salé Béni Mellal 240.90 3:09
Salé Berrechid 173.54 1:47
Salé Bouskoura 111.98 1:13
Salé El Jadida 195.11 1:58
Salé Fez 198.31 2:00
Salé Guercif 377.52 3:39
Salé Had Soualem 779.77 7:59
Salé Hoceima 460.40 4:59
Salé Kénitra 33.71 0:37
Salé Meknès 151.01 1:33
Salé Mohammedia 65.02 0:47
Salé Moulay Bousselham 132.56 1:20
Salé Nouasseur 117.43 1:19
Salé Settat 165.91 1:48
Salé Sidi Maarouf 105.85 1:10
Salé Tangier 242.06 2:25
Béni Mellal Depot 231.97 2:38
Béni Mellal Salé 240.68 3:13
pg. 40
Béni Mellal Béni Mellal 0.00 0:00
Béni Mellal Berrechid 192.50 2:24
Béni Mellal Bouskoura 215.80 2:23
Béni Mellal El Jadida 292.72 3:17
Béni Mellal Fez 303.23 4:02
Béni Mellal Guercif 456.65 5:36
Béni Mellal Had Soualem 690.73 7:50
Béni Mellal Hoceima 539.54 6:56
Béni Mellal Kénitra 284.28 3:34
Béni Mellal Meknès 254.17 3:32
Béni Mellal Mohammedia 243.96 2:48
Béni Mellal Moulay Bousselham 369.89 4:16
Béni Mellal Nouasseur 221.25 2:29
Béni Mellal Settat 168.02 2:16
Béni Mellal Sidi Maarouf 223.98 2:27
Béni Mellal Tangier 479.38 5:21
Berrechid Depot 47.53 0:39
Berrechid Salé 136.63 1:28
Berrechid Béni Mellal 189.96 2:07
Berrechid Berrechid 0.00 0:00
Berrechid Bouskoura 31.36 0:23
Berrechid El Jadida 109.50 1:20
Berrechid Fez 334.83 3:16
Berrechid Guercif 514.03 4:55
Berrechid Had Soualem 650.26 6:44
Berrechid Hoceima 596.92 6:15
Berrechid Kénitra 182.86 1:53
Berrechid Meknès 287.52 2:49
Berrechid Mohammedia 75.98 0:47
Berrechid Moulay Bousselham 268.47 2:34
Berrechid Nouasseur 36.81 0:29
Berrechid Settat 36.40 0:33
Berrechid Sidi Maarouf 39.54 0:28
Berrechid Tangier 377.97 3:40
Bouskoura Depot 23.36 0:25
Bouskoura Salé 112.46 1:14
Bouskoura Béni Mellal 215.28 2:21
Bouskoura Berrechid 67.34 0:42
Bouskoura Bouskoura 0.00 0:00
Bouskoura El Jadida 96.56 1:02
Bouskoura Fez 310.66 3:02
Bouskoura Guercif 489.86 4:41
Bouskoura Had Soualem 673.57 6:55
Bouskoura Hoceima 572.75 6:01
Bouskoura Kénitra 158.69 1:39
pg. 41
Bouskoura Meknès 263.35 2:35
Bouskoura Mohammedia 51.81 0:33
Bouskoura Moulay Bousselham 244.30 2:20
Bouskoura Nouasseur 6.33 0:07
Bouskoura Settat 59.71 0:44
Bouskoura Sidi Maarouf 9.82 0:13
Bouskoura Tangier 353.80 3:26
El Jadida Depot 100.90 1:10
El Jadida Salé 194.06 2:00
El Jadida Béni Mellal 290.98 3:14
El Jadida Berrechid 144.90 1:38
El Jadida Bouskoura 95.78 1:01
El Jadida El Jadida 0.00 0:00
El Jadida Fez 392.25 3:48
El Jadida Guercif 571.46 5:27
El Jadida Had Soualem 606.52 7:08
El Jadida Hoceima 654.34 6:47
El Jadida Kénitra 240.29 2:24
El Jadida Meknès 344.94 3:21
El Jadida Mohammedia 133.40 1:18
El Jadida Moulay Bousselham 325.89 3:06
El Jadida Nouasseur 98.34 1:05
El Jadida Settat 105.31 1:28
El Jadida Sidi Maarouf 92.77 0:59
El Jadida Tangier 435.39 4:11
Fez Depot 303.76 3:08
Fez Salé 198.16 1:58
Fez Béni Mellal 302.95 4:00
Fez Berrechid 372.74 3:37
Fez Bouskoura 311.17 3:03
Fez El Jadida 394.31 3:48
Fez Fez 0.00 0:00
Fez Guercif 187.98 2:07
Fez Had Soualem 978.97 9:49
Fez Hoceima 254.94 3:21
Fez Kénitra 206.48 2:06
Fez Meknès 56.96 0:51
Fez Mohammedia 264.21 2:36
Fez Moulay Bousselham 194.03 2:39
Fez Nouasseur 316.62 3:09
Fez Settat 365.11 3:38
Fez Sidi Maarouf 305.04 3:00
Fez Tangier 304.97 3:47
Guercif Depot 483.42 4:49
Guercif Salé 377.81 3:38
pg. 42
Guercif Béni Mellal 456.95 5:37
Guercif Berrechid 552.40 5:17
Guercif Bouskoura 490.83 4:43
Guercif El Jadida 573.96 5:28
Guercif Fez 187.88 2:06
Guercif Guercif 0.00 0:00
Guercif Had Soualem 1158.63 11:29
Guercif Hoceima 205.02 2:46
Guercif Kénitra 386.14 3:46
Guercif Meknès 250.91 2:30
Guercif Mohammedia 443.87 4:16
Guercif Moulay Bousselham 381.07 4:40
Guercif Nouasseur 496.28 4:49
Guercif Settat 544.77 5:18
Guercif Sidi Maarouf 484.70 4:40
Guercif Tangier 492.01 5:48
Had Soualem Depot 689.86 7:11
Had Soualem Salé 778.96 8:00
Had Soualem Béni Mellal 689.63 7:46
Had Soualem Berrechid 642.33 6:35
Had Soualem Bouskoura 673.69 6:56
Had Soualem El Jadida 638.73 7:02
Had Soualem Fez 977.16 9:48
Had Soualem Guercif 1156.36 11:27
Had Soualem Had Soualem 0.00 0:00
Had Soualem Hoceima 1239.25 12:47
Had Soualem Kénitra 825.20 8:25
Had Soualem Meknès 929.85 9:21
Had Soualem Mohammedia 718.31 7:19
Had Soualem Moulay Bousselham 910.80 9:06
Had Soualem Nouasseur 679.14 7:02
Had Soualem Settat 620.51 6:32
Had Soualem Sidi Maarouf 681.87 7:00
Had Soualem Tangier 1020.30 10:12
Hoceima Depot 566.04 6:08
Hoceima Salé 460.44 4:57
Hoceima Béni Mellal 539.57 6:57
Hoceima Berrechid 635.02 6:36
Hoceima Bouskoura 573.45 6:02
Hoceima El Jadida 656.59 6:48
Hoceima Fez 252.40 3:18
Hoceima Guercif 204.72 2:46
Hoceima Had Soualem 1241.25 12:49
Hoceima Hoceima 0.00 0:00
Hoceima Kénitra 406.42 5:14
pg. 43
Hoceima Meknès 333.54 3:50
Hoceima Mohammedia 526.49 5:36
Hoceima Moulay Bousselham 369.65 4:42
Hoceima Nouasseur 578.91 6:08
Hoceima Settat 627.39 6:38
Hoceima Sidi Maarouf 567.33 5:59
Hoceima Tangier 290.80 4:07
Kénitra Depot 149.95 1:47
Kénitra Salé 33.27 0:37
Kénitra Béni Mellal 282.89 3:34
Kénitra Berrechid 218.93 2:15
Kénitra Bouskoura 157.36 1:41
Kénitra El Jadida 240.49 2:27
Kénitra Fez 205.92 2:08
Kénitra Guercif 385.13 3:48
Kénitra Had Soualem 825.16 8:28
Kénitra Hoceima 406.55 5:15
Kénitra Kénitra 0.00 0:00
Kénitra Meknès 158.61 1:42
Kénitra Mohammedia 110.40 1:15
Kénitra Moulay Bousselham 93.95 1:01
Kénitra Nouasseur 162.81 1:47
Kénitra Settat 211.30 2:17
Kénitra Sidi Maarouf 151.23 1:38
Kénitra Tangier 203.45 2:06
Meknès Depot 256.04 2:41
Meknès Salé 150.44 1:30
Meknès Béni Mellal 254.24 3:30
Meknès Berrechid 325.02 3:09
Meknès Bouskoura 263.45 2:35
Meknès El Jadida 346.59 3:21
Meknès Fez 56.90 0:50
Meknès Guercif 250.97 2:30
Meknès Had Soualem 931.25 9:22
Meknès Hoceima 333.85 3:50
Meknès Kénitra 158.77 1:39
Meknès Meknès 0.00 0:00
Meknès Mohammedia 216.49 2:09
Meknès Moulay Bousselham 156.59 2:20
Meknès Nouasseur 268.91 2:41
Meknès Settat 317.39 3:11
Meknès Sidi Maarouf 257.33 2:32
Meknès Tangier 267.53 3:27
Mohammedia Depot 43.80 0:40
Mohammedia Salé 65.37 0:50
pg. 44
Mohammedia Béni Mellal 260.71 2:47
Mohammedia Berrechid 112.78 1:09
Mohammedia Bouskoura 51.21 0:34
Mohammedia El Jadida 134.34 1:20
Mohammedia Fez 263.56 2:38
Mohammedia Guercif 442.77 4:18
Mohammedia Had Soualem 719.01 7:21
Mohammedia Hoceima 525.65 5:37
Mohammedia Kénitra 111.60 1:15
Mohammedia Meknès 216.26 2:12
Mohammedia Mohammedia 0.00 0:00
Mohammedia Moulay Bousselham 197.21 1:57
Mohammedia Nouasseur 56.66 0:40
Mohammedia Settat 105.15 1:10
Mohammedia Sidi Maarouf 45.08 0:31
Mohammedia Tangier 306.70 3:02
Moulay Bousselham Depot 236.26 2:27
Moulay Bousselham Salé 131.27 1:18
Moulay Bousselham Béni Mellal 369.21 4:15
Moulay Bousselham Berrechid 305.24 2:55
Moulay Bousselham Bouskoura 243.67 2:21
Moulay Bousselham El Jadida 326.81 3:07
Moulay Bousselham Fez 194.19 2:39
Moulay Bousselham Guercif 398.30 4:38
Moulay Bousselham Had Soualem 911.47 9:08
Moulay Bousselham Hoceima 369.76 4:41
Moulay Bousselham Kénitra 92.65 1:00
Moulay Bousselham Meknès 156.08 2:16
Moulay Bousselham Mohammedia 196.71 1:55
Moulay Bousselham Moulay Bousselham 0.00 0:00
Moulay Bousselham Nouasseur 249.13 2:27
Moulay Bousselham Settat 297.61 2:57
Moulay Bousselham Sidi Maarouf 237.55 2:18
Moulay Bousselham Tangier 126.77 1:22
Nouasseur Depot 21.96 0:31
Nouasseur Salé 117.90 1:21
Nouasseur Béni Mellal 220.71 2:27
Nouasseur Berrechid 72.78 0:49
Nouasseur Bouskoura 6.39 0:08
Nouasseur El Jadida 99.10 1:06
Nouasseur Fez 316.09 3:09
Nouasseur Guercif 495.30 4:48
Nouasseur Had Soualem 679.01 7:01
Nouasseur Hoceima 578.18 6:08
Nouasseur Kénitra 164.13 1:46
pg. 45
Nouasseur Meknès 268.79 2:42
Nouasseur Mohammedia 57.24 0:40
Nouasseur Moulay Bousselham 249.74 2:27
Nouasseur Nouasseur 0.00 0:00
Nouasseur Settat 65.15 0:50
Nouasseur Sidi Maarouf 12.37 0:16
Nouasseur Tangier 359.23 3:32
Settat Depot 76.37 1:01
Settat Salé 165.47 1:50
Settat Béni Mellal 167.16 2:17
Settat Berrechid 28.84 0:25
Settat Bouskoura 60.20 0:45
Settat El Jadida 105.53 1:29
Settat Fez 363.67 3:38
Settat Guercif 542.87 5:17
Settat Had Soualem 619.95 6:31
Settat Hoceima 625.76 6:36
Settat Kénitra 211.71 2:14
Settat Meknès 316.36 3:11
Settat Mohammedia 104.82 1:08
Settat Moulay Bousselham 297.31 2:56
Settat Nouasseur 65.65 0:51
Settat Settat 0.00 0:00
Settat Sidi Maarouf 68.38 0:50
Settat Tangier 406.81 4:01
Sidi Maarouf Depot 11.03 0:16
Sidi Maarouf Salé 105.99 1:11
Sidi Maarouf Béni Mellal 223.43 2:26
Sidi Maarouf Berrechid 75.50 0:48
Sidi Maarouf Bouskoura 9.85 0:14
Sidi Maarouf El Jadida 97.31 1:00
Sidi Maarouf Fez 304.18 2:59
Sidi Maarouf Guercif 483.39 4:38
Sidi Maarouf Had Soualem 681.73 7:00
Sidi Maarouf Hoceima 566.28 5:58
Sidi Maarouf Kénitra 152.22 1:36
Sidi Maarouf Meknès 256.88 2:32
Sidi Maarouf Mohammedia 45.33 0:29
Sidi Maarouf Moulay Bousselham 237.83 2:17
Sidi Maarouf Nouasseur 12.41 0:18
Sidi Maarouf Settat 67.87 0:49
Sidi Maarouf Sidi Maarouf 0.00 0:00
Sidi Maarouf Tangier 347.32 3:22
Tangier Depot 346.06 3:33
Tangier Salé 241.06 2:23
pg. 46
Tangier Béni Mellal 479.01 5:20
Tangier Berrechid 415.04 4:01
Tangier Bouskoura 353.47 3:27
Tangier El Jadida 436.61 4:12
Tangier Fez 304.74 3:47
Tangier Guercif 582.05 5:35
Tangier Had Soualem 1021.27 10:13
Tangier Hoceima 290.81 4:06
Tangier Kénitra 202.45 2:06
Tangier Meknès 266.64 3:24
Tangier Mohammedia 306.51 3:00
Tangier Moulay Bousselham 126.39 1:21
Tangier Nouasseur 358.93 3:33
Tangier Settat 407.41 4:02
Tangier Sidi Maarouf 347.35 3:24
Tangier Tangier 0.00 0:00
pg. 47
APPENDIX F: Solution for 3 Vehicles and 17 locations
Vehicle: V2 Stops: 5 Net profit: -1409.86
Stop count
Location name
Distance travelled
Driving time
Arrival time
Departure time
Working time
Profit collected Load
0 Depot 0.00 0:00 08:00 0:00 0 0
1 El Jadida 106.46 1:12 09:12 09:12 1:12 0 0
2 Had Soualem 712.99 8:20 16:20 16:20 8:20 0 0
3 Settat 1333.49 14:52 22:52 22:52 14:52 0 0
4 Berrechid 1362.33 15:17 23:17 23:17 15:17 0 0
5 Depot 1409.86 15:56 23:56 15:56 0 0
Vehicle: V3 Stops: 6 Net profit: -1350.69
Stop count
Location name
Distance travelled
Driving time
Arrival time
Departure time
Working time
Profit collected Load
0 Depot 0.00 0:00 08:00 0:00 0 0
1 Fez 304.25 3:09 11:09 11:09 3:09 0 0
Vehicle: V1 Stops: 9 Net profit: -799.71
Stop count Location name
Distance travelled
Driving time
Arrival time
Departure time
Working time
Profit collected Load
0 Depot 0.00 0:00 08:00 0:00 0 0
1 Sidi Maarouf 10.63 0:17 08:17 08:17 0:17 0 0
2 Nouasseur 23.04 0:35 08:35 08:35 0:35 0 0
3 Bouskoura 29.42 0:43 08:43 08:43 0:43 0 0
4 Béni Mellal 244.70 3:04 11:04 11:04 3:04 0 0
5 Meknès 498.86 6:36 14:36 14:36 6:36 0 0
6 Kénitra 657.63 8:15 16:15 16:15 8:15 0 0
7 Salé 690.90 8:52 16:52 16:52 8:52 0 0
8 Mohammedia 755.91 9:39 17:39 17:39 9:39 0 0
9 Depot 799.71 10:19 18:19 10:19 0 0
pg. 48
2 Guercif 492.24 5:16 13:16 13:16 5:16 0 0
3 Hoceima 697.25 8:02 16:02 16:02 8:02 0 0
4 Tangier 988.05 12:09 20:09 20:09 12:09 0 0
5 Moulay Bousselham 1114.43 13:30 21:30 21:30 13:30 0 0
6 Depot 1350.69 15:57 23:57 15:57 0 0