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

SLSQP optimization not converging to unique solution

I am trying simple experiment to learn scipy's SLSQP optimizer. I took the functions: def obj(x): return -1*((x[0]*x[0])+(x[1]*x[1])) It's jacobian as : def jacj(x): return [-2*x[0],-2*x[1]] It's bounds as: bounds=[(0,1),(0,1)] A simple…
0
votes
0 answers

Posing a quadrating optimization problem for CVXOPT correctly

I am trying to minimize the function || Cx - d ||_2^2 with constraints Ax <= b. Some information about their sizes is as such: * C is a (138, 22) matrix * d is a (138,) vector * A is a (138, 22) matrix * b is a (138, ) vector of zeros So I have 138…
0
votes
6 answers

Reduce time for comparing two arrays. Time Complexity

I need some advise on a better approach here. Say i've 2 arrays to compare, array1 & array2 and i need to check if values in array 1 exists in array 2, in PHP, i can use "array_diff" function which works every-time. Be default, what i think of is to…
0
votes
2 answers

mixed integer quadratic programming python in pyomo

Can i get a complete example program in pyomo for optimizing quadratic objective functions with constraints with cplex solver? or an example for mixed integer quadratic programming python in pyomo
0
votes
1 answer

CPLEX says a sum of squares is not convex

I want to solve a maximisation problem with objective f(x, y, z) = 0.5 * (x^2 + y^2 + z^2) with x, y, z in [0, 1]. However when feeding this problem to CPLEX with the code below, it prompts an error saying that my objective is non-convex. Also I…
Xb19
  • 130
  • 2
  • 10
0
votes
1 answer

What is the meaning of evaluating a spline's basis function?

I'm trying to understand the workflow for implementing the bspline basis function. tauf Vd 0 0 0.048 502.8944826 0.072 743.5034753 0.096 791.2514106 0.12 825.3244319 0.144 858.1731717 0.168 889.1381766 0.192 …
0
votes
1 answer

C++ Quadratic Equation Not Coming Out As Expected

I want to make the quadratic equation in C++ using only a,b, and c as the variables, using mostly parenthesis, but i'm not getting the correct answers. root1 = ((-1*b) + (std::sqrt((b*b) - (4*a*c)))) / 2*a; root2 = ((-1*b) - (std::sqrt((b*b) -…
0
votes
1 answer

How to reform the quadratic program objective function to fit matlab quadprog?

I have a quadratic problem question with the objective function f=arg min(A*f-b)^T*S*(A*f-b)+alpha*f^T*W*f s.t. d_low < C*f < d_up where f is the optimization variable, S and W are positive-define weight matrices. A*f-b is a matrix…
zy han
  • 3
  • 1
  • 2
0
votes
1 answer

Different versions of CVXPY generates different results.

Due to the lack of knowledge of CVXPY, I have a problem with reconciling a simple optimization problem's results when using different versions of it. When I use CVXPY with version 0.4.5 I wrote my problem as: import numpy as np from cvxpy import *…
user45668
  • 31
  • 5
0
votes
1 answer

SVM using quadprog in R

This set of exercises has the student use a QP solver to solve an SVM in R. The suggested solver is the quadprog package. The quadratic problem is given as: From the remark about the linear SVM, $K=XX'$, $K$ is a singular matrix usually, at most…
Hasse1987
  • 243
  • 1
  • 9
0
votes
0 answers

How to solve quadratic problem with logarithmic function?(In Matlab)

I want to get optimized x1, x2 from the following equation: What makes it different from typical quadratic function is the log2y, which prevents me from using quadprog in Matlab. Is there any way in solving the quadratic function with log?
0
votes
1 answer

Cplex not meeting lower bound in quadratic programming (using Python API)

I am trying to solve a quadratic programming problem with k unknowns. The problem is separable, i.e. all non-diagonals are zero in the Q matrix which defines the problem. There are some linear constraints as well. I find that Cplex gives solutions…
user58925
  • 1,537
  • 5
  • 19
  • 28
0
votes
0 answers

Matlab quadprog()

It is known that for a convex quadratic programming with box constraints if there is a local minimum, then it is the global minimum. However, when I check it in Matlab with quadprog() it does not give the global minimum. How I know this: When I use…
0
votes
0 answers

Insufficient memory while solving large quadratic programming problem using Cplex Python API

I am trying to solve a large quadratic programming problem using IBM Cplex Python API. I am running out memory while constructing the qMat matrix which defines the quadratic part of the problem on a Linux machine with 120 GB RAM. In the sample code…
user58925
  • 1,537
  • 5
  • 19
  • 28
0
votes
1 answer

Entering quadratic programming problem in algebraic mode in IBM Cplex using Python API

I would like to enter a complicated objective function in IBM's Cplex using Python API. The easiest way to do this it to enter it in Algebraic Mode. There is some instruction on page 191 of this document on how to enter objective function in…
user58925
  • 1,537
  • 5
  • 19
  • 28