Forum Discussion
FICO
1 year agoCommunity Manager
Xpress range constraint
Using the latest Xpress interface I can add a constraint x_i + y_i <= UB_i for all i like this:
xprsProb.addConstraints(nrNodes, i -> sum(x+y).leq(UB));
How can I add a range constraint like:
LB_i <= x_i + y_i <= UB_i
I cannot seem to find the range/rng restrictions anymore?
1 Reply
- FICOCommunity Manager
Hi Joris,
I think the method you are looking for is "in":
xprsProb.addConstraints(nrNodes, i -> sum(x+y).in(UB, LB));

