Unary constraints on interval variables
CP Optimizer provides constraints
for modeling restrictions that an interval cannot start, cannot end
or cannot overlap a set of fixed dates.
Let denote a fixed interval and F an integer stepwise function.
Forbidden start. The constraint forbidStart(, F), states that whenever the interval is present, it cannot start at a value t where F(t) = 0.
Forbidden end. The constraint forbidEnd(, F), states that whenever the interval is present, it cannot end at a value t where F(t − 1) = 0.
Forbidden extent. The constraint forbidExtent(, F), states that whenever the interval is present, it cannot overlap a point t where F(t) = 0.
More formally:
For syntax and examples of these constraints, see forbidEnd, forbidExtent, and forbidStart in the OPL Language Quick Reference. Note that none of these constraints can be used in meta-constraints.