Is there a tool that reads any linear optimization problem (for example an .lp or .mps file), converts it to the dual problem and prints the dual problem?
2 Answers
I recommend having a look at the most recent developments around JuMP. They have developed two interesting packages this year:
- MathOptFormat.jl, that allows to import/export optimization problem in MPS, LP, CBF, etc...
- Dualization.jl, that allows to dualize automatically any optimization problem in conic form
You can find here a Julia script that takes as input a MPS file and output the dual problem in a LP file.
However, I get some problems with MathOptFormat, as this package is not yet able to import LP files... Still a work in progress I guess!
-
$\begingroup$ For me, the Julia script does not work (see my comment in the Gist). $\endgroup$– JaBeCommented Oct 14, 2019 at 17:40
The link includes an online converter from primal to dual linear programs. The downside is you need to input all the coefficients and variables into the pre-defined form on the webpage.
-
3$\begingroup$ Here is another similar calculator: mathstools.com/section/main/… - but the one you posted seems much easier to use $\endgroup$– dxbCommented Oct 2, 2019 at 19:51
-
1$\begingroup$ The link from the answer also accepts the problem pasted in a text format. Which text format is this? It's not lp or mps. $\endgroup$– JaBeCommented Oct 5, 2019 at 12:14