Get formatted equations from LP/MPS file

29 views
Skip to first unread message

Cord Wayne

unread,
Nov 24, 2015, 5:07:45 AM11/24/15
to Gurobi Optimization

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!

Kostja Siefen

unread,
Nov 24, 2015, 7:30:47 AM11/24/15
to Gurobi Optimization
Hi Cord,

MPS/LP files contain model instances and therefore cannot serve as a documentation for the model generator (i.e. the abstract model). Furthermore they contain floating point representations of the coefficient values which can be long and hard to read. 
So if you really want to transform your model instance into LaTeX equations, you could either do it by reading and transforming the model file itself or you could use the Gurobi API to read your model file and then retrieve variables, objective function, constraints and bounds. 

Best wishes,
Kostja

Cord Wayne

unread,
Nov 27, 2015, 4:50:13 AM11/27/15
to Gurobi Optimization
Hi Kostja,

thanks for your answer!  I'll then probably go the way with the model file.

Best wishes,
Cord
Reply all
Reply to author
Forward
0 new messages