21#ifndef OR_TOOLS_ROUTING_PARSERS_TSPTW_PARSER_H_
22#define OR_TOOLS_ROUTING_PARSERS_TSPTW_PARSER_H_
37 bool LoadFile(
const std::string& file_name);
43 return distance_function_;
48 return time_function_;
51 int depot()
const {
return depot_; }
53 int size()
const {
return size_; }
57 const std::vector<Coordinates2<double>>&
coordinates()
const {
61 const std::vector<SimpleTimeWindow<double>>&
time_windows()
const {
65 const std::vector<double>&
service_times()
const {
return service_times_; }
72 bool ParseLopezIbanezBlum(
const std::string& file_name);
73 bool ParseDaSilvaUrrutia(
const std::string& file_name);
77 double total_service_time_;
78 std::function<double(
int,
int)> distance_function_;
79 std::function<double(
int,
int)> time_function_;
80 std::vector<Coordinates2<double>> coords_;
81 std::vector<SimpleTimeWindow<double>> time_windows_;
82 std::vector<double> service_times_;
83 std::vector<double> distance_matrix_;
const std::function< double(int, int)> & distance_function() const
const std::vector< double > & service_times() const
Returns the service times of the nodes in the current routing problem.
bool LoadFile(const std::string &file_name)
Loads and parses a routing problem from a given file.
const std::function< double(int, int)> & time_function() const
int depot() const
Returns the index of the depot.
const std::vector< SimpleTimeWindow< double > > & time_windows() const
Returns the time windows of the nodes in the current routing problem.
const std::vector< Coordinates2< double > > & coordinates() const
Returns the coordinates of the nodes in the current routing problem.
double total_service_time() const
Returns the total service time already included in distance_function.
int size() const
Returns the number of nodes in the current routing problem.
In SWIG mode, we don't want anything besides these top-level includes.