![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Solomon parser class. More...
#include <solomon_parser.h>
Public Member Functions | |
SolomonParser () | |
SolomonParser (const SolomonParser &)=delete | |
const SolomonParser & | operator= (const SolomonParser &)=delete |
bool | LoadFile (absl::string_view file_name) |
Loads instance from a file. | |
bool | LoadFile (absl::string_view file_name, const std::string &archive_name) |
const std::string & | name () const |
Returns the name of the instance being solved. | |
int | Depot () const |
Returns the index of the depot. | |
int | NumberOfNodes () const |
Returns the number of nodes in the current routing problem. | |
int | NumberOfVehicles () const |
Returns the maximum number of vehicles to use. | |
const std::vector< Coordinates2< int64_t > > & | coordinates () const |
Returns the coordinates of the nodes in the current routing problem. | |
int64_t | capacity () const |
Returns the capacity of the vehicles. | |
const std::vector< int64_t > & | demands () const |
Returns the demand of the nodes in the current routing problem. | |
const std::vector< SimpleTimeWindow< int64_t > > & | time_windows () const |
Returns the time windows of the nodes in the current routing problem. | |
const std::vector< int64_t > & | service_times () const |
Returns the service times of the nodes in the current routing problem. | |
double | GetDistance (int from, int to) const |
Returns the distance between two nodes. | |
double | GetTravelTime (int from, int to) const |
Returns the travel time between two nodes. | |
Solomon parser class.
Definition at line 59 of file solomon_parser.h.
operations_research::routing::SolomonParser::SolomonParser | ( | ) |
Definition at line 36 of file solomon_parser.cc.
|
delete |
|
inline |
Returns the capacity of the vehicles.
Definition at line 90 of file solomon_parser.h.
|
inline |
Returns the coordinates of the nodes in the current routing problem.
Definition at line 86 of file solomon_parser.h.
|
inline |
Returns the demand of the nodes in the current routing problem.
Definition at line 92 of file solomon_parser.h.
|
inline |
Returns the index of the depot.
Definition at line 80 of file solomon_parser.h.
|
inline |
Returns the distance between two nodes.
Definition at line 100 of file solomon_parser.h.
|
inline |
Returns the travel time between two nodes.
Definition at line 108 of file solomon_parser.h.
bool operations_research::routing::SolomonParser::LoadFile | ( | absl::string_view | file_name | ) |
Loads instance from a file.
Loading an instance. Both methods return false in case of failure to read the instance. Loading a new instance clears the previously loaded instance.
Definition at line 41 of file solomon_parser.cc.
bool operations_research::routing::SolomonParser::LoadFile | ( | absl::string_view | file_name, |
const std::string & | archive_name ) |
Loads instance from a file contained in a zipped archive; the archive can contain multiple files.
Definition at line 46 of file solomon_parser.cc.
|
inline |
Returns the name of the instance being solved.
Definition at line 78 of file solomon_parser.h.
|
inline |
Returns the number of nodes in the current routing problem.
Definition at line 82 of file solomon_parser.h.
|
inline |
Returns the maximum number of vehicles to use.
Definition at line 84 of file solomon_parser.h.
|
delete |
|
inline |
Returns the service times of the nodes in the current routing problem.
Definition at line 98 of file solomon_parser.h.
|
inline |
Returns the time windows of the nodes in the current routing problem.
Definition at line 94 of file solomon_parser.h.