The ValueError: Rank(A) < p or Rank([P; A; G]) < n drives me crazy .
I respectively use same matrices to solve the minimization and the maximization problem with the function cvxopt.solvers.qp(P,q,G,h,A,b) . When I solve the minimization problem, cvxopt works well and gets the solution of x. But when I try to solve the maximization problem, that is, when I multiply the matrix P, by minus one , cvxopt runs an error. My goal is to solve the maximization problem, but I can't solve the error, and I don't understand why the error comes up after adding a negative sign. The codes and results of the above two situations are as follows.
Situation 1:
Result 1:
Situation 2:
#just adding a negative sign before P
Result 2: