1

When solving problems with many (changing) constraints or objective components it is pretty hard to create documentation in form of formatted equations for it.

Is there an easy way to automatically create formatted equations (LaTeX, PDF,..) from LP/MPS files?

This would be a big help for me.

Thanks in advance!

Cord Kaldemeyer
  • 6,405
  • 8
  • 51
  • 81
  • 1
    I don't think there is an easy way to do that. An automated tool cannot know how it should aggregate certain constraints, for instance. And having *all* constraints and variables explicitly in a LaTex formula makes no sense for anything but tiny toy problems. – mattmilten Nov 24 '15 at 07:59
  • Thanks for your answer. It does not have to be a structured aggregation. The problems we are dealing with are within the field of energy modeling and the problems are sometimes quite big. But transparency plays an important role in the scientific discussion and writing down the used equations (from scratch) again and again is really nnoying.. – Cord Kaldemeyer Nov 24 '15 at 13:24
  • But what do you want to do with LaTeX output with thousands of lines with thousands of variables in each line? A better approach would probably be to start from some structured language like GAMS, ZIMPL etc., parse it into some syntax tree and convert it to LaTeX. – J Fabian Meier Nov 27 '15 at 18:59

1 Answers1

1

See https://cs.stackexchange.com/questions/48510/help-wrapping-my-head-around-a-combinatorial-optimization-problem/50179#50179 for an example of a LaTeX representation of a GAMS model. I think with LP/MPS files you have lost too much structure and context. It would be very difficult to recover the original equations that formed these files. Almost like recovering the original C code from a .exe file.

Community
  • 1
  • 1
Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39