title: ArithmeticError causing "Rank(A) < p or Rank([G; A]) < n" error in cvxpy
body: <p>I'm trying to use cvxpy (and hence cvxopt) to model optimal power flow in a relatively simple network with 28 nodes and 37 lines, but getting a "Rank(A) &lt; p or Rank([G; A]) &lt; n" error.</p>
  
  <p>(Using the same code, I can find the optimal solution for a much simpler network with 4 nodes and 4 lines.)</p>
  
  <p>I've checked very carefully that the constraints are not inconsistent (using my answer to this question on Stack Overflow: 
  <a href="https://stackoverflow.com/questions/16974122/check-constraints-are-ok-in-cvxpy-with-actual-values">Check constraints are ok in cvxpy with actual values</a> )</p>
  
  <p>Here is the traceback:</p>
  
  <pre><code>File "main.py", line 201, in test_simple_optimisation
      p, bids, offers = optimize_flow(bids, offers, lines, nodes, injections_from_schedule, shift_factors, admittance.T)
    File "main.py", line 143, in optimize_flow
      p.solve()
    File "build/bdist.macosx-10.8-intel/egg/cvxpy/programs.py", line 169, in solve
  obj,valid = solve_prog(new_p,quiet)
    File "build/bdist.macosx-10.8-intel/egg/cvxpy/procedures/solve_prog.py", line 44, in solve_prog
      sol = call_solver(p_expanded,quiet)
    File "build/bdist.macosx-10.8-intel/egg/cvxpy/procedures/call_solver.py", line 78, in call_solver
      r =  solvers.conelp(c,G,h,dims,A,b)
    File "/Library/Python/2.7/site-packages/cvxopt/coneprog.py", line 687, in conelp
      raise ValueError("Rank(A) &lt; p or Rank([G; A]) &lt; n")
  ValueError: Rank(A) &lt; p or Rank([G; A]) &lt; n
  </code></pre>
  
  <p>When I look at /Library/Python/2.7/site-packages/cvxopt/coneprog.py", line 687, it is actually rescuing an arithmetic error</p>
  
  <pre><code> 685         try: f = kktsolver(W)
   686         except ArithmeticError:..
   687             raise ValueError("Rank(A) &lt; p or Rank([G; A]) &lt; n")
  </code></pre>
  
  <p>Does that make sense? Why would an arithmetic error i.e. something like an <code>OverflowError</code>, <code>ZeroDivisionError</code>, <code>FloatingPointError</code>, unless cvxpy has extended ArithmeticError mean that the problem is ill described i.e. has Rank(A) &lt; p or Rank([G; A]) &lt; n"?</p>