|
Operational Research Library
1.0
|
#include <CapacitatedVehicleRoutingProblem.h>


Public Member Functions | |
| CapacitatedVehicleRoutingProblem (unsigned int customers, const std::vector< double > &demands, const std::vector< CoordinatesHelper > &coordinates, double capacity) | |
| Constructor. More... | |
| CapacitatedVehicleRoutingProblem (unsigned int customers, double capacity, double minDemand, double maxDemand, double minCoordinate, double maxCoordinate, bool integerValues=false) | |
| Constructor. More... | |
| CapacitatedVehicleRoutingProblem (const std::string &filename) | |
| Constructor. More... | |
| void | setData (unsigned int customers, const std::vector< double > &demands, const std::vector< CoordinatesHelper > &coordinates, double capacity) |
| Setter for capacitated vehicle routing problem data. More... | |
| void | generateData (unsigned int customers, double capacity, double minDemand, double maxDemand, double minCoordinate, double maxCoordinate, bool integerValues=false) |
| Generates capacitated vehicle routing problem data according to setup. More... | |
| void | readDataFromFile (const std::string &filename) |
| Reads capacitated vehicle routing problem data from a file with a filename. More... | |
| void | writeDataToFile (const std::string &filename) |
| Writes capacitated vehicle routing problem data to a file with a filename. More... | |
| void | showData () |
| Shows capacitated vehicle routing problem data. More... | |
| double | evaluateCVRP (const std::vector< unsigned int > &schedule) |
| Evaluates capacitated vehicle routing problem. More... | |
| double | evaluateCVRP (const std::vector< unsigned int > &schedule, const std::string &filename) |
| Evaluates capacitated vehicle routing problem to file with a filename. More... | |
| double | getCapacity () const |
| Getter for vehicle capacity. More... | |
| const std::vector< CoordinatesHelper > & | getCoordinates () const |
| Getter for coordinates of customers. More... | |
| unsigned int | getCustomers () const |
| Getter for number of customers. More... | |
| const std::vector< double > & | getDemands () const |
| Getter for demands of customers. More... | |
Public Member Functions inherited from operational_research::IData | |
| virtual | ~IData () |
| Virtual destructor. More... | |
| operational_research::CapacitatedVehicleRoutingProblem::CapacitatedVehicleRoutingProblem | ( | unsigned int | customers, |
| const std::vector< double > & | demands, | ||
| const std::vector< CoordinatesHelper > & | coordinates, | ||
| double | capacity | ||
| ) |
Constructor.
| customers | Number of customers. |
| demands | Demands of customers. |
| coordinates | Coordinates of depot and customers. |
| capacity | Vehicle capacity. |
| std::invalid_argument | exception. |
| operational_research::CapacitatedVehicleRoutingProblem::CapacitatedVehicleRoutingProblem | ( | unsigned int | customers, |
| double | capacity, | ||
| double | minDemand, | ||
| double | maxDemand, | ||
| double | minCoordinate, | ||
| double | maxCoordinate, | ||
| bool | integerValues = false |
||
| ) |
Constructor.
| customers | Number of customers. |
| capacity | Vehicle capacity. |
| minDemand | Minimal demand of customer. |
| maxDemand | Maximal demand of customer. |
| minCoordinate | Minimal coordinate. |
| maxCoordinate | Maximal coordinate. |
| integerValues | True if generated data is integer values, false if generated data is real values. |
| std::invalid_argument | exception. |
| operational_research::CapacitatedVehicleRoutingProblem::CapacitatedVehicleRoutingProblem | ( | const std::string & | filename | ) |
Constructor.
| filename | Filename. |
| std::runtime_error | exception. |
| std::invalid_argument | exception. |
| double operational_research::CapacitatedVehicleRoutingProblem::evaluateCVRP | ( | const std::vector< unsigned int > & | schedule | ) |
Evaluates capacitated vehicle routing problem.
| schedule | Schedule. |
| std::invalid_argument | exception. |
| double operational_research::CapacitatedVehicleRoutingProblem::evaluateCVRP | ( | const std::vector< unsigned int > & | schedule, |
| const std::string & | filename | ||
| ) |
Evaluates capacitated vehicle routing problem to file with a filename.
| schedule | Schedule. |
| filename | Filename. |
| std::invalid_argument | exception. |
| std::runtime_error | exception. |
| void operational_research::CapacitatedVehicleRoutingProblem::generateData | ( | unsigned int | customers, |
| double | capacity, | ||
| double | minDemand, | ||
| double | maxDemand, | ||
| double | minCoordinate, | ||
| double | maxCoordinate, | ||
| bool | integerValues = false |
||
| ) |
Generates capacitated vehicle routing problem data according to setup.
| customers | Number of customers. |
| capacity | Vehicle capacity. |
| minDemand | Minimal demand of customer. |
| maxDemand | Maximal demand of customer. |
| minCoordinate | Minimal coordinate. |
| maxCoordinate | Maximal coordinate. |
| integerValues | True if generated data is integer values, false if generated data is real values. |
| std::invalid_argument | exception. |
|
inline |
Getter for vehicle capacity.
|
inline |
Getter for coordinates of customers.
|
inline |
Getter for number of customers.
|
inline |
Getter for demands of customers.
|
virtual |
Reads capacitated vehicle routing problem data from a file with a filename.
| filename | Filename. |
| std::runtime_error | exception. |
| std::invalid_argument | exception. |
Implements operational_research::IData.
| void operational_research::CapacitatedVehicleRoutingProblem::setData | ( | unsigned int | customers, |
| const std::vector< double > & | demands, | ||
| const std::vector< CoordinatesHelper > & | coordinates, | ||
| double | capacity | ||
| ) |
Setter for capacitated vehicle routing problem data.
| customers | Number of customers. |
| demands | Demands of customers. |
| coordinates | Coordinates of depot and customers. |
| capacity | Vehicle capacity. |
| std::invalid_argument | exception. |
|
virtual |
Shows capacitated vehicle routing problem data.
Implements operational_research::IData.
|
virtual |
Writes capacitated vehicle routing problem data to a file with a filename.
| filename | Filename. |
| std::runtime_error | exception. |
Implements operational_research::IData.
1.8.9.1