Reputation: 183
I want to retrieve an LP model in matrix form from Gurobi. I am using package JuMP in Julia. I can print all the constraints using MathOptInterface but not in matrix form. I have no idea how to print the problem matrix from Gurobi. Could anyone help with this? Thanks very much in advance!
Kind regards,
Hongyu.
Upvotes: 4
Views: 406
Reputation: 2574
To clarify, do you want the A
matrix? What do you need this for? JuMP doesn't have support for this because. You would need to convert all of the MOI constraints into a matrix.
You could try JuMP._standard_form_matrix(model)
, but note that this is using some internal JuMP code (functions beginning with _
) so this might break in any future release. Here's the code if you want to write it yourself:
Upvotes: 0