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

#include <carp_parser.h>

Public Member Functions

 CarpParser ()
 
 CarpParser (const CarpParser &)=delete
 
const CarpParseroperator= (const CarpParser &)=delete
 
bool LoadFile (absl::string_view file_name)
 Loads instance from a file into this parser object.
 
const std::string & name () const
 Returns the name of the instance being solved.
 
const std::string & comment () const
 Returns the comment of the instance being solved, typically an upper bound.
 
int64_t depot () const
 Returns the index of the depot.
 
int64_t NumberOfNodes () const
 Returns the number of nodes in the current routing problem.
 
int64_t NumberOfEdges () const
 
int64_t NumberOfEdgesWithServicing () const
 
int64_t NumberOfEdgesWithoutServicing () const
 
int64_t TotalServicingCost () const
 Returns the total servicing cost for all arcs.
 
const gtl::linked_hash_map< Edge, int64_t > & servicing_demands () const
 Returns the servicing of the edges in the current routing problem.
 
const gtl::linked_hash_map< Edge, int64_t > & traversing_costs () const
 Returns the traversing costs of the edges in the current routing problem.
 
int64_t NumberOfVehicles () const
 Returns the maximum number of vehicles to use.
 
int64_t capacity () const
 Returns the capacity of the vehicles.
 
int64_t GetTraversingCost (Edge edge) const
 
int64_t GetTraversingCost (int64_t tail, int64_t head) const
 
int64_t HasServicingNeed (Edge edge) const
 Checks whether this edge requires servicing.
 
int64_t HasServicingNeed (int64_t tail, int64_t head) const
 
int64_t GetServicing (Edge edge) const
 
int64_t GetServicing (int64_t tail, int64_t head) const
 

Detailed Description

Definition at line 70 of file carp_parser.h.

Constructor & Destructor Documentation

◆ CarpParser() [1/2]

operations_research::routing::CarpParser::CarpParser ( )

Definition at line 31 of file carp_parser.cc.

◆ CarpParser() [2/2]

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

Member Function Documentation

◆ capacity()

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

Returns the capacity of the vehicles.

Definition at line 118 of file carp_parser.h.

◆ comment()

const std::string & operations_research::routing::CarpParser::comment ( ) const
inline

Returns the comment of the instance being solved, typically an upper bound.

Definition at line 85 of file carp_parser.h.

◆ depot()

int64_t operations_research::routing::CarpParser::depot ( ) const
inline

Returns the index of the depot.

Definition at line 87 of file carp_parser.h.

◆ GetServicing() [1/2]

int64_t operations_research::routing::CarpParser::GetServicing ( Edge edge) const
inline

Returns the servicing for an edge. Only a subset of edges have a servicing need.

Definition at line 141 of file carp_parser.h.

◆ GetServicing() [2/2]

int64_t operations_research::routing::CarpParser::GetServicing ( int64_t tail,
int64_t head ) const
inline

Definition at line 146 of file carp_parser.h.

◆ GetTraversingCost() [1/2]

int64_t operations_research::routing::CarpParser::GetTraversingCost ( Edge edge) const
inline

Returns the traversing cost for an edge. All edges are supposed to have a traversing cost.

Definition at line 122 of file carp_parser.h.

◆ GetTraversingCost() [2/2]

int64_t operations_research::routing::CarpParser::GetTraversingCost ( int64_t tail,
int64_t head ) const
inline

Definition at line 127 of file carp_parser.h.

◆ HasServicingNeed() [1/2]

int64_t operations_research::routing::CarpParser::HasServicingNeed ( Edge edge) const
inline

Checks whether this edge requires servicing.

Definition at line 132 of file carp_parser.h.

◆ HasServicingNeed() [2/2]

int64_t operations_research::routing::CarpParser::HasServicingNeed ( int64_t tail,
int64_t head ) const
inline

Definition at line 135 of file carp_parser.h.

◆ LoadFile()

bool operations_research::routing::CarpParser::LoadFile ( absl::string_view file_name)

Loads instance from a file into this parser object.

Definition at line 48 of file carp_parser.cc.

◆ name()

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

Returns the name of the instance being solved.

Definition at line 83 of file carp_parser.h.

◆ NumberOfEdges()

int64_t operations_research::routing::CarpParser::NumberOfEdges ( ) const
inline

Returns the number of edges in the current routing problem, with or without servicing required.

Definition at line 92 of file carp_parser.h.

◆ NumberOfEdgesWithoutServicing()

int64_t operations_research::routing::CarpParser::NumberOfEdgesWithoutServicing ( ) const
inline

Returns the number of edges in the current routing problem that do not require servicing.

Definition at line 102 of file carp_parser.h.

◆ NumberOfEdgesWithServicing()

int64_t operations_research::routing::CarpParser::NumberOfEdgesWithServicing ( ) const
inline

Returns the number of edges in the current routing problem that require servicing.

Definition at line 97 of file carp_parser.h.

◆ NumberOfNodes()

int64_t operations_research::routing::CarpParser::NumberOfNodes ( ) const
inline

Returns the number of nodes in the current routing problem.

Definition at line 89 of file carp_parser.h.

◆ NumberOfVehicles()

int64_t operations_research::routing::CarpParser::NumberOfVehicles ( ) const
inline

Returns the maximum number of vehicles to use.

Definition at line 116 of file carp_parser.h.

◆ operator=()

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

◆ servicing_demands()

const gtl::linked_hash_map< Edge, int64_t > & operations_research::routing::CarpParser::servicing_demands ( ) const
inline

Returns the servicing of the edges in the current routing problem.

Definition at line 108 of file carp_parser.h.

◆ TotalServicingCost()

int64_t operations_research::routing::CarpParser::TotalServicingCost ( ) const
inline

Returns the total servicing cost for all arcs.

Definition at line 106 of file carp_parser.h.

◆ traversing_costs()

const gtl::linked_hash_map< Edge, int64_t > & operations_research::routing::CarpParser::traversing_costs ( ) const
inline

Returns the traversing costs of the edges in the current routing problem.

Definition at line 112 of file carp_parser.h.


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