Solves a quadratic optimization problem with linear constraints.
xopt = fot_quadprogCLP(H,f,A,b) xopt = fot_quadprogCLP(H,f,A,b,Aeq,beq) xopt = fot_quadprogCLP(H,f,A,b,Aeq,beq,lb,ub) [xopt,fopt,exitflag,output,lamda] = fot_quadprogCLP( ... )
A symmetric matrix of doubles, represents coefficients of quadratic terms in the objective function.
A vector of doubles, represents coefficients of the linear terms in the objective function
A matrix of doubles, containing the coefficients of linear inequality constraints. It has size 'm x n' where 'm' is the number of linear inequality constraints, and 'n' is the number of decision variables.
A vector of doubles, related to 'A' and containing the right hand sides of the linear inequality constraints.
A matrix of doubles, containing the coefficients of linear equality constraints. It has size 'm1 x n' where 'm1' is the number of linear equality constraints, and 'n' is the number of decision variables.
A vector of doubles, related to 'Aeq' and containing the right hand sides of the linear equality constraints.
A vector of doubles, containing lower bounds of the decision variables. The default value is 0.
A vector of doubles, containing upper bounds of the decision variables. The default value is %inf.
A vector of doubles, the computed solution of the optimization problem.
A double, the value of the objective function at xopt.
The exit status. See below for details.
Total number of iterations performed by the solver.
A structure containing the statistics obtained from the solver.
A structure containing Lagrange multipliers at the solution of problem.
Search the minimum of a constrained quadratic optimization problem specified by:
The routine calls CLP for solving the quadratic problem, CLP is a library written in C++ and available from Coin-OR.
The exitflag allows to know the status of the optimization which is given back by CLP.
For more details on exitflag see the CLP documentation, go to https://coin-or.github.io/Clp/
//Example 2: //Find x in R^6 such that: Aeq= [1,-1,1,0,3,1; -1,0,-3,-4,5,6; 2,5,3,0,1,0]; beq=[1; 2; 3]; A= [0,1,0,1,2,-1; -1,0,2,1,1,0]; b = [-1; 2.5]; lb=[-1000; -10000; 0; -1000; -1000; -1000]; ub=[10000; 100; 1.5; 100; 100; 1000]; //and minimize 0.5*x'*H*x + f'*x with f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); [xopt,fopt,exitflag,output,lambda]=fot_quadprogCLP(H,f,A,b,Aeq,beq,lb,ub) | ![]() | ![]() |