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

#include <carp_parser.h>

Public Member Functions

 CarpParser ()
 
 CarpParser (const CarpParser &)=delete
 
const CarpParseroperator= (const CarpParser &)=delete
 
bool LoadFile (const std::string &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 69 of file carp_parser.h.

Constructor & Destructor Documentation

◆ CarpParser() [1/2]

operations_research::CarpParser::CarpParser ( )

Definition at line 30 of file carp_parser.cc.

◆ CarpParser() [2/2]

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

Member Function Documentation

◆ capacity()

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

Returns the capacity of the vehicles.

Definition at line 117 of file carp_parser.h.

◆ comment()

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

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

Definition at line 84 of file carp_parser.h.

◆ depot()

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

Returns the index of the depot.

Definition at line 86 of file carp_parser.h.

◆ GetServicing() [1/2]

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

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

Definition at line 140 of file carp_parser.h.

◆ GetServicing() [2/2]

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

Definition at line 145 of file carp_parser.h.

◆ GetTraversingCost() [1/2]

int64_t operations_research::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 121 of file carp_parser.h.

◆ GetTraversingCost() [2/2]

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

Definition at line 126 of file carp_parser.h.

◆ HasServicingNeed() [1/2]

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

Checks whether this edge requires servicing.

Definition at line 131 of file carp_parser.h.

◆ HasServicingNeed() [2/2]

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

Definition at line 134 of file carp_parser.h.

◆ LoadFile()

bool operations_research::CarpParser::LoadFile ( const std::string & file_name)

Loads instance from a file into this parser object.

Definition at line 47 of file carp_parser.cc.

◆ name()

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

Returns the name of the instance being solved.

Definition at line 82 of file carp_parser.h.

◆ NumberOfEdges()

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

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

Definition at line 91 of file carp_parser.h.

◆ NumberOfEdgesWithoutServicing()

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

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

Definition at line 101 of file carp_parser.h.

◆ NumberOfEdgesWithServicing()

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

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

Definition at line 96 of file carp_parser.h.

◆ NumberOfNodes()

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

Returns the number of nodes in the current routing problem.

Definition at line 88 of file carp_parser.h.

◆ NumberOfVehicles()

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

Returns the maximum number of vehicles to use.

Definition at line 115 of file carp_parser.h.

◆ operator=()

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

◆ servicing_demands()

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

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

Definition at line 107 of file carp_parser.h.

◆ TotalServicingCost()

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

Returns the total servicing cost for all arcs.

Definition at line 105 of file carp_parser.h.

◆ traversing_costs()

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

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

Definition at line 111 of file carp_parser.h.


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