Example: Simple quadratic programThis is a simple quadratic program (QP) illustrating a complete CVXGEN example. Optimization problemWe wish to solve the optimization problem ( begin{array}{ll} mbox{minimize} & x^TQx + c^T x \ mbox{subject to} & Ax = b \ & 0 leq x leq 1 \ end{array} )with optimization variable
and parameters
CVXGEN codeparameters
A (3,10) b (3) Q (10,10) psd # quadratic penalty. c (10) # linear cost term. end variables x (10) end minimize quad(x, Q) + c'*x subject to A*x == b 0 <= x <= 1 # box constraint on x. end |