I need MATLAB code for heterogenous fleet Vehicle Routing Problem. Please help
4 views (last 30 days)
Show older comments
2 types of vehicles will distribute goods to 13 customers from a single depot. There are 2 vehicles (1 of each type) available.
I need to use the vehicles in such a way that 1 vehicle will reach a customer for once and fulfill it’s full demand. If the situation is like that there might be space in the vehicle in which that can meet a portion of a customer’s demand, I won’t choose that option, rather I would take another vehicle and that’ll fulfill the whole demand. The 2 vehicles have to start from the depot and return to the same depot after distribution.
The objective is to minimize the total cost. The cost section has 2 parts, one is for carbon emission cost and other is fuel consumption cost.
Latitude of the depot = 24.84773520196375
longitude of the depot = 89.36247177231718
Latitudes & longitudes of the routes (depot and 13 customers) are:
latitudes = [24.84773520196375, 24.87335674, 24.83320423, 25.53737433, 25.33029507, 25.38906214, 24.92971916, 25.10335573, 24.82309822, 25.04680312, 24.55426666, 24.45587069, 24.07761762, 24.31666401];
longitudes = [89.36247177231718, 89.17118594, 89.07546406, 89.44736919, 89.54767327, 88.99127121, 91.68730257, 89.02807458, 88.93028983, 88.75279426, 89.50367434, 89.65933574, 89.61773818, 89.56760534];
The parameters are:
Transportation cost from customer point i to customer point j
= Fuel consumption cost
= Carbon emission cost
Cp= Cost per unit fuel = 109 Tk per litre
Ce= Environmental cost of unit carbon emission = 374.42 Tk per Kg
xij = route selection variable = 1 if m type vehicle serves point i followed by j
= 0; if m type vehicle does not serve point i followed by j
dij = Distance travelled from customer point i to customer point j
epsilon_m = Fuel consumption per unit distance = [ 0.0675, 0.07479 ]
E = Carbon emission coefficient for unit fuel consumption = 2.6 Kg per litre
Demand (no. of cartons) of customer i = [48 36 15 35 14 28 18 29 17 24 57 30 8]
[note that, demand of depot is 0]
Load capacity of vehicle m = [116, 231]
h = type of vehicle = 2
n = number of customer = 13
[i=1 is depot]
A png file containing Cost functions, Objective Function and constraint functions are attached here.
Constraint 2,3 indicate that each customer point only can be served by 1 vehicle,
Constraint 4 indicates that the vehicles won’t be overloaded
Constraint 5 indicates that all vehicles start from the depot (i=1) & return to the depot after the completion of the distribution
2 Comments
Steven Lord
on 12 May 2023
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
See Also
Categories
Find more on Direct Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!