Skip to content

[Help] MDVRP with WorkingTime TimeWindows, but DrivingTime Break #1652

Closed

Description

@kd509

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

Activity

  1. Steffaan commented on Mar 13, 2020

    @Steffaan

    Hi Karsten,

    Did you solve this problem. I'm also looking for a solutions to the EU driver time regulations in .NET?

    Regards,

    Steffaan

  2. kd509 commented on Mar 17, 2020

    @kd509
    Author

    Hi Karsten,

    Did you solve this problem. I'm also looking for a solutions to the EU driver time regulations in .NET?

    Regards,

    Steffaan

    No, I guess it is not possible with or-tools until the bug #1730 is not solved.

    Regards

    Karsten

  3. chris-eaton commented on Aug 21, 2020

    @chris-eaton

    Hi Karsten,

    Did you solve this problem. I'm also looking for a solutions to the EU driver time regulations in .NET?

    Regards,

    Steffaan

    HI Steffaan, did you ever find a solution? I am struggling to get this working in .NET.

  4. self-assigned this
    on Nov 4, 2020
  5. DanielaGuerinoni commented on Jan 20, 2021

    @DanielaGuerinoni

    Hi All, any update on this?

  6. added this to the v8.3 milestone on Feb 10, 2021
  7. metaism-ding commented on Mar 4, 2021

    @metaism-ding

    Any solution for this MDVRPTW ?

  8. modified the milestones: v9.0, v9.1 on Mar 22, 2021
  9. modified the milestones: v9.1, v9.2 on Aug 9, 2021
  10. modified the milestones: v9.2, Backlog on Oct 5, 2021
  11. locked and limited conversation to collaborators on Dec 7, 2021
  12. converted this issue into a discussion #2972 on Dec 7, 2021
  13. modified the milestones: Backlog, v9.4 on May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions