issue with a constraint (Assertion error) #2297
Unanswered
pghimire-hub
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I have two different cvx optimization problem (named p1, p2). Now I am trying to combine these two to form improved relaxation (p3).
Here are the formulation for each of the problem. I think I need the last constraint in P3 (That is currently commented out but I get assertion error. Also p2 gives inf solution. I may be messing something.
p1:
X = cp.Variable((n, n), symmetric=True)
objective = cp.Minimize(cp.trace(Q @ X))
p2:
X = cp.Variable((n, n), symmetric=True)
objective = cp.Minimize(cp.trace(Q @ X))
constraints = [X[i, i] == x[i] for i in range(n)]
constraints += [0 <= x, x <= 1]
p3: (improved relaxed)
Beta Was this translation helpful? Give feedback.
All reactions