Skip to main content
7 votes
Accepted

Imposing special structure on Positive Semi-Definite matrix

The whole point is that you do NOT include the constraint $U = uu^T$ . That constraint is non-convex. Instead you include the constraint that $Z_j$ is (positive) semi-definite. This constraint is ...
Mark L. Stone's user avatar
5 votes
Accepted

Why am I getting this DCPError when my matrix is PSD?

Because the matrix KK is not PSD. It has minimum eigenvalue of -1. It is indefinite. Perhaps you are under the misapprehension that a symmetric matrix with all elements positive is PSD. As this ...
Mark L. Stone's user avatar
3 votes

What algorithm does CVXPY actually use to solve semidefinite programs with the constraints of the form $\sum\limits_i E_iXE_i^T \succ B$?

I assume your question is "which optimizer did cvxpy choose for my problem", as cvxpy can use a number of optimizers that it selects based on the problem, and indeed the output doesn't ...
Marses's user avatar
  • 131
2 votes
Accepted

Can this problem be solved using convex optimization?

This is not a convex problem. In fact, I don't think it even has a problem. Think about the special case where $x\in{\mathbb R}^1$, then your problem has the form $$\begin{align} \max & \quad \...
Wolfgang Bangerth's user avatar
2 votes
Accepted

Numerical Simulation of a Quadratic MIP with a highly rational term

Getting an exact solution via brute force I'll try to circle back later to formulate this as a MIP, but your problem as stated is small enough that you can just brute force the solution. For instance, ...
Richard's user avatar
  • 3,971
2 votes
Accepted

Formulate and solve a simple conic programs in cvxpy language

You can solve Question A as a second-order cone program like so: ...
Richard's user avatar
  • 3,971
2 votes
Accepted

Question about strange outputs from the CVXPY solver

You are doing a broadcast (A*x), rather than matrix multiplication (A@x), so your code should look like this: ...
Richard's user avatar
  • 3,971
1 vote
Accepted

What algorithm does CVXPY actually use to solve semidefinite programs with the constraints of the form $\sum\limits_i E_iXE_i^T \succ B$?

Cvxpy cannot solve SDPs by it itself. It feeds the problem into an optimizer such as Mosek. Therefore, you should consult the documentation of the optimizer you are using. Btw it is trivial to convert ...
ErlingMOSEK's user avatar
1 vote
Accepted

Questions regarding the result of the CVXPY

The "equivalent" problem is equivalent (by Schur Complement of the "equivalent" formulation). But $A$ is not positive semidefinite. Therefore, $A$ does not satisfy the constraint ...
Mark L. Stone's user avatar
1 vote

Why is a elementwise max not DCP?

The answer is based on @Mark L. Stones' comments Nonlinear equality constraints are not allowed by DCP, and other than trivial cases, they are non-convex. Apply the pos or max(D,0) directly in the ...
Sahil Gupta's user avatar
1 vote
Accepted

Formulating this optimization problem

I'm going to assume that you optimize over the locations $x_i$. Then this is most easily reformulated via slack variables as follows: $$ \min_{x_i,s_i} s_i^2 \\ \text{so that}\quad s_i \le g(x_i)...
Wolfgang Bangerth's user avatar
1 vote
Accepted

Why is CVXPY throwing a DCP error with cp.sqrt but no error with cp.norm

Based on your experience, one of (ignoring the subscripts) h or p must be a variable. Therefore ...
Mark L. Stone's user avatar
1 vote
Accepted

Norm constraint in CVXPY

CVXPY's norm atom won't accept a raw Python list as an argument; you need to pass it a CVXPY expression. Stack the list of scalars into a vector using the hstack atom, like so: ...
Akshay Agrawal's user avatar
1 vote
Accepted

Why am I getting this DCPError?

cvxpy's rules for disciplined convex programming are listed here. Notably, it states that: The DCP rules require that the problem objective have one of two forms: Minimize(convex) ...
Richard's user avatar
  • 3,971
1 vote

Defining a soft constraint in cvxpy

EDIT: Intermediate solution ...
ThatQuantDude's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible