Originally posted by: SystemAdmin
I am using java cplex API and after the problem is solved I used getVaules() method to get variable values. The variables are defined to be integer and the lower bound is 0, but getValues methods returned some negative fractional number. the example code:
//before solving the problem:
IloIntVar E[];
E = cplex.intVarArray(Edge_Info.size(), 0, 1, EdgeLabels);
......
try{
......
IloCplex cplex = new IloCplex();
//after solved the problem:
if(cplex.solve){
.......
double Sol_Edges[] = cplex.getValues(E);
.......
}
Inside Sol_Edges[], I see some negative fractional numbers, even though the variable E is defined as integer and non-negative.
Thanks for any helps!
#CPLEXOptimizers#DecisionOptimization