I have seen the answer to this similar question but it does not answer my question. Is there any way to get objective function and constraints of the dual formulation directly within your algorithm rather than writing them into a DUA file and then reading them? I know that I can solve the dual formulation by using
cplex.setParam(IloCplex::Param::Preprocessing::Dual, 1);
But I do not want to solve the dual formulation. I want to access objective function and any constraint of the dual formulation so I could modify them as part of my algorithm. I use CPLEX 12.8 (Concert technology, C++ API) and would like to access the dual formulation within my algorithm.
No, this is not possible using any of the Concert APIs (i.e., C++, Java, or .NET).
As mentioned here on the IBM developerWorks forum, it is possible to do this with the C API. The Concert APIs do not allow access to the presolve model, so this is not possible.
来源:https://stackoverflow.com/questions/50057420/getting-the-dual-formulation-in-cplex-concert-technology