{ } Raw JSON

bundles / scipy latest / scipy / optimize / _trustregion_constr / qp_subproblem / projected_cg

function

scipy.optimize._trustregion_constr.qp_subproblem:projected_cg

source: /scipy/optimize/_trustregion_constr/qp_subproblem.py :411

Signature

def   projected_cg ( H c Z Y b trust_radius = inf lb = None ub = None tol = None max_iter = None max_infeasible_iter = None return_all = False )

Summary

Solve EQP problem with projected CG method.

Extended Summary

Solve equality-constrained quadratic programming problem min 1/2 x.T H x + x.t c subject to A x + b = 0 and, possibly, to trust region constraints ||x|| < trust_radius and box constraints lb <= x <= ub.

Parameters

H : LinearOperator (or sparse array or ndarray), shape (n, n)

Operator for computing H v.

c : array_like, shape (n,)

Gradient of the quadratic objective function.

Z : LinearOperator (or sparse array or ndarray), shape (n, n)

Operator for projecting x into the null space of A.

Y : LinearOperator, sparse array, ndarray, shape (n, m)

Operator that, for a given a vector b, compute smallest norm solution of A x + b = 0.

b : array_like, shape (m,)

Right-hand side of the constraint equation.

trust_radius : float, optional

Trust radius to be considered. By default, uses trust_radius=inf, which means no trust radius at all.

lb : array_like, shape (n,), optional

Lower bounds to each one of the components of x. If lb[i] = -Inf the lower bound for the i-th component is just ignored (default).

ub : array_like, shape (n, ), optional

Upper bounds to each one of the components of x. If ub[i] = Inf the upper bound for the i-th component is just ignored (default).

tol : float, optional

Tolerance used to interrupt the algorithm.

max_iter : int, optional

Maximum algorithm iterations. Where max_inter <= n-m. By default, uses max_iter = n-m.

max_infeasible_iter : int, optional

Maximum infeasible (regarding box constraints) iterations the algorithm is allowed to take. By default, uses max_infeasible_iter = n-m.

return_all : bool, optional

When true, return the list of all vectors through the iterations.

Returns

x : array_like, shape (n,)

Solution of the EQP problem.

info : Dict

Dictionary containing the following:

  • niterNumber of iterations.

  • stop_cond

    stop_cond

  • allvecsList containing all intermediary vectors (optional).

  • hits_boundaryTrue if the proposed step is on the boundary of the trust region.

Notes

Implementation of Algorithm 6.2 on [1].

In the absence of spherical and box constraints, for sufficient iterations, the method returns a truly optimal result. In the presence of those constraints, the value returned is only a inexpensive approximation of the optimal value.

Aliases

  • scipy.optimize._trustregion_constr.equality_constrained_sqp.projected_cg