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

Li&Lim parser class. More...

#include <lilim_parser.h>

Public Member Functions

 LiLimParser ()=default
 
 LiLimParser (LiLimParser &)=delete
 
const LiLimParseroperator= (const LiLimParser &)=delete
 
bool LoadFile (absl::string_view file_name)
 Loads instance from a file.
 
bool LoadFile (absl::string_view file_name, absl::string_view archive_name)
 
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.
 
std::optional< int > GetDelivery (int node) const
 Returns the delivery of a pickup.
 
std::optional< int > GetPickup (int node) const
 Returns the pickup of a delivery.
 
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

Li&Lim parser class.

Definition at line 57 of file lilim_parser.h.

Constructor & Destructor Documentation

◆ LiLimParser() [1/2]

operations_research::LiLimParser::LiLimParser ( )
default

◆ LiLimParser() [2/2]

operations_research::LiLimParser::LiLimParser ( LiLimParser & )
delete

Member Function Documentation

◆ capacity()

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

Returns the capacity of the vehicles.

Definition at line 89 of file lilim_parser.h.

◆ coordinates()

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

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

Definition at line 81 of file lilim_parser.h.

◆ demands()

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

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

Definition at line 91 of file lilim_parser.h.

◆ Depot()

int operations_research::LiLimParser::Depot ( ) const
inline

Returns the index of the depot.

Definition at line 75 of file lilim_parser.h.

◆ GetDelivery()

std::optional< int > operations_research::LiLimParser::GetDelivery ( int node) const

Returns the delivery of a pickup.

Definition at line 54 of file lilim_parser.cc.

◆ GetDistance()

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

Returns the distance between two nodes.

Definition at line 99 of file lilim_parser.h.

◆ GetPickup()

std::optional< int > operations_research::LiLimParser::GetPickup ( int node) const

Returns the pickup of a delivery.

Definition at line 60 of file lilim_parser.cc.

◆ GetTravelTime()

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

Returns the travel time between two nodes.

Definition at line 107 of file lilim_parser.h.

◆ LoadFile() [1/2]

bool operations_research::LiLimParser::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 35 of file lilim_parser.cc.

◆ LoadFile() [2/2]

bool operations_research::LiLimParser::LoadFile ( absl::string_view file_name,
absl::string_view archive_name )

Loads instance from a file contained in a zipped archive; the archive can contain multiple files.

Definition at line 40 of file lilim_parser.cc.

◆ NumberOfNodes()

int operations_research::LiLimParser::NumberOfNodes ( ) const
inline

Returns the number of nodes in the current routing problem.

Definition at line 77 of file lilim_parser.h.

◆ NumberOfVehicles()

int operations_research::LiLimParser::NumberOfVehicles ( ) const
inline

Returns the maximum number of vehicles to use.

Definition at line 79 of file lilim_parser.h.

◆ operator=()

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

◆ service_times()

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

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

Definition at line 97 of file lilim_parser.h.

◆ time_windows()

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

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

Definition at line 93 of file lilim_parser.h.


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