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)
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
.
Implementation of Algorithm 6.2 on .
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.
Operator for computing H v
.
Gradient of the quadratic objective function.
Operator for projecting x
into the null space of A.
Operator that, for a given a vector b
, compute smallest norm solution of A x + b = 0
.
Right-hand side of the constraint equation.
Trust radius to be considered. By default, uses trust_radius=inf
, which means no trust radius at all.
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).
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).
Tolerance used to interrupt the algorithm.
Maximum algorithm iterations. Where max_inter <= n-m
. By default, uses max_iter = n-m
.
Maximum infeasible (regarding box constraints) iterations the algorithm is allowed to take. By default, uses max_infeasible_iter = n-m
.
When true
, return the list of all vectors through the iterations.
Solution of the EQP problem.
Dictionary containing the following:
Solve EQP problem with projected CG method.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them