Questions tagged [cvxpy]
CVXPY is a Python-embedded modeling language for convex optimization problems.
22
questions
2
votes
1
answer
149
views
Numerical Simulation of a Quadratic MIP with a highly rational term
I am interested in solving the following minimization problem:
$$
\begin{array}{cl}
\displaystyle\min_{x,y}&\displaystyle\frac{1}{K}\sum_{i=1}^{K}\left(\frac{x_{i}}{y_{i}}-\frac{X}{Y}\right)^{2} \\...
1
vote
2
answers
317
views
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$?
Crossposted on Mathematics SE
CVXPY is a famous software as a solver for optimization problems. Nowadays, I use it to run a program presented in a paper, the Example 7.1, and the program runs as ...
1
vote
0
answers
137
views
Help with CVXPY and Disciplined Convex Programming
I'm trying to recreate Figure 1 in this paper. This requires maximizing equation (19), which I have convinced myself is concave, but I am having trouble implementing it in CVXPY. Here is the code I ...
1
vote
0
answers
190
views
Problem in parameterizing a CVXPY program
I am trying to parameterize a CVXPY program as I need to repeatedly solve the problem, but I noticed that when my parameters are complex numbers, CVXPY models the problem in each iteration. For ...
3
votes
1
answer
638
views
Questions regarding the result of the CVXPY
I want to optimize the function
$$\min_{X \in \mathbb{S}^{n}_{+}} \mbox{tr} \left( C^T X \right) + \mbox{tr} \left( X^{-1} \right),$$
of which I optimize the equivalent problem
$$\min \mbox{tr}\left(C^...
0
votes
1
answer
337
views
Why is a elementwise max not DCP?
I am trying to formulate a convex optimization problem using CVXPY. Everything works, except a constraint that does not seem to follow DCP rules.
Let $D \in \Bbb R^n$ be a decision variable and let $Q$...
0
votes
0
answers
159
views
Absolute value constraint in quadratic programming optimization
$$
argmin(x,y)=x^2+y^2+2y
$$
$$
s.t.\ \ y=|x-10|
$$
How can I convert the absolute value constraint to the constraint matrix (GX<=h, AX=b) in cvxopt?
2
votes
1
answer
94
views
Formulating this optimization problem
Suppose I want to minimize below objective function
$\sum | g(x_i) \cdot I_{g(x_i)<0} |^2$
i.e, the latter penalty terms like $ |g(x_i)|^2 $ are only computed when $g(x_i)<0$. $|g(x_i)|^2$ are ...
1
vote
0
answers
103
views
Maximizing $l_1$-normalized entropy using CVXPY
Suppose that $x = (x_1, ..., x_n)$ is a vector of variables and I would like to maximize the Shannon entropy of $\frac{|x|}{||x||_1}$ (i.e. the vector of absolute values of $x_i$, normalized to have $...
1
vote
0
answers
331
views
Why is the problem infeasible?
Given $\mathbf V_t=\mathbf v_t\mathbf v_t^H$ where $\mathbf v_t=\left(e^{j\theta_{1}},e^{j\theta_{2}}\right)^H$:
\begin{equation*}
\begin{array}{ll}
\underset{\mathbf V}{\operatorname{minimize}} & ...
2
votes
0
answers
183
views
Understanding Illumination Optimisation Problem
I am a newbie to convex optimisation and I am learning with the aid of CVXPY. I am requesting for clarity on the illumination problem as described in Boyd & Vandenberghe lecture 1 slides here. I ...
2
votes
1
answer
1k
views
Why is CVXPY throwing a DCP error with cp.sqrt but no error with cp.norm
I am trying to use CVXPY to optimise signal-to-noise-plus interference ratio (SINR) for a visible light communication (VLC) system. I have one of my SINR constraints stated as
\begin{equation}
\...
0
votes
1
answer
1k
views
Norm constraint in CVXPY
I'm trying to implement the algorithm outlined in https://arxiv.org/abs/1211.5608 on a small scale. I have a linear operator $\mathcal{A}$ which is defined as $$\text{trace}(A^*_l(hm^*))$$ where $$A_l ...
1
vote
1
answer
233
views
1
vote
1
answer
6k
views
Why am I getting this DCPError?
I'm trying to optimize a binary portfolio vector to be greater than a benchmark using CVXPY.
...
1
vote
0
answers
88
views
Ramp least squares estimation
With some given $s$ value, let
\begin{equation}
\begin{aligned}
h(\beta)&=\min(\sum_{i=1}^n(Y_i - X_i\beta)^2, s)\\
&=\sum_{i=1}^n(Y_i - X_i\beta)^2-\max(0, \sum_{i=1}^n(Y_i - X_i\beta)...
1
vote
0
answers
52
views
least squared optimization
I want to decompose a list of 3D vectors $X_j$ as linear combination of five 3D verctors $C_k$
$$X_j= \sum_{i=1}^{5}{w_{ji}C_i}$$ both $X_j$ and $C_i$ are 3 components vectors
$$C= \begin{bmatrix} ...
1
vote
0
answers
97
views
Best optimizer for unconnstrained non-convex nonlinear least-square optimization problem?
I am looking for a very good optimizer to the following problem:
$$\min_{P,\Theta}\lVert APD(\Theta)P^{-1} -B \rVert_F$$
where $A,B \in \mathbb{R}^{n\times m}$, $P \in \mathbb{R}^{m\times m}$, $D\in \...
0
votes
1
answer
89
views
Formulate and solve a simple conic programs in cvxpy language [closed]
Let $r,\epsilon > 0$ and $a, b \in \mathbb R^n$ with $\|a\|_2 \le r$. Define $C(a) := \{x \in \mathbb R^p | \|x+a\|_2 \le r,\;\|x\|_\infty \le \epsilon\}$, and assume it is non-empty.
Question
(A)...
2
votes
1
answer
171
views
Question about strange outputs from the CVXPY solver
I am familiarizing myself with CVXPY, and encountered a strange problem. I have the following simple toy optimization problem:
...
0
votes
1
answer
1k
views
Defining a soft constraint in cvxpy
I am using cvxpy to do a simple portfolio optimization.
I implemented the following dummy code
...
4
votes
1
answer
492
views
Imposing special structure on Positive Semi-Definite matrix
I am trying to implement the algorithm described in reference 1 using cvxpy. However I am struggling to constrain the matrix $Z_j$ as described in equations (33-35)....