|
Alert!
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. First, download and install CVXMOD, and check that the quick examples can be solved. There are two main ways of using CVXMOD. You can use it in any Python program by simply including the CVXMOD libraries and then writing your program as normal. Alternatively, you can use CVXMOD interactively. We recommend using IPython, together with matplotlib/pylab. IPython provides some useful enhancements to the interactive Python shell, making it easier to explore and test convex optimization codes with CVXMOD. Matplotlib lets you produce high quality graphs quite easily, using graphing commands like those of Matlab®. Importing CVXMODThe simplest way to use CVXMOD is to load all the definitions from the module cvxmod into your local namespace. You may also wish to include the nonlinear atoms defined in cvxmod.atoms, and the convex sets defined in cvxmod.sets. You do not normally need to import or use CVXOPT directly, as CVXMOD subsumes most of CVXOPT's functionality. Example: Importing CVXMOD into your local namespace
from cvxmod import * from cvxmod.atoms import * from cvxmod.sets import * |