Thanks to visit codestin.com
Credit goes to github.com

Skip to content

VRP with breaks minor bug? #4234

@vuongdanghuy

Description

@vuongdanghuy

What version of OR-Tools and what language are you using?
Version: stable branch
Language: C++

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Routing Library

What operating system (Linux, Windows, ...) and version?
Linux Mint 21.3

What did you do?
Using VRP with breaks. GlobalVehicleBreaksConstraint will be added to the Solver.

What did you expect to see
I believe here we're updating StartMin value of the arc path_[pos] -> path_[pos + 1] to EndMin value of the break interval. This arc StartMin is CumulVar(path_[pos])->Min() - arc_start_offset. So instead of SetMin(CapSub(interval_end_min, arc_start_offset)) it should be SetMin(CapAdd(interval_end_min, arc_start_offset)).

// Interval not after.
if (interval_start_max < arc_end_min) {
interval->SetEndMax(arc_start_max);
if (interval_is_performed) {
dimension_->CumulVar(path_[pos])
->SetMin(CapSub(interval_end_min, arc_start_offset));
}
}
continue;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions