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?


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!

| improve this answer | |
  • $\begingroup$ For me, the Julia script does not work (see my comment in the Gist). $\endgroup$ – JaBe Oct 14 '19 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.

| improve this answer | |
  • 3
    $\begingroup$ Here is another similar calculator: mathstools.com/section/main/… - but the one you posted seems much easier to use $\endgroup$ – Dipayan Banerjee Oct 2 '19 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$ – JaBe Oct 5 '19 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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