0

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?

Arctic_Skill
  • 43
  • 1
  • 1
  • 5

1 Answers1

0

have you tried in OPL

execute
{
   cplex.epint=0.0001;
}

?

And in the IDE you can use

enter image description here

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15
  • Thanks, setting it with the execute-statement works. Sadly it doesn't change the results though. – Arctic_Skill Apr 12 '22 at 10:20
  • The tolerance parameters will just get you nearer to the nice round numbers that you want but probably not actually the result you want. Just round the results from CPLEX to the nearest integer or whatever. Or make the variables integer variables. – TimChippingtonDerrick Apr 12 '22 at 22:45