Hello !

I'm a student, and I trying to code an optimisation problem using Xpress, I got a "Wrong logical operator" error, but don't understand how to solve it.

This is the part where I get the errors :

Mosel: E-118 at (67,38) of `Easy.mos': Wrong logical operator.

Mosel: E-118 at (69,66) of `Easy.mos': Wrong logical operator.

Mosel: E-118 at (70,30) of `Easy.mos': Wrong logical operator.

am I doing something wrong ?

Thank you for your help in advance !

What is the type of the arrays in your example? Are these 'mpvar'? If yes, then what you seem to formulate are logic constraints: in the context of MIP solving such logic constraints either require a reformulation as standard MIP linear inequalities relations, or possibly they can be stated by using indicator constraints: you will find further guidance on this topic along with some examples in this document ('MIP formulations quick reference'): Redirecting...