Originally posted by: tavs
I'm using CPLEX 11 C callable library through a wrapper which allows me to use glpk as well, by choosing either of them at compile time.
To set the objective coefficient of the jth column to k I have a routine of such wrapper that just performs
CPXchgobj(env,lp, 1, &j, &k);
This, together with the rest of the wrapper, work like a charm to create the problem object, as I can see from the lp file I print after the problem creation routine.
Then I have to change the coefficients again, using the same routine, but when I solve the problem I get an error (CPXgetstat returns 0). If I print the lp file after the coefficients' change I see the "empty model"
Problem name:
Minimize
obj: - ? x1
End
If I print it just before the loop that changes the coefficients, instead, I get exactly the initial correct model.
So maybe I screwed something in that loop. However the code worked under glpk so I don't see where the eventual bug could come from.
Valgrind doesn't have anything to complain about.
Do you have any idea on how to fix this?
#CPLEXOptimizers#DecisionOptimization