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

R solve.QP tracking error minimization constraints inconsistent

I am struggling with Solve.QP to get a solution to minimize tracking error. I have a benchmark consisting of 6 assets (asset_a to asset_f). For my portfolio I have upper and lower bounds (I cannot have a position in asset_f). The cov matrix is also…
0
votes
2 answers

CpxObjective for general expressions: Exception Cplex with solve quadratic model

I am trying to minimize the function a quadratic function sum(sum (w*a)-v)^2 being "a" square array and "w" and "v" two vectors. "a" and "v" are known, "w" is unknown. I am using CPLEX in Java double [][] input = {{1,2},{3,4}}; double[] result =…
0
votes
0 answers

How to solve this quadratic optimization problem in R?

I am currently trying to implement a bigger simulation exercise but i'm stuck with this bit. The aim is to find the vector p* (2x1) that maximizes this function (p* = argmax of h): Equation Also Y and q are given and all other quantities in the…
ank13
  • 1
  • 1
0
votes
0 answers

Large scale linearly-constrained convex quadratic optimization - R/Python/Gurobi

I have a series of linearly-constrained convex quadratic optimization problems that have around 100.000 variables, 1 linear constraint and 100.000 bound constraints (the same as the number of variables - the solution has to be positive). I am…
0
votes
1 answer

quadratic programming in R with more parameters (constraints) than observations

I want to run a constrained linear regression such that the coefficients are nonnegative and sum to one. Usually this can be done with quadratic programming, However, I have more parameters (constraints) than observations (p > n). How can I do…
user116514
  • 13
  • 2
0
votes
1 answer

CPLEX Error 5002: %s is not convex - Least Square Problem with binary formulation

first post on SO. I'm working on a quadratic optimization problem. I'm getting the following error: Aeq = beq = sostype =sosind = soswt = [] % for my specific problem The others paramers look like correctly define. Error using cplexmiqp CPLEX…
0
votes
0 answers

Python QP Optimizer sum of quadratic objectives

I am not sure if I should ask my question here or in maths/cross-validated webpage. I am looking for efficient optimizer in python for quadratic programming that it is in the form: minimize sum_{i=0}^n f_i(x) subject to linear constraints. Each f_i…
0
votes
0 answers

Constraints in matrix/vector form with SLSQP

Working with python, i have a quadratic program (minimize : x' M x - 2 x' b) with constraints (E x = f, G x >= h) where M,E,G are matrices, and b,f,h are vectors. This is the kind of classical quadratic program that software as OSQP handle…
lrnv
  • 1,038
  • 8
  • 19
0
votes
1 answer

What algorithm is used by cvxopt.solvers.qp for quadratic programs in python

I am trying to understand what algorithm is used by cvxopt for solving quadratic problems. I tried to look at the documentation but I couldn't find any answer there too.
Cpt. Price
  • 71
  • 2
  • 8
0
votes
1 answer

CPLEX Barrier Method Iteration Limit

I am trying to solve a nonconvex-quadratic optimization problem on CPLEX, with setting optimality target to 2. Trying with different data sets I observed that the barrier method stops at the 500th iteration. I checked the settings, it is set to a…
0
votes
0 answers

can't install Openopt in python 3

I have upgrade my pip. sudo pip install --upgrade pip And used sudo pip install openopt its say Collecting sortedcontainers Downloading…
0
votes
2 answers

How can I model a least squares optimization problem with absolute constrains?

Assume we know the values of xg, yg, a, b, m then the problem is described as follows: minimize (x - xg)2 + (y - yg)2 s. t |x - a| > m |x - b| > m Also suggest state vector. I think X = [x; y] In Which optimization technique like QP,…
0
votes
3 answers

Quadratic Programming Setting up Constraint

I am trying to set up a simple OLS model with constraints on the coefficients in R. The code below is working. However, this demonstrates y = c + a1x1 + a2x2 + a3x3 with constraint a1+a2 = 1 I would like to revise this constraint to: a1*a2 - a3…
Katy
  • 1
0
votes
2 answers

solve simple quadratic optimization in R with sum constraint

I want to solve a very simple quadratic optimization problem in R where one of the constraints is an equality constraint related to the sum of a vector. I tried to use the quadprog package but I cannot figure out how to make it work. The help…
0
votes
1 answer

Gurobi error: TypeError: int() argument must be a string, a bytes-like object or a number, not 'gurobipy.QuadExpr

I have the following formulation that I need to implement using Gurobi for optimization: See here for formula And here is the code using the Gurobi Python API: from gurobipy import * m=Model() # Create variables alphak = m.addVars(S, B, b, a,…