Hello, could you tell me if xpress supports "conditional constraints", I mean constraints as:

if x_i = x_j = 1, then y_i + C <= y_j or y_j + C <= y_i

if x_i = c_i = 1, then z_i <= a

if x_i = d_i = 1, then z_i <= b

where c_i and d_i are binary constants, a and b are real constants, y_i and z_i are a real variables, and x_i is a binary variables (0 or 1).

or I need to convert that constraints to linear?

Thank you in advance.

Hi,

Yes, Xpress supports conditional constraints both in the Optimizer and the Mosel modeling language.

More precisely, the Optimizer supports "indicator constraints", that is linear constraints that

are activated only when a controlling binary variable takes a specific value.

For example:

x1 = 0 -> x2 >= 2

x1 = 1 -> x3 + 2 x4 <= 0

Mosel also supports more advanced "logical constraints", that is logical operations on linear expressions including and, or, not, xor, (in)equality and implications (these are automatically translated into indicator constraints when the model is loaded in the optimizer). So you can easily express your sample constraints directly in Mosel without needing to linearize them manually; for example, you could write your first "if" condition as:

implies(x_i=1 and x_j=1, y_i + C <= y_j or y_j + C <= y_i)