Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <tsptw_parser.h>
Public Member Functions | |
TspTWParser () | |
bool | LoadFile (const std::string &file_name) |
Loads and parses a routing problem from a given file. | |
const std::function< double(int, int)> & | distance_function () const |
const std::function< double(int, int)> & | time_function () const |
int | depot () const |
Returns the index of the depot. | |
int | size () const |
Returns the number of nodes in the current routing problem. | |
double | total_service_time () const |
Returns the total service time already included in distance_function. | |
const std::vector< Coordinates2< double > > & | coordinates () const |
Returns the coordinates of the nodes in the current routing problem. | |
const std::vector< SimpleTimeWindow< double > > & | time_windows () const |
Returns the time windows of the nodes in the current routing problem. | |
const std::vector< double > & | service_times () const |
Returns the service times of the nodes in the current routing problem. | |
Definition at line 33 of file tsptw_parser.h.
operations_research::TspTWParser::TspTWParser | ( | ) |
Definition at line 62 of file tsptw_parser.cc.
|
inline |
Returns the coordinates of the nodes in the current routing problem.
Definition at line 57 of file tsptw_parser.h.
|
inline |
Returns the index of the depot.
Definition at line 51 of file tsptw_parser.h.
|
inline |
Returns a function returning the distance between nodes. On some instances service times are already included in values returned by this function. The actual distance of a route can be obtained by removing total_service_time() from the sum of distances in that case.
Definition at line 42 of file tsptw_parser.h.
bool operations_research::TspTWParser::LoadFile | ( | const std::string & | file_name | ) |
Loads and parses a routing problem from a given file.
Definition at line 69 of file tsptw_parser.cc.
|
inline |
Returns the service times of the nodes in the current routing problem.
Definition at line 65 of file tsptw_parser.h.
|
inline |
Returns the number of nodes in the current routing problem.
Definition at line 53 of file tsptw_parser.h.
|
inline |
Returns a function returning the time between nodes (equivalent to distance_function(i, j) + service_time(j)).
Definition at line 47 of file tsptw_parser.h.
|
inline |
Returns the time windows of the nodes in the current routing problem.
Definition at line 61 of file tsptw_parser.h.
|
inline |
Returns the total service time already included in distance_function.
Definition at line 55 of file tsptw_parser.h.