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

Complie with -fPIC error while installing cvxopt for python 3 in ubuntu 14.04

I am trying to install cvxopt using the git option provided in the cvxopt documentation. When I run ..:~/cvxopt/$ python3 setup.py install I get the following error: x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions…
Raghu Ram
  • 11
  • 1
1
vote
0 answers

CVXOPT Portfolio Optimization

When using the CVXOPT quadratic programming solver to optimize a portfolio and maximize volatility (yep maximize not minimize), I receive the error given below. I have played with the optimizer and determined the error is produced by the solver…
1
vote
2 answers

L1 trend program not working, CVXOPT, CVXPY

I took the following code from here L1 trend filtering Now i have python 2.7, and my code is as following : import cvxopt as cvxopt import scipy as scipy import scipy.sparse import cvxpy as cvx import numpy as np import matplotlib.pyplot as…
klbm9999
  • 31
  • 1
  • 9
1
vote
2 answers

Python pip install cvxopt error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Trying to install cvxopt using "pip install". Using Window 10, Python 3.6.4 (64-bit), and have already installed Microsoft Build Tools 2015 and Visual Studio 14.0. I have also directly downloaded the module from PyPI with no luck. Needing this for…
Clayton
  • 11
  • 1
  • 3
1
vote
0 answers

Installing numpy+MKL on Linux to use cvxopt package

In Windows, I have a Python 3.6 script that uses the cvxopt package which needs numpy + MKL for it to work. numpy + MKL was successfully installed using the prebuilt binaries here. Problem: Now the script also needs to be run in Ubuntu 16.04, but…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
1
vote
1 answer

Infeasible solution for an lp even though there exists feasible solution(using cvxopt python)

I am trying to find an lp solution to the following problem and even though I can construct feasible points by hand , I seem to get a infeasible certificate from cvxopt. Below is the example and snippet of code import numpy as np from cvxopt import…
1
vote
0 answers

How to implement Quadratic constraint in SCS for python

I have an quadratic optimisation problem of the form min w.r.t. to x 1/2 x'x + q'x S.t. Gx <= h I have a rather big problem ( few million points and constraints), and while cvxopt's default solver proved effective, I'm curious about implementing it…
1
vote
0 answers

How to encode optimization program with no clear objective function

I am trying to use CVXPY to solve a linear program of the following form: 10 people respond to a survey asking for their household, age, gender, and generation. From these responses, I have written up many constraints and statistics such as "average…
1
vote
1 answer

Displaying optimal solution in cvxopt

Is there a way to only display the optimal values in cvxopt without displaying the iterative values such as pcost,dcost ,gap etc as shown in below example, n = 5 #no. of design variables P = spmatrix(1,range(n),range(n)) q =…
1
vote
0 answers

CVXOPT for convex optimization does not converge

I am trying to solve a nonlinear convex optimization problem of the following form c'x + f(x) subject to some affine constraints. Before that I wanted to make sure that I can solve a simple problem without f(x). Since I have the analytical first…
1
vote
0 answers

markowitz portfolio optimization using quadratic programming and convex solver

I'm using python code lifted from a quantopian blog in order to find an optimized portfolio. I've gone through the entire exercise detailed here: https://blog.quantopian.com/markowitz-portfolio-optimization-2/ Everything works like a charm until…
Werhli
  • 251
  • 1
  • 2
  • 4
1
vote
0 answers

Is chompack not suitable for windows 64 bit machine?

I have installed python, cython, cvxopt but failed to install chompack. The error message is Cython does not appear to be installed. But Cython is stalled as when I try to install it says requirement already satisfied. Any suggestion? My machine is…
Creator
  • 139
  • 1
  • 3
  • 15
1
vote
0 answers

How to install CVX in Python, along with chompack in windows 64 bit?

Can anyone please give me the links to download the links to install CVX in Phyton, along with chompack? I tried several version but never able to install chompack. I get error message like "failed building wheel CVXOPT" while installing chompack.…
Creator
  • 139
  • 1
  • 3
  • 15
1
vote
1 answer

How to convert a CVXPY result into numpy

I have got an optimization problem defined in cvxpy, but want to work with the result in my code in numpy afterwards - how can I convert it from cvxpy into numpy? It is of type If I want to plot it to see…
N8_Coder
  • 713
  • 3
  • 10
  • 20
1
vote
2 answers

cvxopt.solvers.qp in python causes the kernel to die

When I try to solve a quadratic programming problem with solvers.qp from the cvxopt package in python, it kills my kernel after a few seconds. The documentation of the package is found at http://cvxopt.org/userguide/coneprog.html#cvxopt.solvers.qp .…
Marlo
  • 207
  • 1
  • 4
  • 12