During modeling, y(i,j,t) and x(i,j,k,t) are decision variables, but I want to add a condition such as:
if x(i,j,k,t) > 0, then y(i,j,t) = 1
else if x(i,j,k,t) = 0, then y(i,j,t) = 0
I tried to insert this constraint as below.
con10(i,j,k,t).. y(i,j,t)$ (x(i,j,k,t)>0) =e= 1;
con11(i,j,k,t).. y(i,j,t)$ (x(i,j,k,t) = 0) =e= 0;
MODEL routing /all/;
SOLVE routing using mip minimizing z;
However, I receive the following errors:
57 endogenous relational operations require model type dnlp
256 errors in analyzing solve statement
How can I solve this problem?