simple LP does not work with picos

36 views
Skip to first unread message

cannon chii

unread,
Apr 15, 2018, 2:41:31 AM4/15/18
to CVXOPT
I am testing a linear programming functionality of PICOS.

    prob = pic.Problem()
    tau_pic = prob.add_variable("tau",1)
    print prob
    prob.solve(solver = "cvxopt")

The problem printed out is 

    optimization problem  (LP):
    1 variables, 0 affine constraints
    
    tau : (1, 1), continuous
    
    find vars
    such that
      []
    ---------------------

The solution should be assignment of tau. Yet it generates error:

    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    <ipython-input-968-6bd799ff66cd> in <module>()
          7 print prob
          8 
    ----> 9 prob.solve(solver = "cvxopt")
    
    /home/me/anaconda2/lib/python2.7/site-packages/picos/problem.pyc in solve(self, **options)
       5002                         or self.options['solver'] == 'smcp'
       5003                         or self.options['solver'] == 'cvxopt'):
    -> 5004                     primals, duals, obj, sol = self._cvxopt_solve()
       5005 
       5006                 # For cplex
    
    /home/me/anaconda2/lib/python2.7/site-packages/picos/problem.pyc in _cvxopt_solve(self)
       5256                                          G, h, dims,
       5257                                          self.cvxoptVars['A'],
    -> 5258                                          self.cvxoptVars['b'])
       5259             probtype = 'ConeLP'
       5260 
    
    /home/me/anaconda2/lib/python2.7/site-packages/cvxopt/coneprog.pyc in conelp(c, G, h, dims, A, b, primalstart, dualstart, kktsolver, xnewcopy, xdot, xaxpy, xscal, ynewcopy, ydot, yaxpy, yscal, **kwargs)
        571     if kktsolver in defaultsolvers:
        572         if KKTREG is None and (b.size[0] > c.size[0] or b.size[0] + cdim_pckd < c.size[0]):
    --> 573            raise ValueError("Rank(A) < p or Rank([G; A]) < n")
        574         if kktsolver == 'ldl':
        575             factor = misc.kkt_ldl(G, dims, A, kktreg = KKTREG)
    
    ValueError: Rank(A) < p or Rank([G; A]) < n

Anyone know what might happen?  

Martin

unread,
Apr 15, 2018, 7:20:44 AM4/15/18
to CVXOPT
CVXOPT's conelp() routine assumes that your problem has constraints (the problem is trivial if you don't). 
Reply all
Reply to author
Forward
0 new messages