MCPcopy Create free account
hub / github.com/VROOM-Project/vroom / Solution

Method Solution

src/structures/vroom/solution/solution.cpp:14–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace vroom {
13
14Solution::Solution(const Amount& zero_amount,
15 std::vector<Route>&& routes,
16 std::vector<Job>&& unassigned)
17 : summary(routes.size(), unassigned.size(), zero_amount),
18 routes(std::move(routes)),
19 unassigned(std::move(unassigned)) {
20
21 for (const auto& route : this->routes) {
22 summary.cost += route.cost;
23 summary.delivery += route.delivery;
24 summary.pickup += route.pickup;
25 summary.setup += route.setup;
26 summary.service += route.service;
27 summary.priority += route.priority;
28 summary.duration += route.duration;
29 summary.distance += route.distance;
30 summary.waiting_time += route.waiting_time;
31 summary.violations += route.violations;
32 }
33}
34
35} // namespace vroom

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected