Originally posted by: revolt
I did not find other problems with the end function.
The only "problem" that arises is, that I found no possibility to retrieve the current objective function directly from cplex. I also stored the objective in an (quadratic) IloNumExpr, but I found no way to remove the ended variable from my stored objective, so that my stored objective gets useless. But actually this is not a real problem, as I do not really need the IloNumExpr of the objective.
Unfortunately I found another problem related to this topic:
I solve an QP (maximize a quadratic objective, s.t. linear constraints).
Some
0,1-variables are fractional, so I fix them to 0 and start again. (the feasible region gets smaller)
In some cases the *objective will increase*! I think it has something to do with degeneracy.
To fix this issue, I simply delete the previously fixed variables as soon as I think, that the result returned by cplex is unusable. After ending the variables everything gets back to normality. I get the right objective function and the right variable values.
Unfortunately the solving process is a lot slower when I delete the variable instead of fixing it to zero. That's why I would prefer if it would be possible only to fix the variables to 0 instead of deleting them completely.
#CPLEXOptimizers#DecisionOptimization