As of May 31, 2023, we have updated our Code of Conduct.

# Tag Info

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. ...
• 36.4k

### 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).

### Translate LP format to Numpy matrices

As has been discussed in the comments already, your suggested workflow is more complicated than it needs to be without providing any advantages. Gurobi is perfectly capable of handling LP files and if ...
• 1,538

### Mixed integer quadratic programming (MIQP) in CVXPY

What you described is a problem for which every variable is semicontinuous. In mixed integer programming, the variables are $(x,y)\in\mathbb{Z}^{n_1} \times \mathbb{R}^{n_2}$. For (pure) integer ...
• 28.1k

### 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 ...
• 3,091

### Simple OLS problem can only be solved in SCS. Is the dual infeasible?

Mosek does not fail. Mosek says the problem is dual infeasible which means if the problem has solution, then it is unbounded. In fact Mosek has a quite good certificate for that. Since your problem ...
• 2,826

### Matrix Singularity Constraint

No, it is an intrinsically non-convex constraint. Just take a diagonal matrix, and the feasible set would be the coordinate axes, i.e. nonconvex and highly ill-conditioned as the feasible set has ...
• 1,682

### Adding CVXPY abs to optimization problem turns out to be non-DCP

I think you want cp.norm1(beta - s), with no need for abs. This is DCP-compliant. Taking separate norms of ...
• 12.4k
Accepted

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

Not sure if it is DCP, but you can write it as a quadratic constraint: $$\sum_k z_{k,i} z_{k,j} \ge 1$$ You can also linearize as follows: \begin{align} \sum_k x_{k,i,j} &\ge 1 \\ x_{k,i,j} &\...
• 28.1k

• 2,433
Accepted

### Directly calling gurobipy API causes substantially longer runtime than calling cvxpy

As others have pointed out already, you are not solving the same instances. When writing out the MPS files using a gurobi.env file containing ...
• 1,538

### Directly calling gurobipy API causes substantially longer runtime than calling cvxpy

Note that the model fingerprint differs. I suspect that the variable or constraint orders are different.
• 28.1k
Accepted

### Maximizing a Ratio/Percent

CVXPY makes this easy to do, using its disciplined quasiconvex programming (DQCP) capability. An example is provided at https://www.cvxpy.org/examples/dqcp/concave_fractional_function.html . ...
• 12.4k

### Practical open source LP solvers for large linear programming problem with $10^7$ parameters

If you can't find (or can't afford) a solver that will handle a problem with that many nonzero matrix coefficients, and if your problem has a structure that fits one of the following methods, you ...
• 36.4k

### Constraint raises DCP Error

After a few hours extra deliberation and and working on the problem, I was able to figure out the reason. It was as I thought initially and my calculation for my ...
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 ...
• 1,016

### 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.
• 3,091

### Is solving a quadratic programming optimization problem using python slower than C++？

Agree with Omidi. One need to timeit and test timing of model loading/updating using one or two constraints using loops. Like Numpy/pandas in python allows vars to be listed in array/dataframe. That ...
• 3,091
Accepted

### Simulating an integer quadratic knapsack problem

The constraints are fine. Per the CVXPY "Choosing a solver" table, neither GLPK_MI nor SCPY support QP. You need a solver in that table having an X in both the QP and MIP columns. The error ...
• 12.4k
Also don't think the other_constraint is required. If first constraint & variable declaration constrain the following $x$ is non negative and $\sum_i x_i = 1$. So all $X$s will be $\le$1 anyway. ...