cvxgrp/cvxpy — pull request #16 by echu (2013-10-08 07:32:47+00:00)
Title: added presolve. commented out quad reg for now.

I did two things:

1. I added quadratic regularization to the objective
2. I added a pre-solve to remove redundant constraints from `A*x == b`

It turns out that (1) only adds rows to `G`. It's possible that this helps with problems where `rank([A;G]) < n`, but I didn't have any test cases, so I commented the quadratic regularization out for now. If we need it later, you can add it back by uncommenting.

For (2), I wrote a simple piece of code that examines each row of `A*x == b`, normalizes it by setting the maximum entry of the row to `1` or `-1`, hashes the row, and uniqifies the collection of rows (rows which differ by a sign are considered as being the same). It then rebuilds the matrix (now with unique rows) and undoes the scaling.

A,b = remove_redundant_rows(A,b)

is added to `problem.py` to handle this. Please throw some of the failing SDP test cases against this build! If this fixes a lot of the problems, we can use this band-aid until CVXOPT becomes more robust.