OR-Tools  9.6
TspLibParserfinal

Detailed Description

Definition at line 39 of file tsplib_parser.h.

Public Types

enum  Types {
  TSP , ATSP , SOP , HCP ,
  CVRP , TOUR , UNDEFINED_TYPE
}
 

Public Member Functions

 TspLibParser ()
 
bool LoadFile (const std::string &file_name)
 
int SizeFromFile (const std::string &file_name) const
 
EdgeWeights GetEdgeWeights () const
 
int depot () const
 
int size () const
 
Types type () const
 
const std::vector< Coordinates3< double > > & coordinates () const
 
int64_t capacity () const
 
int64_t max_distance () const
 
const std::vector< int64_t > & demands () const
 
const std::set< std::pair< int, int > > fixed_edges () const
 
const std::vector< std::vector< int > > & edges () const
 
const std::string & name () const
 
const std::string & comments () const
 
std::string BuildTourFromRoutes (const std::vector< std::vector< int >> &routes) const
 

Member Enumeration Documentation

◆ Types

enum Types
Enumerator
TSP 
ATSP 
SOP 
HCP 
CVRP 
TOUR 
UNDEFINED_TYPE 

Definition at line 42 of file tsplib_parser.h.

Constructor & Destructor Documentation

◆ TspLibParser()

Definition at line 157 of file tsplib_parser.cc.

Member Function Documentation

◆ BuildTourFromRoutes()

std::string BuildTourFromRoutes ( const std::vector< std::vector< int >> &  routes) const

Definition at line 661 of file tsplib_parser.cc.

◆ capacity()

int64_t capacity ( ) const
inline

Definition at line 63 of file tsplib_parser.h.

◆ comments()

const std::string& comments ( ) const
inline

Definition at line 79 of file tsplib_parser.h.

◆ coordinates()

const std::vector<Coordinates3<double> >& coordinates ( ) const
inline

Definition at line 59 of file tsplib_parser.h.

◆ demands()

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

Definition at line 67 of file tsplib_parser.h.

◆ depot()

int depot ( ) const
inline

Definition at line 52 of file tsplib_parser.h.

◆ edges()

const std::vector<std::vector<int> >& edges ( ) const
inline

Definition at line 75 of file tsplib_parser.h.

◆ fixed_edges()

const std::set<std::pair<int, int> > fixed_edges ( ) const
inline

Definition at line 70 of file tsplib_parser.h.

◆ GetEdgeWeights()

EdgeWeights GetEdgeWeights ( ) const
inline

Definition at line 50 of file tsplib_parser.h.

◆ LoadFile()

bool LoadFile ( const std::string &  file_name)

Definition at line 172 of file tsplib_parser.cc.

◆ max_distance()

int64_t max_distance ( ) const
inline

Definition at line 65 of file tsplib_parser.h.

◆ name()

const std::string& name ( ) const
inline

Definition at line 77 of file tsplib_parser.h.

◆ size()

int size ( ) const
inline

Definition at line 54 of file tsplib_parser.h.

◆ SizeFromFile()

int SizeFromFile ( const std::string &  file_name) const

Definition at line 183 of file tsplib_parser.cc.

◆ type()

Types type ( ) const
inline

Definition at line 56 of file tsplib_parser.h.


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