Originally posted by: Petr Vilím
Hello Neil,
the var >= n constraints can be constructed using function Ge on CP class:
public virtual IConstraint Le(IIntExpr e, int v)
The function retuns IConstraint, however IConstraint is derived from IIntExpr. Therefore one of the following functions of class CP can be used to produce the LHS of the constraint:
public virtual IIntExpr Sum(IIntExprArray expr)
public override IIntExpr Sum(IIntExpr[] exprs)
Finally, to create the whole constraint, you can use Ge function again.
Best regards, Petr
#CPOptimizer#DecisionOptimization