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

How to implement loop in Quadratic programming using cvxpy

I want to know whether cvxpy can only implement this form of quadratic programming (just one formulation): objective = cp.Minimize(cp.sum_squares(A @ x - b)) This is the link in cvxpy to implement Mixed-integer quadratic…
happy
  • 67
  • 7
0
votes
0 answers

Converged to an infeasible point from a set of a nonlinear Equality and Inequality Constraints in matlab optimization toolbox

I am trying to minimize the objective function "tf" in my optimization model that include three inequality and two equality constraints. The objective function or (optimization varaibel "tf") is occurs in both the inequality and the equality…
0
votes
0 answers

How to convert this line of code to use the backslash operator instead of inv()?

Can anyone help me to see if it is possible to convert the following code to using the matlab backslash operator , instead of using inv() as I am doing currently: n = 6; m = 18; R = diag( rand(1,n) ); A = rand(m,n); b = rand(m,1); X = inv(R) * A' *…
0
votes
0 answers

Time complexity of CVXOPT/MOSEK when the number of constraints is much greater than the number of variables

I have a convex quadratic programming problem: min x^TPx+c^Tx Ax \leq b where P is a positive definite matrix. A is a m * n matrix and m is much greater than n, so the number of constraints is much greater than the number of variables. My question…
0
votes
0 answers

Turning QuadExpr into a callable function

For a specific optimization tool, the function that has to be optimized should be callable. However, all current functions are in the QuadExpr form. Since a QuadExpr is not callable, this raises some issues. Is there a built in function in python…
0
votes
0 answers

CVXOPT and portfolio optimization: puzzling issue

I am trying to solve the following simple optimization problem. One seeks to find the global minimum variance portfolio, being the portfolio that minimizes variance with only one constraint : weights must sum to one. Optimization program This…
0
votes
0 answers

Speeding up this PySCIPOpt routine for a Mixed Integer Program

I'm writing code to find median orders of tournaments, given a tournament T with n vertices, a median order is an ordering of the vertices of T such that it maximices the number of edges pointing in the 'increasing' direction with respect to the…
0
votes
0 answers

Estimation of unknown variables from the inequality and equality constraints

I am facing a problem in the estimation of variables from the multivariable mathematical equations. The variables (t,tf,w1,w2) that I am trying to minimize are exist in both the equality and inequality constraints. In the following equations q1 and…
0
votes
2 answers

Is there a way to raise a cplex expression (docplex.mp.LinearExpr(...)) to the power -1 or 3 in python?

I have constructed a linear programming problem in Python and use the CPLEX solver. The variables are expressed as cplex expressions like docplex.mp.LinearExpr(...). The goal is to construct an objective where we optimize over a variable with an…
0
votes
0 answers

python3.7:qpsolver.solve_qp() method get stuck

I have a QP problem in my reinforcement learning system, which calculates the safe action with the minimium distance between original action. This is the background. Here is part of my code : P =…
0
votes
0 answers

Why do I need to use the Math.floor while adding the roots of the quadratic equation in Java

While I was doing the code to pass the roots of quadratic equation using an array list, I encountered the wrong answer for the given test case 752 904 164. Its answer was -1,-1, but my answer was 0,0, so I tried searching for the solution and found…
0
votes
1 answer

Is it possible to view the constraints while using docplex?

I have a quadratic model which I wrote using docplex and when solving it says it is infeasible. When I checked to see if there are any conflicts it returned 0 so I assume there are none but I have no idea what is causing this problem. I want to be…
Anas
  • 29
  • 3
0
votes
1 answer

Unable to find the same solution on CPLEX and MATLAB for a quadratic program

I'm trying to solve the following quadratic problem with MATLAB (using quadprog function) and CPLEX. The problem is that MATLAB and CPLEX provided feasible solutions but both solutions didn't match. In fact, CPLEX claims that the obtained solution…
0
votes
0 answers

Why is my list index out of range when using scipy optimization?

I am trying to solve a quadratic program in python using scipy.optimize and keep getting a list out of range error when solving for the objective function. Below is the code linked to excel. I commented the values that are crucial for the program to…
0
votes
1 answer

CPLEX OPL, Iterative solves problem: the variable has already been set

I'm trying to solve some quadratic integer programming problem with IBM ILOG CPLEX Optimization studio. So I would like to do solve the following quadratic integer programming problem, all the parameters has been defined. float q = 0; maximize …