![]() |
vrpRouting
0.3
|
#include "simple.h"
Public Member Functions | |
Initial_solution ()=delete | |
Initial_solution (Initials_code, problem::PickDeliver *) | |
std::tuple< int, int, size_t, TInterval, TInterval, TInterval > | cost () const |
Get all statistics in one cycle. More... | |
std::string | cost_str () const |
int | cvTot () const |
Total number of capacity constraint violations of the solution. More... | |
TInterval | duration () const |
Total duration of the solution. More... | |
const std::deque< Vehicle_pickDeliver > & | fleet () const |
Get the current fleet solution. More... | |
std::vector< Solution_rt > | get_postgres_result () const |
get solution like postgres needs it More... | |
std::vector< Short_vehicle > | get_stops () const |
get solution like postgres needs it More... | |
void | invariant () const |
bool | is_feasible () const |
is the solution feasible? More... | |
Pgr_messages & | msg () |
double | objective () const |
Get the value of the objective function. More... | |
bool | operator< (const Solution &) const |
const Orders & | orders () const |
std::string | tau (const std::string &title="Tau") const |
writing the solution in compact form into a string More... | |
TInterval | total_service_time () const |
Total service time of the solution. More... | |
TInterval | total_travel_time () const |
Total travel time of the solution. More... | |
int | twvTot () const |
Total number of time windows constraint violations of the solution. More... | |
Fleet & | vehicles () |
TInterval | wait_time () const |
Total waiting time of the solution. More... | |
Protected Attributes | |
std::deque< Vehicle_pickDeliver > | m_fleet |
The current solution. More... | |
Pgr_messages | m_msg |
Orders | m_orders |
the problem info More... | |
Fleet | m_trucks |
Private Member Functions | |
void | do_while_feasible (problem::Vehicle_pickDeliver &truck, Initials_code kind, Identifiers< size_t > &unassigned, Identifiers< size_t > &assigned) |
void | do_while_foo (int kind) |
void | one_truck_all_orders () |
Private Attributes | |
Identifiers< size_t > | all_orders |
Identifiers< size_t > | assigned |
Identifiers< size_t > | unassigned |
Definition at line 45 of file initialsol/simple.h.
|
delete |
vrprouting::initialsol::simple::Initial_solution::Initial_solution | ( | Initials_code | kind, |
problem::PickDeliver * | problem_ptr | ||
) |
Definition at line 46 of file initialsol/simple.cpp.
References vrprouting::initialsol::simple::BackTruck, vrprouting::initialsol::simple::BestBack, vrprouting::initialsol::simple::BestFront, vrprouting::initialsol::simple::BestInsert, do_while_foo(), vrprouting::initialsol::simple::FrontTruck, invariant(), one_truck_all_orders(), vrprouting::initialsol::simple::OneDepot, vrprouting::initialsol::simple::OnePerTruck, vrprouting::initialsol::simple::OneTruck, and pgassert.
Get all statistics in one cycle.
idx | variable |
---|---|
0 | twv |
1 | cv |
2 | fleet size |
3 | waiting time |
4 | duration |
5 | travel time |
Definition at line 218 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::problem::Solution::cost_str(), and vrprouting::problem::Solution::operator<().
|
inherited |
Definition at line 246 of file solution.cpp.
References vrprouting::problem::Solution::cost().
Referenced by vrprouting::problem::Solution::tau().
|
inherited |
Total number of capacity constraint violations of the solution.
Definition at line 196 of file solution.cpp.
References vrprouting::problem::Vehicle::cvTot(), and vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::problem::Solution::get_postgres_result().
|
private |
Definition at line 120 of file initialsol/simple.cpp.
References assigned, vrprouting::initialsol::simple::BackTruck, vrprouting::initialsol::simple::BestBack, vrprouting::initialsol::simple::BestFront, vrprouting::initialsol::simple::BestInsert, vrprouting::problem::Vehicle_pickDeliver::erase(), vrprouting::problem::Vehicle_pickDeliver::feasible_orders(), vrprouting::problem::Orders::find_best_I(), vrprouting::problem::Orders::find_best_J(), vrprouting::initialsol::simple::FrontTruck, vrprouting::problem::Vehicle_pickDeliver::has_order(), vrprouting::problem::Vehicle_pickDeliver::hillClimb(), invariant(), vrprouting::problem::Solution::is_feasible(), vrprouting::problem::Solution::m_orders, vrprouting::initialsol::simple::OneDepot, vrprouting::initialsol::simple::OnePerTruck, vrprouting::problem::Vehicle_pickDeliver::orders_size(), pgassert, vrprouting::problem::Vehicle_pickDeliver::push_back(), vrprouting::problem::Vehicle_pickDeliver::push_front(), vrprouting::problem::Vehicle_pickDeliver::semiLIFO(), and unassigned.
Referenced by do_while_foo().
|
private |
Definition at line 76 of file initialsol/simple.cpp.
References assigned, do_while_feasible(), Identifiers< T >::empty(), Identifiers< T >::front(), vrprouting::problem::Fleet::get_truck(), invariant(), vrprouting::problem::Solution::is_feasible(), vrprouting::problem::Solution::m_fleet, vrprouting::problem::Solution::msg(), vrprouting::initialsol::simple::OneDepot, pgassert, pgassertwm, Identifiers< T >::size(), unassigned, and vrprouting::problem::Solution::vehicles().
Referenced by Initial_solution().
|
inherited |
Total duration of the solution.
The solution duration is the sum of the durations of all vehicles
Definition at line 140 of file solution.cpp.
References vrprouting::problem::Vehicle::duration(), and vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::problem::Solution::get_postgres_result(), vrprouting::optimizers::simple::Optimize::save_if_best(), and vrprouting::optimizers::simple::Optimize::swap_worse().
|
inlineinherited |
Get the current fleet solution.
Definition at line 107 of file solution.h.
References vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::optimizers::tabu::Optimize::intensify(), and vrprouting::optimizers::tabu::Optimize::Optimize().
|
inherited |
get solution like postgres needs it
Definition at line 61 of file solution.cpp.
References vrprouting::problem::Solution::cvTot(), vrprouting::problem::Solution::duration(), vrprouting::problem::Solution::m_fleet, vrprouting::problem::Solution::total_service_time(), vrprouting::problem::Solution::total_travel_time(), vrprouting::problem::Solution::twvTot(), and vrprouting::problem::Solution::wait_time().
|
inherited |
get solution like postgres needs it
Definition at line 49 of file solution.cpp.
References Short_vehicle::id, and vrprouting::problem::Solution::m_fleet.
void vrprouting::initialsol::simple::Initial_solution::invariant | ( | ) | const |
Definition at line 40 of file initialsol/simple.cpp.
References all_orders, assigned, pgassert, and unassigned.
Referenced by do_while_feasible(), do_while_foo(), Initial_solution(), and one_truck_all_orders().
|
inherited |
is the solution feasible?
The solution is feasible when all vehicles are feasible.
Definition at line 129 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::optimizers::simple::Optimize::decrease_truck(), do_while_feasible(), do_while_foo(), vrprouting::initialsol::tabu::Initial_solution::Initial_solution(), vrprouting::initialsol::tabu::Initial_solution::process_given_solution_from_user(), and vrprouting::initialsol::tabu::Initial_solution::process_unassigned().
|
inlineinherited |
Definition at line 119 of file solution.h.
References vrprouting::problem::Solution::m_msg.
Referenced by do_while_foo(), vrprouting::optimizers::simple::Optimize::inter_swap(), vrprouting::optimizers::tabu::Optimize::move_2_real(), one_truck_all_orders(), vrprouting::optimizers::simple::Optimize::Optimize(), vrprouting::optimizers::tabu::Optimize::Optimize(), vrprouting::initialsol::tabu::Initial_solution::process_unassigned(), vrprouting::optimizers::simple::Optimize::save_if_best(), and vrprouting::optimizers::tabu::Optimize::tabu_search().
|
inlineinherited |
Get the value of the objective function.
Definition at line 110 of file solution.h.
References vrprouting::problem::Solution::total_travel_time().
Referenced by vrprouting::optimizers::tabu::Optimize::move_2_real(), vrprouting::optimizers::tabu::Optimize::single_pair_insertion(), vrprouting::optimizers::tabu::Optimize::swap_between_routes(), and vrprouting::optimizers::tabu::Optimize::tabu_search().
|
private |
Definition at line 101 of file initialsol/simple.cpp.
References assigned, Identifiers< T >::begin(), Identifiers< T >::empty(), Identifiers< T >::front(), vrprouting::problem::Fleet::get_truck(), invariant(), vrprouting::Pgr_messages::log, vrprouting::problem::Solution::m_fleet, vrprouting::problem::Solution::msg(), Identifiers< T >::pop_front(), unassigned, and vrprouting::problem::Solution::vehicles().
Referenced by Initial_solution().
|
inherited |
|
inlineinherited |
Definition at line 120 of file solution.h.
References vrprouting::problem::Solution::m_orders.
Referenced by vrprouting::optimizers::simple::Optimize::decrease_truck(), vrprouting::optimizers::tabu::Optimize::diversify(), vrprouting::optimizers::tabu::Optimize::move_2_real(), vrprouting::initialsol::tabu::Initial_solution::process_given_solution_from_user(), vrprouting::initialsol::tabu::Initial_solution::process_unassigned(), vrprouting::optimizers::tabu::Optimize::set_tabu_list_length(), vrprouting::optimizers::tabu::Optimize::single_pair_insertion(), and vrprouting::optimizers::tabu::Optimize::swap_between_routes().
|
inherited |
writing the solution in compact form into a string
[in] | title | Title to Use for the tau |
Definition at line 116 of file solution.cpp.
References vrprouting::problem::Solution::cost_str(), and vrprouting::problem::Solution::m_fleet.
Referenced by vrprouting::optimizers::simple::Optimize::inter_swap(), vrprouting::optimizers::simple::Optimize::Optimize(), and vrprouting::optimizers::tabu::Optimize::Optimize().
|
inherited |
Total service time of the solution.
The total service time of the solution is the sum of the service times of all vehicles
Definition at line 174 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet, and vrprouting::problem::Vehicle::total_service_time().
Referenced by vrprouting::problem::Solution::get_postgres_result().
|
inherited |
Total travel time of the solution.
The total travel time of the solution is the sum of the travel times of all vehicles
Definition at line 162 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet, and vrprouting::problem::Vehicle::total_travel_time().
Referenced by vrprouting::problem::Solution::get_postgres_result(), and vrprouting::problem::Solution::objective().
|
inherited |
Total number of time windows constraint violations of the solution.
The total time window violations of the solution is the sum of the time window violations of all vehicles
Definition at line 185 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet, and vrprouting::problem::Vehicle::twvTot().
Referenced by vrprouting::problem::Solution::get_postgres_result().
|
inlineinherited |
Definition at line 121 of file solution.h.
References vrprouting::problem::Solution::m_trucks.
Referenced by do_while_foo(), vrprouting::initialsol::tabu::Initial_solution::Initial_solution(), one_truck_all_orders(), vrprouting::initialsol::tabu::Initial_solution::process_given_solution_from_user(), and vrprouting::initialsol::tabu::Initial_solution::process_unassigned().
|
inherited |
Total waiting time of the solution.
The total waiting time of the solution is the sum of the waiting time of all vehicles
Definition at line 151 of file solution.cpp.
References vrprouting::problem::Solution::m_fleet, and vrprouting::problem::Vehicle::total_wait_time().
Referenced by vrprouting::problem::Solution::get_postgres_result().
|
private |
Definition at line 66 of file initialsol/simple.h.
Referenced by invariant().
|
private |
Definition at line 68 of file initialsol/simple.h.
Referenced by do_while_feasible(), do_while_foo(), invariant(), and one_truck_all_orders().
|
protectedinherited |
The current solution.
Definition at line 125 of file solution.h.
Referenced by vrprouting::problem::Solution::cost(), vrprouting::problem::Solution::cvTot(), vrprouting::optimizers::simple::Optimize::decrease_truck(), vrprouting::optimizers::simple::Optimize::delete_empty_truck(), vrprouting::optimizers::tabu::Optimize::diversify(), do_while_foo(), vrprouting::problem::Solution::duration(), vrprouting::problem::Solution::fleet(), vrprouting::problem::Solution::get_postgres_result(), vrprouting::problem::Solution::get_stops(), vrprouting::initialsol::tabu::Initial_solution::Initial_solution(), vrprouting::optimizers::tabu::Optimize::intensify(), vrprouting::optimizers::simple::Optimize::inter_swap(), vrprouting::problem::Solution::is_feasible(), vrprouting::optimizers::tabu::Optimize::move_2_real(), one_truck_all_orders(), vrprouting::optimizers::simple::Optimize::Optimize(), vrprouting::optimizers::tabu::Optimize::Optimize(), vrprouting::initialsol::tabu::Initial_solution::process_given_solution_from_user(), vrprouting::initialsol::tabu::Initial_solution::process_unassigned(), vrprouting::optimizers::simple::Optimize::save_if_best(), vrprouting::optimizers::tabu::Optimize::single_pair_insertion(), vrprouting::optimizers::simple::Optimize::sort_by_duration(), vrprouting::optimizers::simple::Optimize::sort_by_id(), vrprouting::optimizers::simple::Optimize::sort_by_size(), vrprouting::optimizers::tabu::Optimize::sort_by_size(), vrprouting::optimizers::simple::Optimize::sort_for_move(), vrprouting::optimizers::tabu::Optimize::swap_between_routes(), vrprouting::optimizers::tabu::Optimize::tabu_search(), vrprouting::problem::Solution::tau(), vrprouting::problem::Solution::total_service_time(), vrprouting::problem::Solution::total_travel_time(), vrprouting::problem::Solution::twvTot(), and vrprouting::problem::Solution::wait_time().
|
protectedinherited |
Definition at line 130 of file solution.h.
Referenced by vrprouting::problem::Solution::msg().
|
protectedinherited |
the problem info
Definition at line 128 of file solution.h.
Referenced by do_while_feasible(), and vrprouting::problem::Solution::orders().
|
protectedinherited |
Definition at line 129 of file solution.h.
Referenced by vrprouting::problem::Solution::vehicles().
|
private |
Definition at line 67 of file initialsol/simple.h.
Referenced by do_while_feasible(), do_while_foo(), invariant(), and one_truck_all_orders().