Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Li&Lim parser class. More...
#include <lilim_parser.h>
Public Member Functions | |
LiLimParser ()=default | |
LiLimParser (LiLimParser &)=delete | |
const LiLimParser & | operator= (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. | |
Li&Lim parser class.
Definition at line 57 of file lilim_parser.h.
|
default |
|
delete |
|
inline |
Returns the capacity of the vehicles.
Definition at line 89 of file lilim_parser.h.
|
inline |
Returns the coordinates of the nodes in the current routing problem.
Definition at line 81 of file lilim_parser.h.
|
inline |
Returns the demand of the nodes in the current routing problem.
Definition at line 91 of file lilim_parser.h.
|
inline |
Returns the index of the depot.
Definition at line 75 of file lilim_parser.h.
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.
|
inline |
Returns the distance between two nodes.
Definition at line 99 of file lilim_parser.h.
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.
|
inline |
Returns the travel time between two nodes.
Definition at line 107 of file lilim_parser.h.
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.
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.
|
inline |
Returns the number of nodes in the current routing problem.
Definition at line 77 of file lilim_parser.h.
|
inline |
Returns the maximum number of vehicles to use.
Definition at line 79 of file lilim_parser.h.
|
delete |
|
inline |
Returns the service times of the nodes in the current routing problem.
Definition at line 97 of file lilim_parser.h.
|
inline |
Returns the time windows of the nodes in the current routing problem.
Definition at line 93 of file lilim_parser.h.