title: CVXPY optimization problem. DCPError: Problem does not follow DCP rules
body: <p><a href="https://i.stack.imgur.com/L97kn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L97kn.png" alt="enter image description here" /></a>
  We have the constraints set up very well and now are looking at the objective function of the partner preference problem right now. We can construct a 20x20 symmetric matrix of the worker to worker, each element being the combined score between two workers. however, the matrix is not positive semidefinite and we can not progress any further. We are using <code>cvxpy</code> python package. Please help!</p>
  <p>Piece of code to clarify:</p>
  <pre><code>part_pref = pd.read_excel('Preferred Partners Updated.xlsx')
  part_pref_np = np.array(part_pref)[:,1:21] # 20x20 symmetric matrix with partner preference
  
  y = cp.Variable((20, 4), integer = True)
  
  objective = cp.Maximize(-cp.sum(y.T @ part_pref_np @ y))
  
  constraints = [y &gt;= 0,
                 y &lt;= 1,
                 cp.sum(y, axis = 1) == 1,
                 cp.sum(y, axis = 0) &gt;= b,
                 cp.sum(y, axis = 0) &lt;= c,
                 (skill_np-d).T @ y &gt;= e,
                 cp.multiply((skill_np[:,2]-4),y[:,0]) &gt;= 0,  
                 cp.multiply((skill_np[:,0]-4),y[:,3]) &gt;= 0,
                 f @ x[:,0] &gt;=1]
      
  problem = cp.Problem(objective, constraints)
  problem.solve()
  
  </code></pre>
  <p>raises error</p>
  <blockquote>
  <p>DCPError: Problem does not follow DCP rules.</p>
  </blockquote>