# Questions tagged [disciplined-convex-programming]

Disciplined convex programming (DCP) is a system for constructing mathematical expressions with known curvature from a given library of base functions.

29 questions
Filter by
Sorted by
Tagged with
1 vote
33 views

### Penalize absolute value while keeping the problem DPP (CVXPY)

I am trying to implement the objective function max a . x + c . abs(x - g). where all elements of c are non-positive, ...
• 21
1 vote
34 views

### Modeling $-\ln(1 - w \cdot \sigma(x))$ as disciplined convex programming

Given $0 < w \leq 1$, I would like to use the function: $$-\ln(1 - w \sigma(t)),$$ where $\sigma(t) = 1 / (1 + \exp(-t))$ is the sigmoid function, in my objective. It's a bit tedious, but this ...
• 121
1 vote
112 views

• 259
243 views

### Quadratic optimisation with $\ell_1$ constraints with CVXPY

Crossposted on Mathematics SE I seek to minimize a convex quadratic objective subject to linear and $\ell_1$-based equality constraints. When I turn to CVXPY, an error is raised indicating that it ...
• 21
1 vote
76 views

### Handling Variable Division in CVXPY for Calculating Annualized Rate of Change

I am working with a dataset that contains multiple entries for different IDs across various years. Some IDs might have a gap of years between entries. My goal is to solve an optimization problem using ...
• 111
77 views

### How to rewrite a constraint with sum of convex and concave components to satisfy DCP rule?

suppose that decision variable is X with N dimensions, and one type of the constraint is ...
134 views

### How to linearize or fix this disciplined convex programming error?

How can I linearize this constraint $$d_{u,c}\sigma \le \|{\bf f}_{u,c}\|^2\le Td_{u,c}$$ $\sigma$ is a very small number based on scale of $f$ $T>0$, ${\bf f}_{u,c}$ is optimization variable, a ...
• 2,377
440 views

### MIQP ā CVXPY unable to treat summation of variables as a variable

I have a quadratic integer programming assignment problem. The goal is to assign riders seats on a bus such that distance between any two riders is maximized; however, the importance of each objective ...
• 551
504 views

### How to formulate the inequality constraint $\sqrt{x^2+y^2} \leq z$ using gurobipy?

How to formulate the following constraint using gurobipy $$\sqrt{x^2 + y^2} \le z$$ where $x, y, z$ are continuous optimization variables? I saw how to formulate it using CVXPY: ...
329 views

### Express equality constraint involving exponentials cones

The exponential cone is define such that $(x, y, z) \in \text{ExpCone: if } y \exp(x / y) \leq z \land y > 0.$ The inequality $\exp(a) \leq b$ can be expressed as $[a, 1, b] \in \text{ExpCone}$. ...
• 4,037
229 views

### Constraints like "max(column a + column b) == 2" are not DCP

I am struggling with the following constraint on a minimization problem cvx.max(z[:, i] + z[:, j]) == 2 where z is a Boolean ...
• 900
285 views

• 2,377