Marketplace
Marketplace
Limited-Time Offer: 50% off IBM TechXchange Conference 2025
IBM’s largest technical learning event is back October 6-9 in Orlando, FL
Khaoula EL MHAMDI
Tue September 29, 2020 12:02 PM
ALEX FLEISCHER
Tue September 29, 2020 01:23 PM
Khaoula EL MHAMDI
Tue September 29, 2020 01:35 PM
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
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
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
Original Message
Original Message:
Sent: Tue September 29, 2020 01:22 PM
From: ALEX FLEISCHER
Subject: How to model "If.. Then constraint in MIP with CPLEX
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
Additional
Resources
Discover these carefully selected resources to dive deeper into your journey and unlock fresh insights
Office
If you need immediate assistance please contact the Community Management team
[email protected]
Monday - Friday: 8AM - 5 PM MT
Quick Links
About Us
Terms of Use
Community Netiquette
Sitemap
Marketplace
Marketplace