Originally posted by: SystemAdmin
I don't see a problem with your usage of getObjValue() or getValues(). They should return the objective function value and the values of the relaxation at the current node.
When isIntegerFeasible() returns false and all your variables are integer, could you check out what branches CPLEX would create at this very node? This can be done by code like this:
IloInt n = getNbranches();
for (i = 0; i < n; ++i) {
IloNumVarArray vars(getEnv());
IloNumArray bounds(getEnv());
IloCplex::BranchDirectionArray dirs(getEnv());
IloNum estimate = getBranch(vars, bounds, dirs, i);
std::cout << "Branch i" << std::endl
<< " estimate = " << estimate << std::endl
... // print out vars, bounds and dirs
<< std::endl;
dirs.end();
bounds.end();
vars.end();
}
Also, what do functions like isSOSFeasible() return in this case? Is it possible that the node has all variables integer but is not SOS feasible?
#CPLEXOptimizers#DecisionOptimization