Originally posted by: Margarett
Hello!
I have the simplest linear programming problem with indicative (boolean) variables.
Cplex gives me the 2 error messages:
1) Error: Exception from IBM ILOG Concert: IloModelI
2) IloModelI
(?) Please tell me how I need to correct the code to get the correct answer.
Below is the task code.
The solution to this problem should be: a=1, x=6.
using CP;
dvar boolean a;
dvar int x in 1..10;
maximize (a+x);
subject to
{
if (x>=4) a==1;
else a==0;
a+x<=7;
}
Best regards,
Margarett.
#DecisionOptimization#OPLusingCPLEXOptimizer