DCP rules: comparing affine with convex expression? #2400
Unanswered
siyuanpurdue
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
-
I pinpointed with one of lines leading to “Problem does not follow DCP rules”.
obj_constraints += [cp.reshape(cp.transpose(C_i)@LagrangeZ[i], (3numNodes,1)) ==
cp.transpose(e_i@cp.abs(lot@v0) + tau e_i@all1@cp.abs(v0))]
which corresponds to the writeup here: (2)=0. (FYI: lot means low order term which corresponds to I-XG, V0 = R[I -I 0] – X[0 0 I])
If we eliminate the absolute value in the constraint, the solver would not complain about DCP. i.e., replacing by obj_constraints += [cp.reshape(cp.transpose(C_i)@LagrangeZ[i], (3numNodes,1)) == cp.transpose(e_i@lot@v0) + tau e_i@all1@v0))]
I check types of three expression: e_i@cp.abs(lot@v0) + tau* e_i@all1@cp.abs(v0) Out [2]: Expression(CONVEX, NONNEGATIVE, (1, 6))
e_i@lot@v0 + tau* e_i@all1@v0 Out [3]: Expression(AFFINE, UNKNOWN, (1, 6))
cp.reshape(cp.transpose(C_i)@LagrangeZ[i], (3*numNodes,1)) Out [4]: Expression(AFFINE, UNKNOWN, (6, 1))
So it means you cannot compare convex (due to introduction of absolute value) expression with affine (because c_i^Tz_i does not involve G).
Does that mean we have to relax further by eliminating absolute value? Or does it is due to absolute value of matrix?
Beta Was this translation helpful? Give feedback.
All reactions