Class GlobalVehicleBreaksConstraint


public class GlobalVehicleBreaksConstraint extends Constraint
GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on
all vehicles in the dimension passed to its constructor.
It is intended to be used for dimensions representing time.
A break constraint ensures break intervals fit on the route of a vehicle.
For a given vehicle, it forces break intervals to be disjoint from visit
intervals, where visit intervals start at CumulVar(node) and last for
node_visit_transit[node]. Moreover, it ensures that there is enough time
between two consecutive nodes of a route to do transit and vehicle breaks,
i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB,
then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break).
  • Constructor Details

    • GlobalVehicleBreaksConstraint

      public GlobalVehicleBreaksConstraint(long cPtr, boolean cMemoryOwn)
    • GlobalVehicleBreaksConstraint

      public GlobalVehicleBreaksConstraint(RoutingDimension dimension)
  • Method Details

    • getCPtr

      public static long getCPtr(GlobalVehicleBreaksConstraint obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Constraint
    • delete

      public void delete()
      Overrides:
      delete in class Constraint
    • toString

      public String toString()
      Overrides:
      toString in class Constraint
    • post

      public void post()
      Description copied from class: Constraint
      This method is called when the constraint is processed by the
      solver. Its main usage is to attach demons to variables.
      Overrides:
      post in class Constraint
    • initialPropagate

      public void initialPropagate()
      Description copied from class: Constraint
      This method performs the initial propagation of the
      constraint. It is called just after the post.
      Overrides:
      initialPropagate in class Constraint