 |
vrpRouting
0.3
|
Go to the documentation of this file.
28 #ifndef INCLUDE_PROBLEM_VEHICLE_PICKDELIVER_H_
29 #define INCLUDE_PROBLEM_VEHICLE_PICKDELIVER_H_
66 log <<
"\n\n****************** " << v.
idx() <<
"th VEHICLE*************\n";
67 log <<
"id = " << v.
id()
68 <<
"\tcapacity = " << v.
capacity() <<
"\n";
70 for (
const auto &path_stop : v) {
71 log <<
"Path_stop" << ++i <<
"\n";
72 log << path_stop <<
"\n";
75 log << v.feasible_orders() <<
"\n";
87 const std::vector<int64_t>& p_stops,
91 Vehicle(p_idx, p_id, p_starting_site, p_ending_site, p_capacity, p_speed),
92 m_cost((std::numeric_limits<double>::max)()),
133 return orders()[at(1).idx()];
153 using Vehicle::begin;
155 using Vehicle::rbegin;
181 #endif // INCLUDE_PROBLEM_VEHICLE_PICKDELIVER_H_
Vehicle_pickDeliver()=delete
void set_unmovable(TTimestamp execution_date)
sets as unmovable the orders that start before the execution date
void erase(const Order &order)
erases the order from the vehicle
friend std::ostream & operator<<(std::ostream &log, const Vehicle_pickDeliver &v)
Identifiers< size_t > & feasible_orders()
returns the set of feasible orders for modification
Vehicle with time windows.
Order get_first_order() const
Identifiers< size_t > m_feasible_orders
orders that fit in the truck
int64_t id() const
get the original id
bool hillClimb(const Order &order)
Inserts an order with hill Climb approach.
std::vector< int64_t > m_stops
order ids of an initial solution given by the user [1,2,1,3,3,2] = P1 P2 D1 P3 D3 D2
void push_back(const Order &order)
puts an order at the end of the truck
#define pgassert(expr)
Uses the standard assert syntax.
double objective() const
Get the value of the objective function.
const Identifiers< size_t > & feasible_orders() const
returns the set of feasible orders
Identifiers< size_t > m_orders_in_vehicle
orders inserted in this vehicle
bool has_order(const Order &order) const
does the vehicle has the order?
bool semiLIFO(const Order &order)
Inserts an order In semi-Lifo (almost last in first out) order.
const Orders & orders() const
size_t idx() const
get the internal index
Extend Tw_node to evaluate the vehicle at node level.
bool is_order_feasible(const Order &order) const
An assert functionality that uses C++ throw().
Vehicle_pickDeliver(Idx p_idx, Id p_id, const Vehicle_node &p_starting_site, const Vehicle_node &p_ending_site, const std::vector< int64_t > &p_stops, PAmount p_capacity, Speed p_speed, const Orders &p_orders)
void push_front(const Order &order)
Puts an order at the end front of the truck.
bool has(const T other) const
true ids() has element
void insert_node(size_t pos, const Vehicle_node &node)
size_t orders_size() const
PAmount capacity() const
returns the capacity of the vehicle
void set_initial_solution(const Orders &, Identifiers< size_t > &, Identifiers< size_t > &, TTimestamp, bool)
sets the initial solution given by the user
void insert(size_t pos, const Vehicle_node &node)
Identifiers< size_t > orders_in_vehicle() const
returns the number of orders in the vehicle