Questions tagged [cvxopt]

A Python package for convex optimization, including solvers for linear programming, quadratic programming, semidefinite programming and more.

There is an official web site of the CVXOPT package. The official description of the package is given there as follows:

CVXOPT is a free software package for convex optimization based on the Python programming language. It can be used with the interactive Python interpreter, on the command line by executing Python scripts, or integrated in other software via Python extension modules. Its main purpose is to make the development of software for convex optimization applications straightforward by building on Python’s extensive standard library and on the strengths of Python as a high-level programming language.

227 questions
1
vote
0 answers

Solver Cosmo, how can I make a low boundary as a infinite

I'd like to compare the efficiency of solvers, so I need to optimize the same matrices with different solvers. I wonder how can I set the boundary option of the solver COSMO to inf? It worked when I type just lb=[-inf, -inf, -inf]. Is there any way…
1
vote
1 answer

Modifying existing logger configuration of a python package

I am currently using cvxpy for my project. When I solve an optimization problem, I have the option to turn the verbose flag on using prob.solve(solver=cvx.CVXOPT, verbose=True). When I do that, the logger starts printing the DEBUG level log messages…
Omar Shehab
  • 1,004
  • 3
  • 14
  • 26
1
vote
1 answer

Optimisation Multiple Constraints - Using CVXOPT

I am trying to solve a linear algebra problem: an optimisation problem and I am using CVXOPT. I've split the problem into 3 components In its simplest form, The general formulation for CVXOPT is Minimize 1/2xTPx+qTx subject to Gx≤h and Ax=b. 1st…
Marco_sbt
  • 309
  • 1
  • 12
1
vote
1 answer

Absolute value function not recognized as Disciplined Convex Program (CVXPY)

I am trying to run the following optimization using CVXPY: import cvxpy as cp import numpy as np weights_vec = cp.Variable(10) er_vec = cp.Parameter(10, value=np.random.randn(10)) prev_h_vec = cp.Parameter(10, value=np.ones(10)) tcost_vec =…
1
vote
1 answer

cvxopt with Python3 on MacOS

Importing the cvxopt package isn't working after installing it with pip: % sw_vers ProductName: Mac OS X ProductVersion: 10.15.7 BuildVersion: 19H15 % python3 --version Python 3.7.2 % pip3 install cvxopt Collecting cvxopt Using cached…
1
vote
2 answers

Python package not installable in docker container

I have basic python docker container file like this: FROM python:3.8 RUN pip install --upgrade pip EXPOSE 8000 ENV PYTHONDONTWRITEBYTECODE=1 # Turns off buffering for easier container logging ENV PYTHONUNBUFFERED=1 # Install pip…
Heikkisorsa
  • 740
  • 9
  • 31
1
vote
1 answer

Minimizing norm subject to linear constraint, using quadratic programming/minimization in Python

I need to solve the following quadratic minimization subject to linear inequality constraint; Where ||ξ|| is the Euclidean norm of ξ, ξ and vk are vectors and λk is a scalar. I think this can be done with CVXOPT, but I don't have any experience…
Vinzent
  • 1,070
  • 1
  • 9
  • 14
1
vote
1 answer

How to construct a SOCP problem and solve using cvxpy and cvxpylayers

I'm trying to solve a SOCP problem using cvxpy and integrating it to cvxpylayers. I'm looking at this SOCP problem (problem 11) (here is the scihub link in case you can't access), and here is a snippet of the problem (note min (p-t) comes from an…
ben
  • 159
  • 1
  • 4
  • 15
1
vote
0 answers

Linear programming vs. Iteratively reweighted least squares running time

I was trying to run a Least Absolute Deviance regression (L1 regression). I did it by designing a linear program, and solving with CVXOPT (in Python). The number of features (including constant) was 13 and the number of samples was ~100K. It took…
1
vote
0 answers

CVXOPT yields nan during robust least-squares

I'm trying to reproduce the example "robust least-squares" from the cvxopt documentation: import numpy as np import cvxopt def robls(A, b, rho): m, n = A.size def F(x=None, z=None): if x is None: return 0, cvxopt.matrix(0.0, (n,1)) …
theV0ID
  • 4,172
  • 9
  • 35
  • 56
1
vote
0 answers

Segmentation fault (core dumped) while using CVXPY library

I am trying to solve an optimization problem using CVXPY library. My code runs properly on a dummy dataset but crashes when I key in the actual dataset. The error I got is Segmentation fault (core dumped) I tried to search for the solution on…
Upendra01
  • 344
  • 3
  • 5
  • 15
1
vote
1 answer

CVXOPT seemingly provides non-optimal result for this simple quadratic program

I am trying to solve a simple quadratic program using CVXOPT and am troubled by the fact that I can guess a feasible solution better than the optimum provided by the solver. The optimisation is of the form: I will provide the definitions of…
N. Mao
  • 499
  • 1
  • 10
  • 19
1
vote
1 answer

inputting specific constraints into cvxopt QP

I have a rather complex quadratic problem that I am trying to solve in python, however, for the sake of this question - i am significantly simplifying the problem at hand. I have the following quadratic function I am trying to minimize while…
yungpadewon
  • 237
  • 3
  • 10
1
vote
1 answer

cvxpy.error.SolverError: The solver CBC is not installed in windows 10 python?

I have tried to install cvxpy and cvxopt both packages by using pip command the package was installed successfully but while running my code i'm getting error like CBC not installed inside…
Sruthipriyanga
  • 468
  • 4
  • 17
1
vote
0 answers

How to minimize an objective function containing frobenius and nuclear norms?

subject to the constraint that square of Frobenius norm of Ds matrix has to be less than or equal to 1. Currently I am using CVXPY library to solve the objective function. My code sample looks like import cvxpy as cp import numpy as…