How can I extract MOI expression from a linear JuMP obj expression

You can go from JuMP to MOI with moi_function
https://github.com/jump-dev/JuMP.jl/blob/2b0d9100b83985f67bbb673c9e34dbedc9e30da6/src/aff_expr.jl#L498
And the other way around with jump_function
https://github.com/jump-dev/JuMP.jl/blob/2b0d9100b83985f67bbb673c9e34dbedc9e30da6/src/aff_expr.jl#L515

1 Like