Module org.maxicp

Class IsEndBeforeStartWithTransition

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.scheduling.IsEndBeforeStartWithTransition
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class IsEndBeforeStartWithTransition extends AbstractCPConstraint
Reified temporal ordering constraint with transition times.

Links a boolean variable isBefore to the temporal ordering of two intervals with minimum transition times:

  • isBefore = trueend(a) + transitionAB <= start(b) (interval a finishes before b starts, with at least transitionAB in between)
  • isBefore = falseend(b) + transitionBA <= start(a) (interval b finishes before a starts, with at least transitionBA in between)

The constraint propagates in three directions:

  1. Boolean → temporal: when isBefore is fixed, enforce the corresponding start/end bounds with transition times.
  2. Temporal → boolean: when the temporal gap between the intervals is large enough, fix isBefore to the entailed ordering.
  3. Infeasibility detection: when one ordering is impossible (the earliest end of one interval plus the transition exceeds the latest start of the other), fix isBefore to the only feasible ordering.

This constraint is a building block of NoOverlapWithPosition and replaces the more generically named NoOverlapBinaryWithTransitionTime in that context, making the reified semantics explicit.

Author:
Pierre Schaus
  • Constructor Details

    • IsEndBeforeStartWithTransition

      public IsEndBeforeStartWithTransition(CPBoolVar isBefore, CPIntervalVar a, CPIntervalVar b, int transitionAB, int transitionBA)
      Creates a reified temporal ordering constraint with transition times.
      Parameters:
      isBefore - boolean variable: true iff a ends before b starts (with transitionAB gap)
      a - first interval
      b - second interval
      transitionAB - minimum gap between end(a) and start(b) when a precedes b
      transitionBA - minimum gap between end(b) and start(a) when b precedes a
  • Method Details