# Best way to convert a generic QCQP into standard form in JuMP

**URL:** <https://discourse.julialang.org/t/best-way-to-convert-a-generic-qcqp-into-standard-form-in-jump/77593>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [March 8, 2022, 3:39pm UTC](https://discourse.julialang.org/t/best-way-to-convert-a-generic-qcqp-into-standard-form-in-jump/77593 "2022-03-08T15:39:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 9, 2022, 12:03am UTC](https://discourse.julialang.org/t/best-way-to-convert-a-generic-qcqp-into-standard-form-in-jump/77593/2 "2022-03-09T00:03:14Z")

</div>

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](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](https://or.stackexchange.com/questions/6982/standard-form-for-lp-and-mps/7003#7003)

---

_[View the full topic](https://discourse.julialang.org/t/best-way-to-convert-a-generic-qcqp-into-standard-form-in-jump/77593)._
