Originally posted by: Jaeyoung
Hi, all
I am using "IloIntVar" as a variable in my c++ program.
I set upper and lower bound with 1 and 0.
The problem is a simple linear function with linear constraints (but hundreds of variables and constraints).
After CPLEX solved, I use "cplex.getValue(X[i])" and CPLEX usually returns correct values.
but at times it returns 0.9999999987, not 1 even though I set the variable as "ILOINT".
It is true that "cplex.getValue" returns "IloNum"(double type), but I'm still expecting 1.00000.
Is that normal? Should I use IloBoolVar? or set any other options?
Any advice?
#CPLEXOptimizers#DecisionOptimization