Hi,
you should use logical constraints and not use decision variables in slicing:
int I=3;
dvar int w1 in 0..1;
dvar int L[1..10][1..10] in 0..10;
subject to
{
forall(j in 1..3,N in 1..I) (L[N][j]>=1)=> (w1==1);
}
works fine
regards
------------------------------
ALEX FLEISCHER
------------------------------
Original Message:
Sent: Tue September 29, 2020 05:52 AM
From: Khaoula EL MHAMDI
Subject: How to model "If.. Then constraint in MIP with CPLEX
Hello everyone,
I have developed a model and one of the constraint is based on the logic of "If..Then constraint " that I have modeled in MIP ( You can see tha part of the code in the figure below).
------------------------------
Khaoula
------------------------------
#DecisionOptimization