Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::routing::TspLibParser Class Referencefinal

Detailed Description

Definition at line 42 of file tsplib_parser.h.

#include <tsplib_parser.h>

Public Types

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

Public Member Functions

 TspLibParser ()
absl::Status LoadFile (absl::string_view file_name)
absl::StatusOr< int > SizeFromFile (absl::string_view 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
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 (absl::Span< const std::vector< int > > routes) const

Member Enumeration Documentation

◆ Types

Enumerator
TSP 
ATSP 
SOP 
HCP 
CVRP 
TOUR 
UNDEFINED_TYPE 

Definition at line 45 of file tsplib_parser.h.

Constructor & Destructor Documentation

◆ TspLibParser()

operations_research::routing::TspLibParser::TspLibParser ( )

Definition at line 170 of file tsplib_parser.cc.

Member Function Documentation

◆ BuildTourFromRoutes()

std::string operations_research::routing::TspLibParser::BuildTourFromRoutes ( absl::Span< const std::vector< int > > routes) const

Definition at line 692 of file tsplib_parser.cc.

◆ capacity()

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

Definition at line 66 of file tsplib_parser.h.

◆ comments()

const std::string & operations_research::routing::TspLibParser::comments ( ) const
inline

Definition at line 80 of file tsplib_parser.h.

◆ coordinates()

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

Definition at line 62 of file tsplib_parser.h.

◆ demands()

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

Definition at line 70 of file tsplib_parser.h.

◆ depot()

int operations_research::routing::TspLibParser::depot ( ) const
inline

Definition at line 55 of file tsplib_parser.h.

◆ edges()

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

Definition at line 76 of file tsplib_parser.h.

◆ fixed_edges()

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

Definition at line 73 of file tsplib_parser.h.

◆ GetEdgeWeights()

EdgeWeights operations_research::routing::TspLibParser::GetEdgeWeights ( ) const
inline

Definition at line 53 of file tsplib_parser.h.

◆ LoadFile()

absl::Status operations_research::routing::TspLibParser::LoadFile ( absl::string_view file_name)

Definition at line 193 of file tsplib_parser.cc.

◆ max_distance()

int64_t operations_research::routing::TspLibParser::max_distance ( ) const
inline

Definition at line 68 of file tsplib_parser.h.

◆ name()

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

Definition at line 78 of file tsplib_parser.h.

◆ size()

int operations_research::routing::TspLibParser::size ( ) const
inline

Definition at line 57 of file tsplib_parser.h.

◆ SizeFromFile()

absl::StatusOr< int > operations_research::routing::TspLibParser::SizeFromFile ( absl::string_view file_name) const

Definition at line 210 of file tsplib_parser.cc.

◆ type()

Types operations_research::routing::TspLibParser::type ( ) const
inline

Definition at line 59 of file tsplib_parser.h.


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