Originally posted by: SystemAdmin
Dear Forum,
I am trying to solve a number of small optimization problems that are very nicely suited to CP Optimizer: each can be modeled with only some integer variables and a couple of global constraints. The objective function value is always integer as well, and CPO finds the optimal solution very fast. The catch is that I am required to
always have the exact optimal value to each of these problems, as the solutions will be used in a cut generation procedure for an MILP model.
The issue I am facing is that the objective function value for some of these models are between 300000 and 400000, and CPO imposes an "effective optimality tolerance" of around 10% of that value that cuts the optimal solution out.
My question is: is there some way to impose an effective optimality tolerance of zero, since I need to be extremely precise?
As a very simple example to clarify, consider the following model encoded in C++:
try {
IloEnv env;
IloModel model(env);
// model
IloIntVarArray x(env, 3, 1, 3);
model.add( IloAllDiff(env, x) );
// objective function
IloIntVar obj_var(env, 0, IloIntMax);
model.add( IloIfThen(env, x[0] == 1 && x[1] == 2 && x[2] == 3, obj_var == 100000 ) );
model.add( IloIfThen(env, x[0] == 1 && x[1] == 3 && x[2] == 2, obj_var == 99999 ) );
model.add( IloIfThen(env, x[0] != 1, obj_var == 100000 ) );
model.add( IloMinimize(env, obj_var) );
IloCP cp(model);
cp.setParameter(IloCP::Workers, 1);
cp.solve( IloGenerate(env, x) );
} catch (IloException& ex) {
std::cout << "Error: " << ex << std::endl;
}
When I compile and run this model (CPLEX Studio version 12.4.01), I get
! Search terminated normally, 1 solution found.
! Best objective : 100000 (optimal - effective tol. is 10)
! Number of branches : 4
! Number of fails : 2
when I should obtain 99999.
I couldn't find anything on the manual/examples to circumvent this. Moreover, unfortunately I am not able to scale the objective function in my model.
Thank you very much for your help,
Andre
#CPOptimizer#DecisionOptimization