#include "initial_solution.h"
Definition at line 46 of file initial_solution.h.
◆ Initial_solution()
pgrouting::vrp::Initial_solution::Initial_solution |
( |
Initials_code |
kind, |
|
|
size_t |
number_of_orders |
|
) |
| |
Definition at line 46 of file initial_solution.cpp.
References pgrouting::vrp::BackTruck, pgrouting::vrp::BestBack, pgrouting::vrp::BestFront, pgrouting::vrp::BestInsert, do_while_foo(), pgrouting::vrp::FrontTruck, invariant(), one_truck_all_orders(), pgrouting::vrp::OneDepot, pgrouting::vrp::OnePerTruck, pgrouting::vrp::OneTruck, and pgassert.
◆ cost()
◆ cost_str()
std::string pgrouting::vrp::Solution::cost_str |
( |
| ) |
const |
|
inherited |
◆ cvTot()
int pgrouting::vrp::Solution::cvTot |
( |
| ) |
const |
|
inherited |
◆ do_while_foo()
void pgrouting::vrp::Initial_solution::do_while_foo |
( |
int |
kind | ) |
|
|
private |
Definition at line 78 of file initial_solution.cpp.
83 msg().
log <<
"\nInitial_solution::do_while_foo\n";
95 msg().
log <<
"got truck:" << truck.tau() <<
"\n";
108 fleet.push_back(truck);
References Identifiers< T >::empty(), pgrouting::vrp::Solution::fleet, Identifiers< T >::front(), pgrouting::vrp::Fleet::get_truck(), invariant(), pgrouting::vrp::Solution::is_feasable(), pgrouting::Pgr_messages::log, m_assigned, m_unassigned, pgrouting::vrp::Solution::msg(), pgrouting::vrp::OneDepot, pgassert, pgassertwm, Identifiers< T >::size(), and pgrouting::vrp::Solution::trucks.
Referenced by Initial_solution().
◆ duration()
double pgrouting::vrp::Solution::duration |
( |
| ) |
const |
|
inherited |
◆ get_kind()
◆ get_postgres_result()
Definition at line 42 of file solution.cpp.
43 std::vector<General_vehicle_orders_t> result;
46 for (
const auto& truck :
fleet) {
47 std::vector<General_vehicle_orders_t> data =
48 truck.get_postgres_result(i);
49 result.insert(result.end(), data.begin(), data.end());
References pgrouting::vrp::Solution::fleet.
◆ invariant()
void pgrouting::vrp::Initial_solution::invariant |
( |
| ) |
const |
◆ is_feasable()
bool pgrouting::vrp::Solution::is_feasable |
( |
| ) |
const |
|
inherited |
◆ msg()
◆ one_truck_all_orders()
void pgrouting::vrp::Initial_solution::one_truck_all_orders |
( |
| ) |
|
|
private |
Definition at line 121 of file initial_solution.cpp.
123 msg().
log <<
"\nInitial_solution::one_truck_all_orders\n";
135 fleet.push_back(truck);
References Identifiers< T >::begin(), Identifiers< T >::empty(), pgrouting::vrp::Solution::fleet, Identifiers< T >::front(), pgrouting::vrp::Fleet::get_truck(), invariant(), pgrouting::Pgr_messages::log, m_assigned, m_unassigned, pgrouting::vrp::Solution::msg(), Identifiers< T >::pop_front(), and pgrouting::vrp::Solution::trucks.
Referenced by Initial_solution().
◆ operator<()
bool pgrouting::vrp::Solution::operator< |
( |
const Solution & |
s_rhs | ) |
const |
|
inherited |
Definition at line 189 of file solution.cpp.
196 if (std::get<0>(lhs) < std::get<0>(rhs))
198 if (std::get<0>(lhs) > std::get<0>(rhs))
204 if (std::get<1>(lhs) < std::get<1>(rhs))
206 if (std::get<1>(lhs) > std::get<1>(rhs))
212 if (std::get<2>(lhs) < std::get<2>(rhs))
214 if (std::get<2>(lhs) > std::get<2>(rhs))
220 if (std::get<3>(lhs) < std::get<3>(rhs))
222 if (std::get<3>(lhs) > std::get<3>(rhs))
228 if (std::get<4>(lhs) < std::get<4>(rhs))
230 if (std::get<4>(lhs) > std::get<4>(rhs))
References pgrouting::vrp::Solution::cost().
◆ tau()
std::string pgrouting::vrp::Solution::tau |
( |
const std::string & |
title = "Tau" | ) |
const |
|
inherited |
◆ total_service_time()
double pgrouting::vrp::Solution::total_service_time |
( |
| ) |
const |
|
inherited |
◆ total_travel_time()
double pgrouting::vrp::Solution::total_travel_time |
( |
| ) |
const |
|
inherited |
◆ twvTot()
int pgrouting::vrp::Solution::twvTot |
( |
| ) |
const |
|
inherited |
◆ wait_time()
double pgrouting::vrp::Solution::wait_time |
( |
| ) |
const |
|
inherited |
◆ EPSILON
double pgrouting::vrp::Solution::EPSILON |
|
protectedinherited |
◆ fleet
Definition at line 49 of file solution.h.
Referenced by pgrouting::vrp::Solution::cost(), pgrouting::vrp::Solution::cvTot(), pgrouting::vrp::Optimize::decrease_truck(), pgrouting::vrp::Optimize::delete_empty_truck(), do_while_foo(), pgrouting::vrp::Solution::duration(), pgrouting::vrp::Solution::get_postgres_result(), pgrouting::vrp::Optimize::inter_swap(), pgrouting::vrp::Solution::is_feasable(), one_truck_all_orders(), pgrouting::vrp::operator<<(), pgrouting::vrp::Solution::operator=(), pgrouting::vrp::Optimize::Optimize(), pgrouting::vrp::Optimize::save_if_best(), pgrouting::vrp::Optimize::sort_by_duration(), pgrouting::vrp::Optimize::sort_by_size(), pgrouting::vrp::Solution::tau(), pgrouting::vrp::Solution::total_service_time(), pgrouting::vrp::Solution::total_travel_time(), pgrouting::vrp::Solution::twvTot(), and pgrouting::vrp::Solution::wait_time().
◆ m_all_orders
Identifiers<size_t> pgrouting::vrp::Initial_solution::m_all_orders |
|
private |
◆ m_assigned
Identifiers<size_t> pgrouting::vrp::Initial_solution::m_assigned |
|
private |
◆ m_unassigned
Identifiers<size_t> pgrouting::vrp::Initial_solution::m_unassigned |
|
private |
◆ problem
◆ trucks
Fleet pgrouting::vrp::Solution::trucks |
|
protectedinherited |
The documentation for this class was generated from the following files: