Access JuMP canonical matricial LP problem

Hi, just wondering if there is a way to ‘extract’ the canonical matricial(*) LP form from a JuMP model.

(*) With canonical form I meant something like:
\text{maximize } c^Tv \text{, subject to:} \\ Sv = b \\ lb \le v \le ub

Example

import JuMP, GLPK

# Parameters
M, N = 8, 10
S, b = rand(M, N), rand(M)
lb, ub = -rand(N), rand(N)
c = zeros(N); c[end] = 1.0
sense = JuMP.MOI.MAX_SENSE

# JuMP
model = JuMP.Model(GLPK.Optimizer)
JuMP.@variable(model, x[1:N])
JuMP.@constraint(model, S * x  .== b)
JuMP.@constraint(model, x  .>= lb)
JuMP.@constraint(model, x  .<= ub)
JuMP.@objective(model, sense, c' * x)

I need to recover S, b, lb, ub and c, or something like it,
so that I can feed other engine starting from a JuMP model
already buit:

Thanks in advance!!

JuMP does not store the problem in a canonicalized matrix form, so this is not straight-forward.

You may be able to use https://github.com/jump-dev/MatrixOptInterface.jl, but it is still in development and not registered. @joaquimg might be able to provide more information as to the current status.

Otherwise, there is some non-public code in JuMP that does this, but note that the functions are not exported, and they may be removed or changed in any future release.

As @odow said, that is one of the aims of MatrixOptInterface, however it is not ready yet. The opposite direction is working more smoothly now.
Let us know if you are willing to contribute!