41 std::vector<General_vehicle_orders_t>
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());
68 for (
const auto& v :
fleet) {
69 if (v.is_feasable())
continue;
78 for (
const auto &v :
fleet) {
79 total += v.duration();
87 for (
const auto &v :
fleet) {
96 for (
const auto &v :
fleet) {
97 total += v.total_wait_time();
105 for (
const auto &v :
fleet) {
106 total += v.total_travel_time();
114 for (
const auto &v :
fleet) {
115 total += v.total_service_time();
123 for (
const auto &v :
fleet) {
131 double total_duration(0);
132 double total_wait_time(0);
135 for (
const auto &v :
fleet) {
136 total_duration += v.duration();
137 total_wait_time += v.total_wait_time();
138 total_twv += v.twvTot();
139 total_cv += v.cvTot();
141 return std::make_tuple(
142 total_twv, total_cv,
fleet.size(),
143 total_wait_time, total_duration);
151 std::ostringstream log;
153 log <<
"(twv, cv, fleet, wait, duration) = ("
154 << std::get<0>(s_cost) <<
", "
155 << std::get<1>(s_cost) <<
", "
156 << std::get<2>(s_cost) <<
", "
157 << std::get<3>(s_cost) <<
", "
158 << std::get<4>(s_cost) <<
")";
165 std::ostringstream log;
167 log <<
"\n" << title <<
": " << std::endl;
168 for (
const auto &v :
fleet) {
169 log <<
"\n" << v.tau();
178 for (
const auto &vehicle : solution.
fleet) {
182 log <<
"\n SOLUTION:\n\n "
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))
243 trucks(problem->trucks()) {
245 for (
const auto &t :
trucks) {
246 msg().
log << t.tau() <<
"\n";