11
votes
Accepted
Solver for convex optimization with exponent in the objective function
You are missing some details for the claimed convexity of $f(x)$. I will assume that you meant to say convex on the domain $C+mx+\frac{s}{x+t} \geq 0$ and $x+t \geq 0$. In this case the epigraph of $f(...
9
votes
Accepted
Determining the optimize lambda in Multi-Objective Optimization
There is no mathematical way to derive (or justify) a value for $\lambda$. The justification has to be made in the context of a specific problem and a specific (reasonably credible) decision maker. ...
8
votes
Accepted
How to solve this linear program with an exponential number of constraints?
For each $k\in\{1,\dots,n\}$, you want the sum of the $k$ smallest $f_i(x)$ to be at least $\sum_{j=1}^k b_j$. Equivalently, you want the sum of the $n-k$ largest $f_i(x)$ to be at most $\sum_{i=1}^n ...
8
votes
Accepted
How to find the index of the item, the first time appears?
Here's a formulation if at least one $x_i$ must be $1$:
\begin{align}
\sum_i y_i &= 1 \tag1\label1\\
y_i &\le x_i &&\text{for all $i$} \tag2\label2\\
y_i &\le 1-x_j &&\text{...
8
votes
Determining the optimize lambda in Multi-Objective Optimization
Another approach could be generating the Pareto Frontier, solving the problem several times for different values of lambda, using a Weighted sum algorithm (see this or this).
7
votes
Determining the optimize lambda in Multi-Objective Optimization
In addition to the above answers, there's good deal of discussion here. One of the experts logically breaks down some key questions like avoiding dominating solution by sticking to single combination ...
7
votes
How to find the index of the item, the first time appears?
Suppose the index is 1-based and set constant $u_0 = 0$. With binary variables $u_i, y_i, i=1,\dots,n$ and constraints
$$
\begin{align}
u_i &\geq x_i\\
u_i &\geq u_{i-1}\\
u_i &\leq x_i + ...
6
votes
Minimize sum of ReLU
Introduce nonnegative variables $y_i$ and minimize $\sum_i y_i$ subject to linear constraints $$y_i \ge v_i \cdot x + b_i$$
6
votes
Solver for convex optimization with exponent in the objective function
Use Ipopt and a modeling language. For example, JuMP: https://jump.dev/JuMP.jl/stable/tutorials/nonlinear/introduction/
...
5
votes
Solver for convex optimization with exponent in the objective function
Best way is to apply log to the function as optimal solution to log of a function is the same for the function.
$ \log f = p[\log (C(x+t)+ mx(x+t)+s)-\log(x+t)]$
Then you have to get the actual ...
5
votes
Is it possible to express these constraints with basic cones?
Let $x_i = \frac{z_i}{y_i}$.
Then, presuming $x_i$ does not appear in any of the other constraints, this appears to be a Generalized linear-fractional programming problem per section 4.3.2 "...
5
votes
Accepted
Projection to sublevel sets of convex/strongly convex function
The projection can be written as a convex optimization problem
\begin{align*}
\Pi_{X_{\alpha}}(\bar{x}) \in \arg\min_{x} \quad & \| x - \bar{x} \|\\
\text{s.t.} \quad & f(x) \leq \alpha
\end{...
4
votes
Accepted
How to solve this mixed integer quadratic program using cvxpy or other method?
Maybe work with a slightly different objective. Basically, you want:
$$ A_{i j}^l / A_{j +l}^l \approx D_{i j}^l / D_{ijH}^l $$
You could do:
$$ \min \sum |A_{i j}^l - A_{j +l}^l \cdot D_{i j}^l / D_{...
4
votes
Accepted
Is not the substitution method supposed to reduce the computation cost?
If you have a long equality constraint $x=\sum_j a_j y_j$ and $x$ appears multiple times in your model, performing the substitution can greatly increase the number of nonzero coefficients in the ...
4
votes
When is $\max_x\{f(g(x))\} = f(\max_x\{g(x)\})$?
A sufficient condition for $\max_x\{f(g(x))\} = f(\max_x\{g(x)\})$ is that $f$ is a monotone increasing function on the range of $g$. This is also sufficient condition for $\min_x\{f(g(x))\} = f(\...
3
votes
How to deal this L0 norm of a vector of L2 or L1 norms in objective?
You can introduce binary variables $\mathbf{z}\in \lbrace 0, 1 \rbrace^n$ (where $n$ is the dimension of $\mathbf{b}$) together with the constraints $b_i \le M_i z_i,$ where $M_i$ is an upper bound ...
3
votes
Does solver take advantage of the problem structure?
Assuming you're talking about the time required to build the model:
Let's time your two approaches first inside an iPython shell via the %%timeit magic command. ...
3
votes
Does solver take advantage of the problem structure?
Probably the content here will be helpful.
Using for-loop outside of the gurobi native construct is slightly faster.
3
votes
Accepted
How to formulate the inequality constraint $\sqrt{x^2+y^2} \leq z$ using gurobipy?
Thanks to the Gurobi staff, this is how to formulate it using the norm constraint:
...
3
votes
Constrained Optimization Closed Form Solution Using KKT Gives Wrong Values
For convenience, let $x_j = \gamma_j / n$, $c_j = \gamma_j^\mathrm{priority} / m$, then the problem is
$$
\begin{align*}
\min_{x_j} \quad&\sum_{j=0}^m(x_j - c_j)^2\\
\mathrm{s.t.} \quad&0\leq\...
3
votes
Number of solutions to geometric program
This is a follow-up to the post of Mark Stone.
The problem can be formulated in a conic form using
https://docs.mosek.com/modeling-cookbook/expo.html#geometric-programming
and solves quite well on ...
3
votes
Accepted
Number of solutions to geometric program
I general, you can't determine infeasibility or unboundedness by the structure.
But, if after change of variables to convex form, the objective is strictly convex, the solution, if it exists, is ...
3
votes
Accepted
Sensitivity analysis for decision vectors in convex programming
Suppose that $F: R^{n} \rightarrow R^{n}$, $F(x)=b$, and $F$ is differentiable at $x$ with non-singular Jacobian $J(x)$. Then to first order, we can use the Jacobian to find a change $\Delta x$ due ...
3
votes
Rational LP, its Rational solution and a minimum precision
Finding $N_{common}$ seems equivalent to finding a column scaling such that the optimal solution is integer-valued. Surely, if you want to do this without knowledge of the optimal solution, you are ...
2
votes
Convex optimization with linear constraints. Can I solve it analytically?
You are going to be dealing with various cases depending on the values of $c,d,ab$ and $m.$ I think I can get you part way, but I have not dealt with all the cases.
Given that the objective function ...
2
votes
On a clarification on usage of inequalities in convex programming
Since you requested a reference I suggest you look into Convex Optimization by Boyd and Vandenberghe. In Section "4.2.1 Convex optimization problems in standard form" you can see that they ...
2
votes
How to find the index of the item, the first time appears?
If number is non-binary, say non negative continuous number $c$, introduce a vector of binary $y_i$ initialized to 0.
Have two binary variables $z_1 \ and z_2$
$c - x_i \le My_{i}$
$x_i - c \le M(1-y_{...
2
votes
Accepted
Does the cvxpy replace the max function by MIP formulation under the hood?
No. Firstly you should use cp.maximum instead of cp.max. Secondly, it is converted to a convex programming problem (LP in this ...
2
votes
Does the cvxpy replace the max function by MIP formulation under the hood?
Natively I am not sure since solvers that come do not have MIP capability
Scroll down for list of solvers
And this link to source code max seems to suggest it uses max function.
2
votes
Decision Variables becoming Constraints
This structure can arise in multi-objective optimization problems. While it is common for multi-objective problems to express each objective function directly in terms of the same variables, there can ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
convex-optimization × 157optimization × 57
linear-programming × 23
convexity × 19
mixed-integer-programming × 18
nonconvex-programming × 14
quadratic-programming × 13
constraint × 12
disciplined-convex-programming × 12
nonlinear-programming × 11
modeling × 10
cvxpy × 10
solver × 9
duality × 8
python × 6
integer-programming × 6
linearization × 6
kkt-conditions × 6
lagrange-multipliers × 6
semidefinite-programming × 6
reference-request × 5
constraint-programming × 5
gurobi × 4
pyomo × 4
cone × 4