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
0
votes
1 answer

cvxopt DLL load failed

I have been trying to use the cvxopt package in my IntelliJ program. It gives me the following error message: File "C:\Users\\AppData\Local\Programs\Python\Python37\Lib\site-packages\cvxopt\__init__.py", line 50, in import…
naraghi
  • 430
  • 1
  • 6
  • 18
0
votes
0 answers

Getting DCPError when trying to solve Dual form of SVM using CVXPY

I am trying to create a SVM using cvxpy, by solving its Dual form Here is the code: import cvxpy as cp import numpy as np DIM = 2 NUM = 50 #COLORS = ['red', 'blue'] M1 = np.ones((DIM,)) M2 = 2 * np.ones((DIM,)) C1 = np.diag(0.3 *…
Siladittya
  • 1,156
  • 2
  • 13
  • 41
0
votes
0 answers

How to run MOSEK solver in CVXOPT

I have written a small code to do a simple min variance optimisation using CVXOPT, you can see the whole code below By using solvers.qp(P, q, G, h, A, b) in CVXOPT the code runs fine and it find a solution solvers.qp(P, q, G, h, A, b) I wanted to…
Marco_sbt
  • 309
  • 1
  • 12
0
votes
1 answer

What algorithm is used by cvxopt.solvers.qp for quadratic programs in python

I am trying to understand what algorithm is used by cvxopt for solving quadratic problems. I tried to look at the documentation but I couldn't find any answer there too.
Cpt. Price
  • 71
  • 2
  • 8
0
votes
0 answers

Cannot run import cvxopt

I am trying to run cvxopt for convex optimization applications on my Pycharm, but I am having some trouble importing the library import numpy import cvxopt Traceback (most recent call last): File "", line 2, in File…
JungleDiff
  • 3,221
  • 10
  • 33
  • 57
0
votes
0 answers

Optimization with grouping function

I have an optimization problem with the dat frame as below: Loc Lattitude Longtitude Car Distance 1 34.30 -36.30 A 23 2 36.06 -67.32 B 32 3 41.35 -22.04 C 12 4 30.49 -14.25 A 41 5 …
Grace
  • 75
  • 11
0
votes
1 answer

How to solve this optimization problem with cvxopt

I have a non-linear optimization problem which, in Mathematica, could be solved as: FindMaximum[{(81 x + 19)^0.4 + (80 (1 - x) + 20)^0.6, 0 <= x <= 1}, x‬‬] However, now I am on a computer without Mathematica and I would like to solve a similar…
Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183
0
votes
1 answer

Weights minimization issue with linprog

I am trying to use python (and at present failing) to come to a more efficient solution than Excel Solver provides for an optimization problem. Matrices The problem is the form AB=C -->D Where AB produces C where the absolute value for C-D for each…
0
votes
0 answers

Posing a quadrating optimization problem for CVXOPT correctly

I am trying to minimize the function || Cx - d ||_2^2 with constraints Ax <= b. Some information about their sizes is as such: * C is a (138, 22) matrix * d is a (138,) vector * A is a (138, 22) matrix * b is a (138, ) vector of zeros So I have 138…
0
votes
1 answer

cvxopt : solver.cp gives a wrong awnser

I am trying to solve a simple convex optimisation problem with cvxopt. I want to maximize the ROI function with x and y >=1 and x+y<=6 import numpy as np def ROI(x,y): return np.exp(-x)*x*10+np.exp(-y)*y**2*10 then I use cvxopt to minimize…
0
votes
1 answer

Is there a way to implement convex optimization using N-dimensional arrays?

Given data with shape = (t,m,n), I need to find a vector variable of shape (n,) that minimizes a convex function of the data and vector. I've used cvxopt (and cvxpy) to perform convex optimizations using 2D input, but it seems like they don't…
John
  • 15
  • 1
  • 3
0
votes
0 answers

raise ffiplatform.VerificationError(error) using 'pip install <>'

Trying to install cvxopt package using pip generates the following error message - how can I avoid this? Any other package also fails with same message: raise ffiplatform.VerificationError(error) cffi.ffiplatform.VerificationError: importing…
W.R
  • 187
  • 1
  • 1
  • 14
0
votes
1 answer

Python setting glpk options with cvxopt

I am trying to set the algo. params. for glpk.ilp called from cvxopt in python. I am solving a MILP. The solution is indeed returned but I would like to fine-tune the algo. parameters as in some cases it does not find a solution (i am assuming it…
bacoder
  • 11
  • 1
0
votes
2 answers

How to define variables, constrains to Pandas Dataframe when using CVXPY for optimization?

import pandas as pd import numpy as np import re import cvxpy as cvx data = pd.read_excel('Optimality_V3.xlsx', encoding='latin-1') As u can see I just imported a csv file as a dataframe. Now I want to solve a maximixation function using the…
Nitish Gaddam
  • 101
  • 1
  • 11
0
votes
1 answer

Convex Optimization problem labeled as non convex

I'm using cvxpy (1.0.11) to solve a convex optimization problem. The convex problem I have is being labelled as non-convex I think because it does not know that the parameter alpha is bounded between [0, 1]. I know this from this line fails... loss…
SARose
  • 3,558
  • 5
  • 39
  • 49