1
$\begingroup$

I'm trying to simplify a linear problem by removing "useless" variables and constraints. After simplifying my initial problem and solving both instances with Cplex, it seems like the results differ but are still really close.

Initial problem
objectiveValue ="-606445.47942015168"

I'm also interested in a dual value of some constraint.

dual="-17.47725841435172"

Simplified Problem

objectiveValue="-606445.47942014073"

dual="-17.6343"

In order to understand what I was doing wrong, I tried to simplify the original problem step by step. After some simplification steps which didn't modify the solution, I'm facing this simple constraint :

QStockeeContrat_(2)(Sc0)(ATS_SereneAtlantique)(07d03d2020)#1 - qStockee_(8)(Sc0)(PITS_SereneAtlantique)(07d03d2020)#7 = 0

Then I decide to replace qStockee_(8)(Sc0)(PITS_SereneAtlantique)(07d03d2020)#7 variable by QStockeeContrat_(2)(Sc0)(ATS_SereneAtlantique)(07d03d2020)#1 variable in every constraint and in the objective function. However the results before and after this change are different as I mentionned before.

Can anyone explain to me why that is happening ?

$\endgroup$

1 Answer 1

5
$\begingroup$

Cplex checks the feasiblity and optimality of the solution in floating point arithmetic. The default tolerance is $1e-6$, which means that a solution can violate the constraints by up to $1e-6$ and the solution is still considered feasible. This also holds for the optimality certificates of the solution.

So probably both solutions are optimal according to the tolerances, and you see a difference because by removing redundant constraints cplex will likely do different simplex iterations and arrive at a different solution.

Further read:

$\endgroup$
1
  • 1
    $\begingroup$ Thank you for your answer. Indeed by lowering the feasibility tolerance, the results obtained are even closer and the dual value is the same now. $\endgroup$
    – Shinra_SGr
    Commented Jun 2, 2020 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.