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

cvxopt.glpk.ilp Documentation

I've seen that CVXOPT supports GLPK and one can do: from cvxopt.glpk import ilp However, I cannot find the documentation for the glpk module in cvxopt's documentation. I am trying to solve an integer program and I want to understand the ilp…
s5s
  • 11,159
  • 21
  • 74
  • 121
1
vote
0 answers

Maximize Optimization using CVXOPT vs Scipy

I have a code that use CVXOPT to minimize an objective function. At the same time I would like to adapt the code I have so that rather than minimize the function will maximize it. I know this would be possible using Scipy. In Scipy to maximize the…
Marco_sbt
  • 309
  • 1
  • 12
1
vote
1 answer

Min trade size using CVXOPT - get rid of negligible weights

I have used CVXOPT to run an optimisation problem. Although I like result I am trying to get rid of negligible weights from the optimal solution but I also would like to have the sum of w=1. How can I constraint the optimiser for an allowed min…
Marco_sbt
  • 309
  • 1
  • 12
1
vote
2 answers

How to perform operations on cvxopt-matrices a la numpy?

I am working with cvxopt matrices in order to use them in picos library. In general I want to take a matrix, evaluate it on a certain vector, subtract something, then take the biggest absolute value of its entries import picos as pic import cvxopt…
Tomasz Kania
  • 231
  • 2
  • 10
1
vote
0 answers

Market Neutral Optimisation using CVXPY

I have a model that generates alphas and sigma for a set of stocks. Have coded a long-only optimisation using CVXOPT by passing the function sol=solvers.qp(Q, p, G, h, A, b) Now I would like to add two further optimisation problem to the script I…
Marco_sbt
  • 309
  • 1
  • 12
1
vote
1 answer

cvxopt uses just one core, need to run on all / some

I call cvxopt.glpk.ilp in Python 3.6.6, cvxopt==1.2.3 for a boolean optimization problem with about 500k boolean variables. It is solved in 1.5 hours, but it seems to run on just one core! How can I make it run on all or a specific set of cores? The…
Jantar88
  • 137
  • 8
1
vote
2 answers

How to solve minimax optimization problem in python?

Following minimax problem transformation instruction, I define the problem as below: min z s.t. z >= f_i(x) My question is, in cvxopt, if I declare z as variable, what is the efficient way to build the constraints list? I was try to build a…
Liu Yong
  • 515
  • 5
  • 16
1
vote
1 answer

How can I use a CVX variable in a Numpy product that is to be Minimized?

I'm trying to optimize a configuration X (boolean), such that the total price : base_price + discount, on a configuration is minimized, but the problem formulation gives a Matmul error since x is a cvxpy Variable and thus doesn't conform to the…
user6714507
  • 63
  • 1
  • 9
1
vote
1 answer

The environment is inconsistent, please check the package plan carefully - cvxopt

I have tried to install cvxopt for macOS Sierra 10.12.6 . Than I have tried to solve this problem by all the tips of The environment is inconsistent, please check the package plan carefully but non of them worked and gave similar error messages like…
sogu
  • 2,738
  • 5
  • 31
  • 90
1
vote
1 answer

Using CVXOPT to run mean variance optimisation

I see this question has been asked abc 4 years ago, but I still struggled with the answer, so reposting it. The codes are pasted below if say hypothetically I was to make sure that asset 1 range is between 20% and 40% and asset 2 range is <30%, and…
TRex
  • 445
  • 5
  • 14
1
vote
2 answers

Installing Python package will download, install, and remove other packages

I want to install cvxopt in Anaconda Python. Here's the version of my software: $ python --version Python 3.6.5 :: Anaconda, Inc. $ conda --version conda 4.5.11 $ anaconda --version anaconda Command line client (version 1.6.14) I try to install by…
ToniAz
  • 430
  • 1
  • 6
  • 24
1
vote
1 answer

How to solve the following LP/QP problem using Pulp?

from pulp import * import pandas as pd import numpy as np pd.read_excel('Example.xlsx', encoding='latin-1') prob = pulp.LpProblem('Performance', pulp.LpMaximize) #### Create Decision Variables: decision_variables = [] for rownum, row in…
Nitish Gaddam
  • 101
  • 1
  • 11
1
vote
2 answers

How to install cvxopt without downgrading mkl and python

Environment: OS = Windows 10, Python ver = 3.7.0, mkl ver = 2019.0-118, conda ver = 4.5.12. All up to date as of now (2019/1/13). Issue: When attempting conda install cvxopt, it prompts at the end: The following packages will be DOWNGRADED: …
Vim
  • 1,436
  • 2
  • 19
  • 32
1
vote
1 answer

How to find the number of iterations in solving an ILP using cvxopt.glpk?

I want to know how many iterations were required to reach the optimal solution for an ILP using cvxopt.glpk. Here is my abridged code below: from cvxopt.glpk import ilp import cvxopt Provided that I have defined all the input parameters, this is…
1
vote
0 answers

CVXOPT QP: ignores constraint

I'm trying to solve a QP problem using cvxopt. There are two constraints 0<=y<=b wy=0 So I define p=np.diag(-np.ones(len(myset)) p1=np.diag(np.ones(len(myset))) dd=np.concatenate((p,p1),axis=0) which are two identity matrix, which allow me to…
donatella
  • 11
  • 2