Struct Problem

Struct Documentation

struct Problem

Public Functions

Problem(const int noc = 1000, const int demand_range = 40, const int nov = 50, const int capacity = 800, const int grid_range = 1000, std::string distribution = "uniform", const int n_clusters = 5, const int cluster_range = 10)

Constructor.

Constructor for problem struct

Return
no return value
Parameters
  • noc: number of nodes (centres/dropoff points)
  • demand_range: max demand of each node (random value between 0 and this value)
  • nov: number of vehicles
  • capacity: maximum capacityof each vehicle
  • grid_range: maximum x and y coordinates of any node
  • distribution: distribution of nodes. Can be either clustered or uniform.
  • n_clusters: If clustered, number of clusters the nodes are divided into
  • cluster_range: If clustered, maximum distance from center of cluster.

Public Members

std::vector<Node> nodes_
std::vector<Vehicle> vehicles_
std::vector<std::vector<double>> distanceMatrix_
Node depot_
int capacity_