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

How can I re-write my constraints to be Positive Semi-Definite in my Optimization code?

I'm currently writing an optimization algorithm for a seating layout on a boeing 777x but using gurobi through python, but in order to do the quadratic optimization, my constraints need to be a positive semi-definite matrix (Q). How can I rewrite my…
2
votes
1 answer

Python sparse matrix in Cplex?

I am working on a large quadratic programming problem. I would like to feed in the Q matrix defining the objective function into IBM's Cplex using Python API. The Q matrix is built using scipy lil matrix because it is sparse. Ideally, I would like…
user58925
  • 1,537
  • 5
  • 19
  • 28
2
votes
0 answers

Give an initial guess to the quadratic programming solver of CGAL

I want to solve an overdetermined system of the form Ax=b and in the same time bound the x vector. For this I’ve used the quadratic programming library of CGAL, however, I wonder if there is a way to give to the solver an initial guess x0 for the…
TheCoder21
  • 51
  • 3
2
votes
2 answers

Solving quadratic optimization problems with complex constraints in R

Does anybody know how to implement regression in R where our goal is to minimize sum of squares of residuals subject to all residuals being non-negative and also with constraints on coefficients? Specifically I am asking about univariate regression…
Vivaldi
  • 138
  • 5
2
votes
5 answers

constrained linear regression / quadratic programming python

I have a dataset like this: import numpy as np a = np.array([1.2, 2.3, 4.2]) b = np.array([1, 5, 6]) c = np.array([5.4, 6.2, 1.9]) m = np.vstack([a,b,c]) y = np.array([5.3, 0.9, 5.6]) and want to fit a constrained linear regression y = b1*a +…
spore234
  • 3,550
  • 6
  • 50
  • 76
2
votes
0 answers

step size tolerance violated using fmincon

I'm trying to solve a non-linear constraint optimization problem using MatLab's fmincon function with SQP algorithm. This solver has been successfully applied on my problem, as I found out during my literature research. I know my problem's solution,…
Marc
  • 33
  • 1
  • 5
2
votes
1 answer

A numerical issue with solve.QP, the quadratic programming function in R

Let's say I have the following quadratic programming problem where the numbers are pretty big: > require(quadprog) > Q <- diag(c(34890781627, 34890781627, 34890781627, 34890781627, 34890781627)) > c <- c(133013236723, 29459621018, 31362634710,…
Bayesric
  • 329
  • 3
  • 13
2
votes
0 answers

CVXOPT requirement ignored

I'm trying to solve quadratic problem in cvxopt, but it seems that one of the requirements is ignored I want to solve this set of equations: G = [-1.00e+00 -0.00e+00 -0.00e+00 -0.00e+00] [-0.00e+00 -1.00e+00 -0.00e+00 -0.00e+00] …
asdfgh
  • 2,823
  • 4
  • 21
  • 26
2
votes
0 answers

Efficient quadratic optimization with simple linear constraint MatLab using CVX

(Sorry about formatting, I will try my best) I want to solve: x = argmin_x (Ax - p)'(Ax - p) s.t. x >= b where A is a NxH logical matrix (roughly half zeros, half ones), b is a Hx1 constant vector where every entry is the same (e.g., b =…
2
votes
2 answers

Minimizing quadratic function subject to norm inequality constraint

I am trying to solve the following inequality constraint: Given time-series data for N stocks, I am trying to construct a portfolio weight vector to minimize the variance of the returns. the objective function: min w^{T}\sum w s.t.…
2
votes
1 answer

MATLAB's quadprog is exteremely slow on my strong local machine vs another remote machine

I am using MATLAB's quadprog and it runs extremely slow on my local machine. When I run the exact code on a remote machine, it completes within 10 minutes. When I run it on my local machine, it doesn't terminates even after 24 hours (I kill it at…
Yuval Atzmon
  • 5,645
  • 3
  • 41
  • 74
2
votes
4 answers

Algorithm to minimize least squares when doing allocation?

Suppose we have to allocate x amount to k desired amounts. Is there algorithm to do this that minimizes the squared distance between the actual k allocated values and the k desired amounts? For example suppose we need to allocate x=5 to k=3 desired…
2
votes
1 answer

R: Quadratic programming/ Isotonic regression

I want to minimise the following equation: F=SUM{u 1:20}sum{w 1:10} Quw(ruw-yuw)^2 with the following constraints: yuw >= yu,w+1 yuw >= yu-1,w y20,0 = 100 y0,10 = 0 yu,10 = 0 I have a 20*10 ruw and 20*10 quw matrix, I now need to generate a yuw…
2
votes
1 answer

Constrained quadratic optimization with the quadProg library

I have a vector A of length N. Also I have N*N matrix C. I want to maximize following equation : minimize (- (w_transpose * A) + p * w_transpose * C * w) Where w is a vector of length N, with constraints that each w is non-negative and sum of all w…
exAres
  • 4,806
  • 16
  • 53
  • 95
2
votes
1 answer

weighted sum of matrices optimization

I'm beginner in optimization and welcome any guide in this field. I have 15 matrices (i.e., Di of size (n*m)) and want to find best weights (i.e., wi) for weighted averaging them and make a better matrix that is more similar to one given matrix…
1 2
3
15 16