We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aff196 commit 3e70c70Copy full SHA for 3e70c70
cpp/src/routing/diversity/diverse_solver.hpp
@@ -865,9 +865,9 @@ struct solve {
865
temp_pair.first = injection_info.solutions[next_injection];
866
if (!p->has_vehicle_fixed_costs()) {
867
auto injection_it = next_injection;
868
- while (injection_it < injection_info.n_sol &&
+ while (injection_it < injection_info.n_sol-1 &&
869
temp_pair.first.sol.get_n_routes() > target_vehicles_) {
870
- temp_pair.first = injection_info.solutions[injection_it++];
+ temp_pair.first = injection_info.solutions[++injection_it];
871
}
872
next_injection = injection_it;
873
0 commit comments