CVXMOD is discontinued!
Unfortunately CVXMOD has not been developed since 2008. It is incomplete, somewhat buggy and not supported. Please instead try the replacement package CVXPY. Or, try CVXOPT if you are prepared to work at a lower level, CVX if you are ok with Matlab, or CVXGEN if you want small (but super high speed) QP solvers.
The value of optvars is set by CVXMOD after solving associated convex optimization problems. No warning is given before variable values are overwritten.
Syntax: creating an optimization variable
optvar(name=None, rows=1, cols=1)
Sometimes optimization variables are known ahead of time to be (say) positive, symmetric or negative semidefinite. These properties are handled in CVXMOD as optvar attributes. For example, if x is an optvar, set x.pos = True if x is positive.
Available attributes for all optvars x:
Available attributes for square optvars X:
These implicit constraints can also be thought of as extra information about the optvars. This extra information is used in convexity classification.
Example: implicit constraints
>>> x = optvar('x') >>> classify(square(x)) positive; convex in x. >>> x.pos = True >>> classify(square(x)) positive; convex and increasing in x.