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

CVXOPT + GLPK - Extract lagrange multiplier from LP solution

I'm trying to solve a generic optimization problem with both inequality and equality constraints using CVXOPT's solvers.lp and GLPK. Everything works fine but i'm not able to extract the Lagrangian multipliers. This is my code: # Convert numpy…
fumagam
  • 50
  • 6
1
vote
1 answer

CVXOPT in Python fails to solve simple quadratic programming problen

I'm using CVXOPT in Python to try to solve a fairly simple quadratic programming problem. I'm finding that it works perfectly for some values of my parameters, but fails for others. Shown below is a very simple example of cvxopt.solvers.qp() failing…
1
vote
1 answer

Fast optimization of "pathological" convex function

I have a simple convex problem I am trying to speed up the solution of. I am solving the argmin (theta) of where theta and rt is Nx1. I can solve this easily with cvxpy import numpy as np from scipy.optimize import minimize import…
luffe
  • 1,588
  • 3
  • 21
  • 32
1
vote
1 answer

The integer linear programming(ILP) function in CVXOPT returns non integers

I wanted to optimize a function using ILP implementing by CVXOPT , GLPK in python. I wrote this code, but it gives me non integer solution especially 0.5. Could anyone help me? import math import numpy as np import cvxopt from cvxopt…
Panda
  • 231
  • 3
  • 17
1
vote
1 answer

How do I install CVXOPT for Python 2.7 on Windows 10?

Ultimately I am trying to install CVXPY for Python 2.7. CVXPY has a few requirements including CVXOPT. I have tried two approaches, installing from Gohlke's website, where he hosts Windows Binaries for Python Extensions:…
Doug
  • 285
  • 2
  • 13
1
vote
1 answer

GFORTRAN_1.4' not found

I make sure that gfortran is installed [idf@node1 Index]$ sudo yum install gcc-gfortran Loaded plugins: fastestmirror, langpacks Repository datastax is listed more than once in the…
Ivan
  • 7,448
  • 14
  • 69
  • 134
1
vote
0 answers

Installation of cvxopt on MAC 10.11

Before trying to install cvxopt, Xcode and the Command Line Tools for Xcode were installed. In addition, Python 2.7.11 was installed. The installation instruction for cvxopt is: python setup.py install To test if the installation was successful…
1
vote
1 answer

Import error in anaconda after updating OS to El Capitan

I updated my mac OS system to El Capitan two days ago after its release. However, since then I saw the following error when I tried to import cvxopt (which is working well previously in Yosemite OS.) This error persists even after I reinstall…
user2811603
  • 45
  • 1
  • 5
1
vote
0 answers

How to set glpk solver parameters in openopt

I'm using the openopt library to solve a multi-constraint knapsack problem (http://openopt.org/KSP). I'm using an external solver, specifically GLPK. I've installed everything correctly and I can successfully run the example script here:…
trianta2
  • 3,952
  • 5
  • 36
  • 52
1
vote
0 answers

Controlling the parameters of python cvxopt solver while performing SDP

I have a python code to solve the following simple Semidefinite Program: Input: Two Real 4 x 4 matrices, A and B Output: 1 - q where q = maximum over all p, such that: 0 < p < 1 A - p B is positive semi-definite When I view an instance of the…
Pavithran Iyer
  • 402
  • 5
  • 14
1
vote
1 answer

Lasso Generalized linear model in Python

I would like to fit a generalized linear model with negative binomial link function and L1 regularization (lasso) in python. Matlab provides the nice function : lassoglm(X,y, distr) where distr can be poisson, binomial etc. I had a look at both…
Gioelelm
  • 2,645
  • 5
  • 30
  • 49
1
vote
1 answer

CVXOPT quadratic programming interface

The provided QP solver for CVXOPT solves problems of the form ( see http://cvxopt.org/userguide/coneprog.html#quadratic-programming ): Minimize (1/2)*x.t*P*x + q.T*x Subject to G*x <= h A*x = b This works fine,…
1
vote
1 answer

Importing CVXOPT in canopy python

I want to import CVXOPT functionalities for use in the Canopy python editor. As far as I know, I have downloaded CVXOPT successfully. My reason for thinking this is that the CVXOPT site says "to test that the installation was successful, go to the…
N. Mao
  • 499
  • 1
  • 10
  • 19
1
vote
1 answer

Import issue for cvxopt on Windows

I installed cvxopt verbatim from here. On using it from the python prompt, I see the following issue: >>> import cvxopt Traceback (most recent call last): File "", line 1, in File "build\bdist.win32\egg\cvxopt\__init__.py", line…
ajmartin
  • 2,379
  • 2
  • 26
  • 42
1
vote
1 answer

CVXOpt op argument error

I am testing CVXOpt with the following model >>> from cvxopt.modeling import op >>> x = variable() >>> y = variable() >>> c1 = ( 2*x+y >> c2 = ( x+2*y >> c3 = ( x >= 0 ) >>> c4 = (y >= 0 ) >>> lp1 = op(-4*x-5*y, [c1,c2,c3,c4]) However, I get two…
inestr
  • 11
  • 3