Questions tagged [quadratic-programming]

Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

Quadratic programming (QP) is a special type of mathematical optimization problem. It is the problem of optimizing (minimizing or maximizing) a quadratic function of several variables subject to linear constraints on these variables.

237 questions
3
votes
1 answer

Minimize portfolio variance, constrained to be sufficiently similar to a benchmark portfolio

I am performing portfolio optimization, and I would like to extend the discussion here with the following: I have a vector of weights w_bench that is used as a benchmark. I would like to optimize a portfolio weight vector w_pf that…
3
votes
1 answer

Gurobi or CPLEX? Quadratic indefinite objective - quadratic positive-semidefinite constraints

I want to minimize a quadratic objective function subject to a set of linear and quadratic constraints. The quadratic objective function is indefinite (non-convex). The quadratic constraints are positive-semidefinite (convex). The variables are…
user436994
  • 601
  • 5
  • 15
3
votes
1 answer

Quadratic programme with a_ix_i^2 terms in objective function

With regards to a quadratic programme, how would I set up an objective function like min⁡ ∑a_i (x_i )^2 in the matrix form for packages “quadprog” or “limSolve” (for this package I'm not sure if it needs to be in matrix form)? From the discussion…
NeilC
  • 33
  • 2
3
votes
1 answer

Quadratic Programming CPLEX

I am trying to implement a simple quadratic program using CPLEX's Python API. The sample file qpex1 provided with CPLEX discusses this. The problem, as mentioned in qpex.lp is Maximize obj: x1 + 2 x2 + 3 x3 + [ - 33 x1 ^2 + 12 x1 * x2 - 22 x2 ^2 +…
statBeginner
  • 829
  • 2
  • 9
  • 23
3
votes
1 answer

scipy.optimize.minimize (COBYLA and SLSQP) ignores constraints initiated within for loop

I'm using scipy.optimize.minimize to solve a complex reservoir optimization model (SQSLP and COBYLA as the problem is constrained by both bounds and constraint equations). There is one decision variable per day (storage), and releases from the…
3
votes
1 answer

CGAL Quadratic Programming Package Finds Incorrect Solution

I am using CGAL QP package to solve the following quadratic problem: I am using the following MPS file to define the problem (first_qp.mps): NAME first_qp ROWS E c0 COLUMNS x0 c0 1 x1 c0 1 x2 c0 1 x3 c0 1 x4 c0 1 x5 c0 1 x6 c0 1 x7 …
2
votes
1 answer

Minimizing a simple Linear Combination

I know this is this is not a practical thing to do (this question I just so I can understand what is going on), but I am wondering why SciPy can’t minimize the following linear combination (it returns the initial weights and only does 1…
2
votes
1 answer

Extremely Sparse Integer Quadratic Programming

I am working on an optimization problem with a huge number of variables (upwards of hundreds of millions). Each of them should be a 0-1 binary variable. I can write it in the form (maximize x'Qx) where Q is positive semi-definite, and I am using…
2
votes
0 answers

Quadratic programming in Pyodide

I would like to know if there is any library, which I can use in Pyodide and which has a function, similar to "quadprog" in Matlab or multiple external libraries in Python (McGibbon's quadprog, CVXOPT etc.) doing quadratic optimization over convex…
DIgg
  • 51
  • 2
2
votes
1 answer

CVXPY returns Infeasible/Inaccurate on Quadratic Programming Optimization Problem

I am trying to use CVXPY to solve a nonnegative least squares problem (with the additional constraint that the sum of entries in the solution vector must equal 1). However, when I run CVXPY on this simple quadratic program using the SCS solver, I…
2
votes
2 answers

CVXPY Quadratic Programming; ArpackNoConvergence error

I'm trying to use the Python package CVXPY to solve a convex quadratic programming problem of the first form here: https://www.cvxpy.org/examples/basic/quadratic_program.html, using the following code x = np.variable(2 * N) prob =…
2
votes
0 answers

Quadratic programming maximization -- matrix not positive definite

I am trying to optimize the following simple objective function using the quadprog program in R: max_{x} x'Ax Most optimization problems I see use minimization, but if I simply use -A instead of A, I get an error that A is no longer positive…
2
votes
1 answer

Why am I getting this DCPError?

I'm trying to optimize a binary portfolio vector to be greater than a benchmark using CVXPY. import cvxpy as cp import numpy as np # Generate a random non-trivial quadratic program. n = 10 # number of options np.random.seed(1) mu =…
George
  • 680
  • 4
  • 16
2
votes
0 answers

R quadratic programming in high dimension

Does there exist in R an interface to a quadratic programming solver that can handle 2000+ parameters and 20000+ constraints ? I know that my constraints are not contradictory (a solution exists), but there are too many of them and rounding errors…
lrnv
  • 1,038
  • 8
  • 19
2
votes
1 answer

Setting optimalitytarget parameter in python for cplex solver pyomo

i am trying to optimize a quadratic objective function in pyomo with cplex solver and i get this CPLEX Error 5002: objective is not convex. QP with an indefinite objective can be solved to local optimality with optimality target 2, or to global…
1
2
3
15 16