![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Solomon solution parser class. More...
#include <solomon_parser.h>
Public Member Functions | |
SolomonSolutionParser () | |
SolomonSolutionParser (const SolomonSolutionParser &)=delete | |
const SolomonSolutionParser & | operator= (const SolomonSolutionParser &)=delete |
bool | LoadFile (absl::string_view file_name) |
int | NumberOfRoutes () const |
Returns the number of routes used in the solution. | |
const std::vector< int > & | route (int i) const |
Returns the sequence of the ith route, excluding depot nodes. | |
const std::string & | GetValueFromKey (absl::string_view key) const |
Solomon solution parser class.
Definition at line 138 of file solomon_parser.h.
operations_research::routing::SolomonSolutionParser::SolomonSolutionParser | ( | ) |
Definition at line 140 of file solomon_parser.cc.
|
delete |
|
inline |
Returns the value corresponding to a key. Keys can be (but are not limited to) "Authors", "Date", "Instance Name", or "Reference". These keys might vary slightly per instance (refer to the input file).
Definition at line 158 of file solomon_parser.h.
bool operations_research::routing::SolomonSolutionParser::LoadFile | ( | absl::string_view | file_name | ) |
Loads solution from a file. Returns false in case of failure to read the file. Loading a new solution clears the previously loaded solution.
Definition at line 142 of file solomon_parser.cc.
|
inline |
Returns the number of routes used in the solution.
Definition at line 152 of file solomon_parser.h.
|
delete |
|
inline |
Returns the sequence of the ith route, excluding depot nodes.
Definition at line 154 of file solomon_parser.h.