Indicator constraints cplex

Hello all,

I am currently failing to convert a BigM formulation into an Indicator Constraint for CPLEX.

*old one
Constraint1(p,s,m,i,j)$(p_s(p,s) AND f_c_r(s,m,i,j))..
                    x(p,s,m,i,j) =l= y(p,s,m,i,j)*BigM;

*new one
Constraint1(p,s,m,i,j)$(p_s(p,s) AND f_c_r(s,m,i,j))..
                    x(p,s,m,i,j) =l= 0;

$Onecho > cplex.opt
threads=0
indic Constraint1$y(p,s,m,i,j) 0
$Offecho


*=== Model name
MODEL example /all/;
all.optfile = 1

But something is still wrong with the syntax. Can someone give me a hint?

Many greetings
Janisch

Hi,

you have to provide the domain for the equation and the variable. I suggest to try

$Onecho > cplex.opt
threads=0
indic Constraint1(p,s,m,i,j)$y(p,s,m,i,j) 0
$Offecho

I hope this helps!

Fred

Awesome! Thank you :slight_smile: