 |
vrpRouting
0.3
|
Go to the documentation of this file.
36 namespace initialsol {
49 problem::Solution(problem_ptr),
50 all_orders(m_orders.size()),
51 unassigned(m_orders.size()),
103 msg().
log <<
"\nInitial_solution::one_truck_all_orders\n";
108 truck.hillClimb(order);
128 while (!current_feasible.empty()) {
129 auto order =
m_orders[current_feasible.front()];
168 vehicle.
erase(order);
173 current_feasible =
m_orders[order.idx()].subsetJ(
177 current_feasible =
m_orders[order.idx()].subsetI(
182 current_feasible -= order.idx();
void erase(const Order &order)
erases the order from the vehicle
std::ostringstream log
Stores the hint information.
Identifiers< size_t > & feasible_orders()
returns the set of feasible orders for modification
std::deque< Vehicle_pickDeliver > m_fleet
The current solution.
Initials_code
Different kinds to insert an order into the vehicle.
bool hillClimb(const Order &order)
Inserts an order with hill Climb approach.
Vehicle_pickDeliver get_truck()
Finds an unused vehicle.
#define pgassertwm(expr, msg)
Adds a message to the assertion.
Identifiers< size_t > unassigned
void push_back(const Order &order)
puts an order at the end of the truck
@ BackTruck
Insetion at the front of the truck.
void do_while_foo(int kind)
@ OneDepot
Push front order that allows more orders to be inserted at the front.
#define pgassert(expr)
Uses the standard assert syntax.
Initial_solution()=delete
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_iterator begin() const
An assert functionality that uses C++ throw().
void push_front(const Order &order)
Puts an order at the end front of the truck.
@ OnePerTruck
All orders in one truck.
@ FrontTruck
One Order per truck.
void one_truck_all_orders()
Identifiers< size_t > assigned
bool is_feasible() const
is the solution feasible?
@ BestBack
Best place to insert Order.
size_t find_best_J(const Identifiers< size_t > &within_this_set) const
find the best order -> this -> order
void do_while_feasible(problem::Vehicle_pickDeliver &truck, Initials_code kind, Identifiers< size_t > &unassigned, Identifiers< size_t > &assigned)
size_t orders_size() const
@ BestFront
Push back order that allows more orders to be inserted at the back.
size_t find_best_I(const Identifiers< size_t > &within_this_set) const
find the best order -> this
@ BestInsert
Insetion at the back of the truck.
Orders m_orders
the problem info
Identifiers< size_t > all_orders