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

How to Convert Quadratic Contraint to Linear

I have this constraint in my model: (X - Y) @ B >= 0 where B is a boolean vector variable, X and Y are variables vector that represent quantities I'm working with CVXPY, so I have to keep linear expressions How could I translate this constraint in…
0
votes
0 answers

find all combinations that sum to the target in the candidate

Example data: targets = [-7.51, -0.32, -0.3, -0.9, -2.9, -1.2, -0.6, -1.2, -2.4, -0.96] candidates = [-0.32, -0.9, -0.6, -1.4, -1.5, -1.8, -1.2, -0.35, -0.96, -2.52, -0.32, -0.6, -3.84, -0.6, -0.3, -0.6, -0.48] Output example: target_list = [3, 3,…
0
votes
1 answer

Solving a Squared-root constraint in Pyomo with Gurobi

I'm using Gurobi 9.1.2 and Pyomo 6.1.2 I got a MILP model in pyomo created with pyomo.environ modeling layer. In order to advance in my research, I need to implement a new constraint to my model. This new constraint got a square-root and I want to…
0
votes
1 answer

Why can't I use Solver qpsolver anymore?

I just coded a quadratic programming and it has worked very well but after the someday it works not at all. Does anyone have any idea what the problem is? My code is: import time import numpy as np from numpy import array, dot from qpsolvers…
0
votes
1 answer

how can I use a solve cvxopt in Julia?

Hi I'm trying to use a solver cvxopt in Julia. So I made a code like this: @time begin using PyCall using Pkg ENV["PYTHON"]="" Pkg.add("CVXOPT") Pkg.test("CVXOPT") using Compat.SparseArrays using…
0
votes
2 answers

CPLEX Python- creating an objective function with quadratic term and linear term

CPLEX novice here. Sorry! I am running CPLEX, through the python API and I want to set the objective function that contains a quadratic term and a linear term ,and minimise. Example below: obj = aQ+bV where a & b are scalar constants, Q is the…
DGradeci
  • 39
  • 9
0
votes
0 answers

OSQP solver in Python

I have a question about a OSQP (Operator Splitting Quadratic Program) solver implementation: I'd like to use this to solve the quadratic problem with 10x10 matrix randomly generated. I tried the following: import osqp import numpy as np from scipy…
0
votes
0 answers

Is there a way to solve quadratic programming problems natively in OpenCV?

So, I'm trying to write an algorithm for adjusting the lighting around a camera to get the right grey levels in an image. I've measured grey levels at different lighting levels, and now I'm trying to get a relationship for grey levels across an area…
0
votes
1 answer

How to perturb datas for quadratic optimization wiht CVXPY

I have the same problem described here CVXPY Quadratic Programming; ArpackNoConvergence error. I would like to try the pertubation/trasformation solution, but i have no idea how to perform it. I have a quadratic problem like this…
Wodes
  • 1
0
votes
1 answer

Relaxation of bilinear term in objective function - using CVXR and McCormick envelopes

I have an objective function with some constraints which I want to minimize. I want to use the R package CVXR and the McCormick envelopes. Let's check the code: library(CVXR) # if necessary x <- Variable(1) y <- Variable(1) w <-…
tueftla
  • 369
  • 1
  • 3
  • 16
0
votes
0 answers

how to solve the convex optimiization?

is that anyone is good in solve this convex optimization problem where the v is the virtual reference signal and r is the reference input, at this case we can consider the r(t) as the step input. For the O_infinity is the Maximal Output Admissible…
0
votes
1 answer

How to generate constraints dynamically in scipy.optimize?

Well what I was trying to do was to model the following using scipy.optimize.minimize. What I'm trying to optimize is this function with its constraints: Here variable V is a list of variables, list's length is equal to the size of Omega. What…
0
votes
1 answer

How to apply constraint on a couple of matrix values in scipy?

I have a matrix A of size m x m and while using scipy, I need to define the inequality constraint in python for items of this matrix that verifies: . I managed to define the bounds between -1 and 1 : in python as follows: # -1 <= a[i][j] <=…
0
votes
0 answers

Usage and determination of the arguments of quadprog::solve.QP

The function of quadprog looks like that: solve.QP(Dmat, dvec, Amat, bvec, meq=0, factorized=FALSE) My objective function is: And my two constraints are: Now my aim is to determine the single arguments. 1) First argument Dmat: In the generel…
0
votes
0 answers

does CPLEX really bound the global solution of a nonconvex MIQP?

I'm using cplex to solve a nonconvex MIQP, with the optimality target set to the global solution (CPXPARAM_OptimalityTarget = 3). I'm getting drastically different solutions (.2135 vs .4197), depending on whether I use cplex v12.10 or v20.1. In both…