Transcription of Quadratic Programming with Python and CVXOPT
{{id}} {{{paragraph}}}
Quadratic Programming with Python and CVXOPTThis guide assumes that you have already installed the NumPy and CVXOPT packagesfor your Python distribution. You can check if they are installed by importing them:import numpyimport cvxoptLet us first review the standard form of a QP (following CVXOPT notation):minx12x>P x+q>xsubject toGx hAx=bNote thatx>denotes the transpose ofx, andGx hmeans that the inequality is takenelement-wise over the vectorsGxandh. The above objective function is convex if and onlyifPis positive-semidefinite, which is the realm we are concerned CVXOPT QP framework expects a problem of the above form, defined by the pa-rameters{P, q, G, h, A, b};Pandqare required, the others are optional. alternate QPformulations must be manipulated to conform to the above form; for example, if the in-equality constraint was expressed asGx h, then it can be rewritten Gx h. Also, tospecify lower and upper bounds onx, an identity matrix can form part ofG, sincex uisequivalent toIx u.
Alternate QP formulations must be manipulated to conform to the above form; for example, if the in-equality constraint was expressed as Gx h, then it can be rewritten Gx h. Also, to specify lower and upper bounds on x, an identity matrix can form part of G, since x u is
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}