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

cvxopt.glpk.ilp documentation on Integer & Binary set keys

I have a mixed integer programming problem, (cutting stock with column generation), that I've solved in AMPL and I'm ported to Python using cvxopt. CVXOPT "op" doesn't provide the binary variable option that I need, so I'm extending it with GLPK to…
PointOnePA
  • 91
  • 6
5
votes
0 answers

cvxopt for Markowitz Portfolio Optimization - finding point of optimal Sharpe Ratio

I've been trying for 3 days to understand how to use cvxopt module in python to calculate the efficient frontier. A code snippet that I found at: https://github.com/markharley/Markowitz/blob/master/markowitz.py is probably the best way to illustrate…
Wei
  • 428
  • 1
  • 5
  • 13
5
votes
0 answers

CVXOPT: solving a simple integer linear programming program

I am using CVXOPT to solve a very simple problem: min -7890424934354.171875*x1 -7890424934354.274414*x2 -7890424934354.246093*x3 s.t: x1 + x2 + x3 = 1 x1,x2,x3 are binary We can see that the optimal solution should be obviously: x1 =0; x2 = 1;…
Sue
  • 113
  • 1
  • 9
5
votes
1 answer

Installing cvxopt

I have some problems when installing this package c:\users\user\appdata\local\temp\pycharm-packaging1.tmp\cvxopt\src\c\cvxopt.h(31) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory error: command …
Jotwege
  • 93
  • 7
5
votes
2 answers

Finding the best combination of lists with maximum function value

Assume I have N lists (vectors) and I want to choose x of them 1
5
votes
0 answers

Installing cvxopt on windows 8 using anaconda and python 3.4

Has anyone managed to successfully install cvxopt on a windows 8 machine, using the anaconda distribution package with python 3.4? I have tried both conda install cvxopt and pip install and both fail. Thanks for any suggestions
Sam
  • 91
  • 1
  • 7
5
votes
1 answer

Convex optimixation with cvxopt in python with complex coefficients

I am trying to solve a convex optimization problem wherein the coefficients can be complex. The native implementation in cvxopt QP doest not seem to support that. I always get the following error: TypeError: 'q' must be a 'd' matrix with one…
5
votes
0 answers

L1-norm regularized least-squares on Python

The L1-norm regularisation problem is defined as the following: minimize || A*x - b ||_2^2 + || x ||_1 but in my case instead of this usual L1 -norm regularised least-square problem i want to solve a problem of this form: minimize || A*x - b…
chrichat
  • 101
  • 8
5
votes
4 answers

How do I use cvxopt for mean variance optimization with constraints?

I am able to use cvxopt to calculate an efficient frontier, per the docs: http://cvxopt.org/examples/book/portfolio.html However, I cannot figure out how to add a constraint so that there is an upper bound on a particular asset's maximum allowed…
bobo5645
  • 441
  • 1
  • 7
  • 15
5
votes
1 answer

Using Python's multiprocessing module together with the cvxopt package

I just came across an issue with the cvxopt package for convex optimization, which I didn't find mentioned in the documentation. I wonder if anybody knows what causes it and how to best work around it. The issue is that when you import cvxopt in a…
jogojapan
  • 68,383
  • 11
  • 101
  • 131
4
votes
3 answers

Quadratic Programming in python using data from octave

I'm in the midst of converting parts of a MATLAB program in to Python and Octave. I am using Octave to generate two matrices, then importing those matrices in to python using oct2py. The root of my problem are these lines in MATLAB (H_combined and…
nrobins1
  • 41
  • 4
4
votes
2 answers

Why does CVXOPT give a rank error for this nonlinear network flow optimisation?

I'm considering using cvxopt to solve some nonlinear network flow optimisation problems. In order to understand the basics, I am trying it with a very simple test network with just 4 vertices and 5 edges. My network looks like this. The blue and…
4
votes
0 answers

CVXOPT GLPK bindings in Python

I'm on Mac OS X El Capitan. I've installed GLPK via brew install GLPK I have python installed via Anaconda. Because I want the GLPK bindings for CVXOPT, I'm installing it manually instead of via condo install. I got the installer here:…
Leo Mizuhara
  • 365
  • 2
  • 3
  • 15
4
votes
1 answer

How to install cvxopt for Python 3.5 on Windows 7

I recently updated to python 3.5.0 and want to install cvxopt, so far without luck. So I tried python 2.7 and following the instructions here i installed mingw (4.9.3) and built blas and lapack from source without issue. When I run python setup.py…
Thanados
  • 113
  • 1
  • 2
  • 9
4
votes
1 answer

Formulating a certain LP in CVXOPT

I am trying to solve a linear program with CVXOPT. There are 2n variables, x_1,...,x_2n. The LP is in the form of min x_{n+1}+...+x_{2n} s.t. Ax \leq b Here, A and b are fixed. It seems very straightforward from here. Since I am optimizing the sum…
N. Mao
  • 499
  • 1
  • 10
  • 19
1
2
3
15 16