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
0 answers

Endless process

from cvxopt import matrix, solvers c = matrix([-4., -5.]) G = matrix([[2., 1., -1., 0.], [1., 2., 0., -1.]]) h = matrix([3., 3., 0., 0.]) sol = solvers.lp(c, G, h) print sol['x'] I start running this code and it doesn't finish. PS. Python 2.7…
Poklon
  • 3
  • 2
0
votes
2 answers

CVXOPT installation fails at complex type declaration in file misc.h

When attempting to install the cxvopt package for Python, using pip on Windows, I get the following error messages: misc.h(35): error C2146: syntax error: missing ';' before identifier 'z' misc.h(35): error C2061: syntax error: identifier…
0
votes
1 answer

installing cvxopt on windows 10 using anaconda python 3.*

I've been trying to install cvxopt on Anaconda Python 3.x for a while now, reading past posts and I can't seem to make it work. Here is what I have tried so far: pip install cvxopt --user which gave me the following error: Failed building wheel for…
chance
  • 1
  • 1
  • 1
0
votes
1 answer

Feeding scipy.sparse() sparse matrices into CVXOPT

[I'm following the answer here] I am trying to feed sparse matrices in CVXOPT. Consider the following minimal example: import numpy import cvxopt import scipy.sparse K = 10 n = 36 g_0 = numpy.random.randn(n, K) d_0 = numpy.zeros(n) + 1.0 g_2 =…
user189035
  • 5,589
  • 13
  • 52
  • 112
0
votes
1 answer

The right package/software for non-linear optimization with semidefinite constraints

I am struggling to solve an optimization problem, numerically, of the following (generic) form. minimize F(x) such that: ___(1): 0 < x < 1 ___(2): M(x) >= 0. where M(x) is a matrix whose elements are quadratic functions of x. The last constraint…
0
votes
1 answer

Minimax optimization in PICOS

I have a generic question on how to solve optimization problems of the Min-Max type, using the PICOS package in Python. I found little information in this context while searching the PICOS documentation and on the web as well. I can imagine a simple…
Pavithran Iyer
  • 402
  • 5
  • 14
0
votes
1 answer

Python CVXOPT for entropy minimization

I am looking the example on the page: http://cvxopt.org/examples/book/maxent.html The problem statement is: # minimize p'*log p # subject to -0.1 <= a'*p <= 0.1 # 0.5 <= (a**2)'*p <= 0.6 # -0.3 <= (3*a**3 - 2*a)'*p <=…
Zanam
  • 4,607
  • 13
  • 67
  • 143
0
votes
1 answer

CvxOPT fails to run: _gfortran_st_write_done undefined

I am trying to get cvxopt running on a linux-ppc64 system. I had to compile and install everything, roughly in the following order, from source, without root access. a) Python 2.7 b) BLAS, LAPACK c) NUMPY, SCIPY d) CVXOPT I first installed Python,…
0
votes
1 answer

Cannot install cvxopt on OSX 10.10.5

I was trying to install cvxopt to my OSX system. But It didn't work. I just followed the instruction of the standard installation on: http://cvxopt.org/install/#standard-installation. The response from the terminal is as follows: running…
Jorvey
  • 281
  • 1
  • 3
  • 3
0
votes
1 answer

Running cvxopt with an unbounded solution

I'm trying to optimize the following 2d linear program using cvxopt: A = np.array([[1, 0], [1, 0], [0, -1], [0, 1], ], dtype=np.float) b = np.array([2, 4, 1, …
Nick Sweet
  • 2,030
  • 3
  • 31
  • 48
0
votes
1 answer

cvxopt can't solve a simple linear optimization

I have this model min c' x s.t. G x <= h x are integers or binary variables where c is a 16x1 numpy array of coefficients, G is a 12 x 16 matrix that represents the constraints of the model and h is 12x1 array of…
linello
  • 8,451
  • 18
  • 63
  • 109
0
votes
0 answers

Code wrapped with Cython unexpectedly segfaulting

I've written a simple cython wrapper for donlp2, a C optimization library. The library uses global variables extensively and assumes the caller has written functions with pre-defined names so the function can call them. (e.g., there is a function ef…
cjordan1
  • 277
  • 1
  • 4
  • 11
0
votes
2 answers

Lapack: Cholesky matrix factorization problems

Issue 1 Can somebody recommend a less awkward way of doing a Cholesky factorization in python? Particularly the last line bugs me. SigmaSqrt = matrix(Sigma) cvxopt.lapack.potrf(SigmaSqrt) SigmaSqrt = matrix(np.tril(SigmaSqrt)) Issue 2 I have the…
ARF
  • 7,420
  • 8
  • 45
  • 72
0
votes
1 answer

When installing cvxopt , I get an error that it cannot find -lgfortan

I can only find libgfortan.a. I am installing cvxopt using cmd and following the instruction on the website. I get an error that it cannot find -lgfortan.
user2714423
  • 273
  • 1
  • 3
  • 5
0
votes
1 answer

Defining a function in cvxopt (python) using log cdf

I would like to define an objective function as: -sum(log(normcdf(x))), where normcdf operates on each component of x. Looks like cvxpy has implemented it, but I would like to stick to cvxopt in Python. Any suggestions? ***** Example python code…
meninder
  • 1
  • 1