Struct Vehicle¶
- Defined in File utils.hpp
Struct Documentation¶
-
struct
Vehicle
¶ Public Functions
-
Vehicle
(const int id = 0, const int load = 0, const int capacity = 0)¶ Constructor.
Constructor of vehicle struct
- Return
- no return value
- Parameters
id
: Vehicle idload
: Current vehicle loadcapacity
: Maximum vehicle capacity (initial load)
-
void
CalculateCost
(const std::vector<std::vector<double>> &distanceMatrix)¶ Calculates cost of the visiting the nodes in order.
Calculates cost of the route nd updates the cost variable
- Return
- void
- Parameters
distanceMatrix
: Holds the distances between each pair of nodes
-