writeLP in JuMP 0.19?


Is there an equivalent to writeLP in the new version of JuMP? I need to print a MILP in proper format (e.g., lp or mps)



See writeMPS()
Github: https://github.com/odow/MathOptFormat.jl

To install, run

] add https://github.com/odow/MathOptFormat.jl

Then you can write the model as follows

using JuMP, MathOptFormat
model = Model()
# ... model definition

lp_file = MathOptFormat.LP.Model()
MOI.copy_to(lp_file, backend(model))
MOI.write_to_file(lp_file, "my_model.lp")