Setting Integrality tolerance in CPLEX and forcing decision variables to take rounded values

269 Views Asked by At

I am currently trying to solve a linear program in CPLEX that has three decision variables, one which is binary and the other two are continuous.

The problem I have is that instead of giving results for the continuous variables like '10' or '0' it sets them to '9.99999' and '0.000001'.

So with a bit of googling I found out that there is a parameter in CPLEX called Integrality tolerance that helps achieving this goal. The problem is, nowhere have I found how I can actually set this parameter in OPL, but instead only with using different APIs. The thing is I'm only using CPLEX to solve my model.

Can anyone guide me on this?

1

There are 1 best solutions below

2
On

have you tried in OPL

execute
{
   cplex.epint=0.0001;
}

?

And in the IDE you can use

enter image description here