Google OR-Tools v9.11
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 (const std::string &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 60 of file solomon_parser.h.
operations_research::SolomonParser::SolomonParser | ( | ) |
Definition at line 34 of file solomon_parser.cc.
|
delete |
|
inline |
Returns the capacity of the vehicles.
Definition at line 91 of file solomon_parser.h.
|
inline |
Returns the coordinates of the nodes in the current routing problem.
Definition at line 87 of file solomon_parser.h.
|
inline |
Returns the demand of the nodes in the current routing problem.
Definition at line 93 of file solomon_parser.h.
|
inline |
Returns the index of the depot.
Definition at line 81 of file solomon_parser.h.
|
inline |
Returns the distance between two nodes.
Definition at line 101 of file solomon_parser.h.
|
inline |
Returns the travel time between two nodes.
Definition at line 109 of file solomon_parser.h.
bool operations_research::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 44 of file solomon_parser.cc.
bool operations_research::SolomonParser::LoadFile | ( | const std::string & | 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 39 of file solomon_parser.cc.
|
inline |
Returns the name of the instance being solved.
Definition at line 79 of file solomon_parser.h.
|
inline |
Returns the number of nodes in the current routing problem.
Definition at line 83 of file solomon_parser.h.
|
inline |
Returns the maximum number of vehicles to use.
Definition at line 85 of file solomon_parser.h.
|
delete |
|
inline |
Returns the service times of the nodes in the current routing problem.
Definition at line 99 of file solomon_parser.h.
|
inline |
Returns the time windows of the nodes in the current routing problem.
Definition at line 95 of file solomon_parser.h.