Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::routing::SolomonSolutionParser Class Reference

Solomon solution parser class. More...

#include <solomon_parser.h>

Public Member Functions

 SolomonSolutionParser ()
 
 SolomonSolutionParser (const SolomonSolutionParser &)=delete
 
const SolomonSolutionParseroperator= (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
 

Detailed Description

Solomon solution parser class.

Definition at line 138 of file solomon_parser.h.

Constructor & Destructor Documentation

◆ SolomonSolutionParser() [1/2]

operations_research::routing::SolomonSolutionParser::SolomonSolutionParser ( )

Definition at line 140 of file solomon_parser.cc.

◆ SolomonSolutionParser() [2/2]

operations_research::routing::SolomonSolutionParser::SolomonSolutionParser ( const SolomonSolutionParser & )
delete

Member Function Documentation

◆ GetValueFromKey()

const std::string & operations_research::routing::SolomonSolutionParser::GetValueFromKey ( absl::string_view key) const
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.

◆ LoadFile()

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.

◆ NumberOfRoutes()

int operations_research::routing::SolomonSolutionParser::NumberOfRoutes ( ) const
inline

Returns the number of routes used in the solution.

Definition at line 152 of file solomon_parser.h.

◆ operator=()

const SolomonSolutionParser & operations_research::routing::SolomonSolutionParser::operator= ( const SolomonSolutionParser & )
delete

◆ route()

const std::vector< int > & operations_research::routing::SolomonSolutionParser::route ( int i) const
inline

Returns the sequence of the ith route, excluding depot nodes.

Definition at line 154 of file solomon_parser.h.


The documentation for this class was generated from the following files: