Skip to content

Commit

Permalink
Add lapse in vehicle_trips relation
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsecadeline committed Feb 18, 2021
1 parent 81ec64d commit 48783c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsp_simple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ void RelationBuilder(const TSPTWDataDT& data, RoutingModel& routing,
IntVar* const previous_end_cumul_var =
routing.GetMutableDimension(kTime)->CumulVar(previous_end_index);
solver->AddConstraint(
solver->MakeLessOrEqual(previous_end_cumul_var, current_cumul_var));
solver->MakeLessOrEqual(solver->MakeSum(previous_end_cumul_var, relation.lapse), current_cumul_var));
previous_vehicle_index = current_vehicle_index;
}
}
Expand Down

0 comments on commit 48783c6

Please sign in to comment.