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

CVXOPT quadratic programming interface

The provided QP solver for CVXOPT solves problems of the form ( see http://cvxopt.org/userguide/coneprog.html#quadratic-programming ): Minimize (1/2)*x.t*P*x + q.T*x Subject to G*x <= h A*x = b This works fine,…
0
votes
1 answer

qpsolvers error: "SolverNotFound: solver 'cvxopt' is not in the list ['ecos', 'osqp', 'quadprog', 'scs'] of available solvers"

I am trying to use qpsolvers library to solve a quadratic program using the 'cvxopt' solver, but I keep getting the following error: SolverNotFound: solver 'cvxopt' is not in the list ['ecos', 'osqp', 'quadprog', 'scs'] of available solvers I am…
trash627
  • 1
  • 1
0
votes
0 answers

how come I got negative weights despite the no-short sales constraint in the portfolio optimization problem?

I used the CVXR library to find the weights of a minimum variance portfolio consisting of 183 assets. (1) min(w) (1/2)*((w)^T)*sigma*(w) (2) s.t. …
0
votes
1 answer

CVXPY claims matrix is not symmetric and PSD despite my matrix being symmetric and PSD

I have a quadratic program (see below) that causes an error due to my quad_form matrix being not symmetric or PSD. Why is this happening? (Note that the issue is with my matrix P below so feel free to ignore the first block of code in the…
0
votes
0 answers

How to rewrite function to satisfy CVXPY ruleset (DCP error)?

I have a quadratic program that CVXPY rejects because of DCP error. However I am certain that my formulation (see code below) satisfies the quadratic program (I'm trying to match this). I suspect it is due to how my functions are computed; Is there…
0
votes
0 answers

Sum of many CVXR problems very slow

I'm using CVXR in R to solve a convex problem. My problem is the sum of a convex expression over many matrices: (my actual expression isn't the sum of squares, but a more complicated convex expression) library(CVXR) set.seed(1) mats = array(rnorm(16…
0
votes
0 answers

Why doesn't Python's CXVOPT satisfy the constraints of my problem?

I am trying to solve a non-linear optimization problem using CXVOPT, but it is not satisfying my constraint which requires the sum of the elements of my solution vector to equal to 1. Here is the code I am using to setup the problem. import numpy as…
agentaika
  • 1
  • 1
0
votes
0 answers

Using solvers from cvxopt, problem with parameter

As stated in title, I have optimization problem with 3 assets I tried the following solution: G1 = matrix(np.concatenate((np.eye(n_assets1), -np.eye(n_assets1)), axis=0)) sol1 = solvers.qp(covariance_matrix1, -expected_return1, G1, h1, A1,…
Jaro
  • 1
0
votes
1 answer

Solving constrained least-squares problem in R with quadprog

I'm trying to solve the following optimization problem : I'm using R's quadprog library, here's my code : library(quadprog) # Objective function D <- 21 mu <- c(Si = 0.264586858634721, Ti = 0.00499189368685614, Al = 0.100673272036359, Fe…
outofthegreen
  • 352
  • 1
  • 13
0
votes
0 answers

CPLEX Error 5002: 'Quadratic_Constraint101' is not convex

I am trying to implement an euclidean distance constraint in cplex python and I am facing a problem. The constraint is ∣∣x0 − xi ∣∣ ≤ r + M (1 − ti). M=max(xlim,ylim)/2 inst.variables.add(obj=[1], lb=[0.0], ub=[M], types="C", names=[Radius])…
0
votes
0 answers

Find a 3d discrete curve optimizing a differential loss over its pairwise distances

Provided with a non-convex first-order-differentiable loss function over the pairwise distances between a large ordered list of 3d points, I would like to find the optimal coordinates for the points (pairwise loss is invariant to rotations and…
0
votes
1 answer

Quadratic optimization equation where optimization equation have summation using Gurobi

so i am trying to optimize my quadratic equation in python using gurobi library and my objective equation have summation in it. summation equation is showing error most probably because it cannot accept the variable integer and need constant…
0
votes
0 answers

How to solve this quadratic optimization problem

My problem is described in this picture(It's like a Pyramid structure): The objective function is below: In this problem, D is known, A is the object that I want to get. It is a layered structure, each block in the upper layer is divided into four…
0
votes
2 answers

Approach for a multi period scheduling quadratic optimization model in Python?

I aim to develop an optimization model in Python for the supply of substance A based on the DA electricity prices. The desired output of the model is an hourly flow planning for the next day. I have drafted the following quadratic objective…
Lewonker
  • 7
  • 3
0
votes
0 answers

Why appears ` disciplined convex programming ruleset` error when using cvxpy

When I run this using cvxpy (cost is my objective function): x = cp.Variable((4,4), integer=False) for i in range(0,4): for j in range(0,3): cost += (x[i][j] / x[i][j+1] + 5)**2 It gets error: cvxpy.error.DCPError: Problem does not…