A few comments:
- You do not have to build the huge matrix (function) by yourself - leave it up to the Convex.jl parser. Just create 6 constraints and then stack them into a vector of constraints.
- My remark from the original response still holds, you have not reacted to it. If Pis a (matrix) variable, the second, third and fourth entries on the diagonal contain a product ofP, hence your constraints are not linear.
- The fifth entry on the diagonal is irrelevant, it is just a constant matrix.
- But there is another problem with it: it is a product of PandP'scaled by a positive constant. No way to make it negative definite. Are you sure your problem statement is correct? In fact, this comment applies to some other components on the diagonal.
- Your matrices P1throughP5in your code (or∏₁through∏₅in the above typeset math) are just scaled identity matrices. You can reduce the complexity of your formulas quite a bit by exploiting this knowledge about the structure of these matrices.
added later
- Semidefinite matrix variables (the matrix Pin your case) are assumed symmetric in Convex.jl (and elsewhere, I bet). No need to perform tranposition then.