I don’t think there’s an easy way to do this in JuMP.
There are two complicated ways:
- Write functions to parse the JuMP model and extract the coefficient matrices. Look here for inspiration: https://github.com/jump-dev/JuMP.jl/blob/2875bd1a0d336215a63ffb0fe74ffaaad0a6979a/src/lp_sensitivity2.jl#L302-L350
- Create a MOI model that supports quadratic objective and quadratic-in-less than, then write a function to extract the matrices from the MOI model. Look here for something similar with LPs: cplex - Standard Form for LP and MPS - Operations Research Stack Exchange