Questions tagged [convex-optimization]

Convex minimization, a subfield of optimization, studies the problem of minimizing convex functions over convex sets. The convexity property can make optimization in some sense "easier" than the general case - for example, any local minimum must be a global minimum.

Applications:

  • automatic control systems
  • estimation and signal processing
  • communications and networks,
  • electronic circuit design
  • data analysis and modeling
  • statistics
  • finance
305 questions
58
votes
13 answers

Best open source Mixed Integer Optimization Solver

I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale…
16
votes
7 answers

mathematical optimization library for Java --- free or open source recommendations?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have…
14
votes
1 answer

CVXOPT with only equality constraints

I am trying the following as learning exercise in CVXOPT. I have made minor modifications to the example code here by removing the inequality constraints and adding few more equality constraints. from cvxopt import solvers, blas, matrix, spmatrix,…
Zanam
  • 4,607
  • 13
  • 67
  • 143
9
votes
5 answers

Standard mesh for Concave Hexagons with two Mouths?

I am planning a visualization of flows though Concave Bisymmetric hexagons with two mouths. Example where the length of the side d1 equals the other length of the side d2: which naming I discussed initially here about Irregular hexagons. There is…
7
votes
3 answers

The point that minimizes the sum of euclidean distances to a set of n points

I have a set of points W={(x1, y1), (x2, y2),..., (xn, yn)} on the 2D plane. Can you find an algorithm that takes these points as the input and returns a point (x, y) on the 2D plane which has the minimum sum of distances from the points in W? In…
7
votes
1 answer

What are the specific reasons for CVXPY to throw `SolverError` exception?

I am using CVXPY (version 1.0) to solve a quadratic program (QP) and I often get this exception: SolverError: Solver 'xxx' failed. Try another solver. which makes my program really fragile. I have tried different solvers, including CVXOPT, OSQP,…
6
votes
1 answer

Block LMI in CVXPY

I want to translate a LMI-constrained optimization problem from Matlab to Python. While reading the CVXPY documentation, I found that I can define an LMI-constrained problem by creating a matrix variable and adding the corresponding constraint.…
czr
  • 658
  • 3
  • 13
6
votes
1 answer

Constraints do not follow DCP rules in CVXPY

I want to solve this problem using CVXPY but I don't know why I get the following error message: DCPError: Problem does not follow DCP rules. I guess my constraints are not DCP. Is there any way to model this in DCP? n_k = [10000,…
mahdieh ahmadi
  • 101
  • 1
  • 1
  • 5
6
votes
1 answer

Element-wise multiplication in CVXPY

I am trying to do element-wise multiplication in CVXPY in the objective function. Is this allowed as part of a convex problem? X is a n x 1 variable. V is a n x n constant. I want to do the equivalent of np.multiply(X, V*X), which returns an n x 1…
goldenbear137
  • 81
  • 1
  • 1
  • 4
6
votes
4 answers

Efficient free/open-source SOCP (second order cone programming) solvers

I am looking for a recommendation (or comparison) of solvers for second order cone programming with regard to evaluation speed. The solver must be free for non-profit use or open source. I am fairly open regarding the environment: stand-alone…
ARF
  • 7,420
  • 8
  • 45
  • 72
6
votes
3 answers

CVX-esque convex optimization in R?

I need to solve (many times, for lots of data, alongside a bunch of other things) what I think boils down to a second order cone program. It can be succinctly expressed in CVX something like this: cvx_begin variable X(2000); expression…
walkytalky
  • 9,453
  • 2
  • 36
  • 44
6
votes
1 answer

Getting negative alpha value in SVM using scikit package in python

I am implementing SVM using scikit package in python. I am having difficulty while interpreting the "alpha i" values in plot_separating_hyperplane.py import numpy as np import pylab as pl from sklearn import svm # we create 40 separable…
5
votes
2 answers

Adding an affine term to linear SVM / logistic regression objective function

I am working currently on a problem where I have to solve either an L2-regularized logistic regression or L2-reg linear SVM problem, where I have an added affine term. So my problem for example is: min_ w {C*sum_i max(1-w*x_i*y_i,0) + 0.5*||w||^2_2…
5
votes
3 answers

How to create an inequality constraint on the inner product of two columns in CVXPY?

Suppose my constraint is the product of the first column and third column of the matrix variable is greater than one. How can I implement in CVXPY? Example: w = Variable(4,3) In Matlab, my constraint would be: w(:,1)'*w(:,3)>1 How can I implement…
1
2 3
20 21