Questions tagged [cvxpy]

CVXPY is a Python-embedded modeling language for convex optimization problems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

Convex Optimization: Finding maximally different solution

I am using cvxpy to maximize a function f(x) given the constraints -1 <= x <= 1. Let's call the solution x0. Now, I define a region around the optimal value f(x0) and want to find another ...
Neo's user avatar
  • 1
2 votes
1 answer
151 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} \\...
SPARSE's user avatar
  • 169
1 vote
2 answers
442 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 ...
qmww987's user avatar
  • 113
1 vote
0 answers
150 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 ...
Hudson Hochstedler's user avatar
1 vote
0 answers
253 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 ...
Nash J.'s user avatar
  • 111
3 votes
1 answer
775 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^...
The One's user avatar
  • 133
0 votes
1 answer
409 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$...
Sahil Gupta's user avatar
0 votes
0 answers
199 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?
lichgo's user avatar
  • 109
2 votes
1 answer
98 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 ...
Matt Frank's user avatar
1 vote
0 answers
109 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 $...
Marcin Kotowski's user avatar
1 vote
0 answers
382 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}} & ...
fengbiqian's user avatar
2 votes
0 answers
220 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 ...
Supremum's user avatar
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} \...
Supremum's user avatar
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 ...
akonishi's user avatar
1 vote
1 answer
258 views

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

...
Kashif's user avatar
  • 121
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. ...
George's user avatar
  • 113
1 vote
0 answers
93 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)...
jsmath's user avatar
  • 173
1 vote
0 answers
53 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} ...
Abdessettar Ghemougui's user avatar
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 \...
ArtificiallyIntelligent's user avatar
0 votes
1 answer
93 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)...
dohmatob's user avatar
  • 165
2 votes
1 answer
186 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: ...
Longti's user avatar
  • 123
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 ...
ThatQuantDude's user avatar
4 votes
1 answer
512 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)....
Badgreos's user avatar