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

Solomon parser class. More...

#include <solomon_parser.h>

Public Member Functions

 SolomonParser ()
 
 SolomonParser (const SolomonParser &)=delete
 
const SolomonParseroperator= (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.
 

Detailed Description

Solomon parser class.

Definition at line 59 of file solomon_parser.h.

Constructor & Destructor Documentation

◆ SolomonParser() [1/2]

operations_research::routing::SolomonParser::SolomonParser ( )

Definition at line 36 of file solomon_parser.cc.

◆ SolomonParser() [2/2]

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

Member Function Documentation

◆ capacity()

int64_t operations_research::routing::SolomonParser::capacity ( ) const
inline

Returns the capacity of the vehicles.

Definition at line 90 of file solomon_parser.h.

◆ coordinates()

const std::vector< Coordinates2< int64_t > > & operations_research::routing::SolomonParser::coordinates ( ) const
inline

Returns the coordinates of the nodes in the current routing problem.

Definition at line 86 of file solomon_parser.h.

◆ demands()

const std::vector< int64_t > & operations_research::routing::SolomonParser::demands ( ) const
inline

Returns the demand of the nodes in the current routing problem.

Definition at line 92 of file solomon_parser.h.

◆ Depot()

int operations_research::routing::SolomonParser::Depot ( ) const
inline

Returns the index of the depot.

Definition at line 80 of file solomon_parser.h.

◆ GetDistance()

double operations_research::routing::SolomonParser::GetDistance ( int from,
int to ) const
inline

Returns the distance between two nodes.

Definition at line 100 of file solomon_parser.h.

◆ GetTravelTime()

double operations_research::routing::SolomonParser::GetTravelTime ( int from,
int to ) const
inline

Returns the travel time between two nodes.

Definition at line 108 of file solomon_parser.h.

◆ LoadFile() [1/2]

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.

◆ LoadFile() [2/2]

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.

◆ name()

const std::string & operations_research::routing::SolomonParser::name ( ) const
inline

Returns the name of the instance being solved.

Definition at line 78 of file solomon_parser.h.

◆ NumberOfNodes()

int operations_research::routing::SolomonParser::NumberOfNodes ( ) const
inline

Returns the number of nodes in the current routing problem.

Definition at line 82 of file solomon_parser.h.

◆ NumberOfVehicles()

int operations_research::routing::SolomonParser::NumberOfVehicles ( ) const
inline

Returns the maximum number of vehicles to use.

Definition at line 84 of file solomon_parser.h.

◆ operator=()

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

◆ service_times()

const std::vector< int64_t > & operations_research::routing::SolomonParser::service_times ( ) const
inline

Returns the service times of the nodes in the current routing problem.

Definition at line 98 of file solomon_parser.h.

◆ time_windows()

const std::vector< SimpleTimeWindow< int64_t > > & operations_research::routing::SolomonParser::time_windows ( ) const
inline

Returns the time windows of the nodes in the current routing problem.

Definition at line 94 of file solomon_parser.h.


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