-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Help NeededModeling/Usage problemModeling/Usage problemLang: .NET.Net wrapper issue.Net wrapper issueSolver: RoutingUses the Routing library and the original CP solverUses the Routing library and the original CP solverSolver: Routing - breakRouting break related issueRouting break related issue
Milestone
Description
Hello,
I started with or-tools some days ago in C# and have a problem now with breaks. Maybe somebody can help me.
I try to solve a routing problem (MDVRP with TimeWindows and Capacity). The TimeWindows are based on working time, which means driving time + service time. So far so good.
What I try to implement now, is a break based on driving time only. So the driver of a vehicle can use the vehicle about 6 hours, but after a maximum of 4.5 hours of driving (!) he needs a break of 45 minutes.
I create the break per vehicle in the following way:
IntervalVarVector breaks = new IntervalVarVector();
IntervalVar breakInterval = solver.MakeFixedDurationIntervalVar(theBreak.timeWindow.Start, theBreak.timeWindow.End, theBreak.Duration, false, $"Break_{b}_{vehicle.Id}");
RoutingDimension rdDrivingTime = routing.GetMutableDimension("drivingTime");
breaks.Add(breakInterval);
rdDrivingTime.SetBreakIntervalsOfVehicle(breaks, i, node_visit_transits);But how to tell the dimension "workingTime", to insert a break at the correct time, because my break bases on drivingTime?
Regards
Karsten
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Help NeededModeling/Usage problemModeling/Usage problemLang: .NET.Net wrapper issue.Net wrapper issueSolver: RoutingUses the Routing library and the original CP solverUses the Routing library and the original CP solverSolver: Routing - breakRouting break related issueRouting break related issue