Class GlobalVehicleBreaksConstraint
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.PropagationBaseObject
com.google.ortools.constraintsolver.Constraint
com.google.ortools.constraintsolver.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).
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).
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
Constructors Modifier Constructor Description protectedGlobalVehicleBreaksConstraint(long cPtr, boolean cMemoryOwn)GlobalVehicleBreaksConstraint(RoutingDimension dimension) -
Method Summary
Modifier and Type Method Description voiddelete()protected voidfinalize()protected static longgetCPtr(GlobalVehicleBreaksConstraint obj)voidinitialPropagate()This method performs the initial propagation of the
constraint.voidpost()This method is called when the constraint is processed by the
solver.java.lang.StringtoString()Methods inherited from class com.google.ortools.constraintsolver.Constraint
accept, getCPtr, isCastConstraint, postAndPropagate, varMethods inherited from class com.google.ortools.constraintsolver.PropagationBaseObject
baseName, enqueueDelayedDemon, enqueueVar, freezeQueue, getCPtr, hasName, name, reset_action_on_fail, set_variable_to_clean_on_fail, setName, solver, unfreezeQueueMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtrMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
GlobalVehicleBreaksConstraint
protected GlobalVehicleBreaksConstraint(long cPtr, boolean cMemoryOwn) -
GlobalVehicleBreaksConstraint
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classConstraint
-
delete
public void delete()- Overrides:
deletein classConstraint
-
toString
public java.lang.String toString()- Overrides:
toStringin classConstraint
-
post
public void post()Description copied from class:ConstraintThis method is called when the constraint is processed by the
solver. Its main usage is to attach demons to variables.- Overrides:
postin classConstraint
-
initialPropagate
public void initialPropagate()Description copied from class:ConstraintThis method performs the initial propagation of the
constraint. It is called just after the post.- Overrides:
initialPropagatein classConstraint
-