Originally posted by: savant_ning
}
}
model.add(fcon >= 1); // add the generated constraint into the model
fcon.end(); // reset the constraint expression
}
IloCplex cplex(model);
cplex.setOut(env.getNullStream());
cplex.setParam(IloCplex::WorkMem,2048.0);
//cplex.setParam(IloCplex::IntParam::NodeFileInd,3 );
//cplex.setParam(IloCplex::NodeSel, 3.0);
//cplex.setParam(IloCplex::VarSel, 3.0);
if (!cplex.solve()) { // call cplex.solve() to solve the model; when return IloTrue, a feasible solution is found. Otherwise, when return IloFalse, no solution is found
//printf("Failed to optimize LP.\n");
return (colNum + 1.0);
}
lowerBound = cplex.getObjValue();
// save the values of xVar's
for (ii = 0; ii < size_colsInSubMatrix; ii++) {
xVars[colsInSubMatrix[ii]] = cplex.getValue(xVar[ii]);
}
fobj.end();
}
catch (IloException&e) {
std::cerr << "Concert exception caught:" << e << std::endl;
}
catch (...) {
std::cerr << "Unknown exception caught" << std::endl;
}
env.end();
return lowerBound;
}
and I know my error is :
cplex.setParam(IloCplex::WorkMem,2048.0);
//cplex.setParam(IloCplex::IntParam::NodeFileInd,3 );
//cplex.setParam(IloCplex::NodeSel, 3.0);
//cplex.setParam(IloCplex::VarSel, 3.0);
I don't know why they doesn't work
#CPLEXOptimizers#DecisionOptimization