_minimize_trustregion_constr(fun, x0, args, grad, hess, hessp, bounds, constraints, xtol=1e-08, gtol=1e-08, barrier_tol=1e-08, sparse_jacobian=None, callback=None, maxiter=1000, verbose=0, finite_diff_rel_step=None, initial_constr_penalty=1.0, initial_tr_radius=1.0, initial_barrier_parameter=0.1, initial_barrier_tolerance=0.1, factorization_method=None, disp=False)
Tolerance for termination by the norm of the Lagrangian gradient. The algorithm will terminate when both the infinity norm (i.e., max abs value) of the Lagrangian gradient and the constraint violation are smaller than gtol
. Default is 1e-8.
Tolerance for termination by the change of the independent variable. The algorithm will terminate when tr_radius < xtol
, where tr_radius
is the radius of the trust region used in the algorithm. Default is 1e-8.
Threshold on the barrier parameter for the algorithm termination. When inequality constraints are present, the algorithm will terminate only when the barrier parameter is less than :None:None:`barrier_tol`
. Default is 1e-8.
Determines how to represent Jacobians of the constraints. If bool, then Jacobians of all the constraints will be converted to the corresponding format. If None (default), then Jacobians won't be converted, but the algorithm can proceed only if they all have the same format.
Initial trust radius. The trust radius gives the maximum distance between solution points in consecutive iterations. It reflects the trust the algorithm puts in the local approximation of the optimization problem. For an accurate local approximation the trust-region should be large and for an approximation valid only close to the current point it should be a small one. The trust radius is automatically updated throughout the optimization process, with initial_tr_radius
being its initial value. Default is 1 (recommended in , p. 19).
Initial constraints penalty parameter. The penalty parameter is used for balancing the requirements of decreasing the objective function and satisfying the constraints. It is used for defining the merit function: merit_function(x) = fun(x) + constr_penalty * constr_norm_l2(x)
, where constr_norm_l2(x)
is the l2 norm of a vector containing all the constraints. The merit function is used for accepting or rejecting trial points and constr_penalty
weights the two conflicting goals of reducing objective function and constraints. The penalty is automatically updated throughout the optimization process, with initial_constr_penalty
being its initial value. Default is 1 (recommended in , p 19).
Initial barrier parameter and initial tolerance for the barrier subproblem. Both are used only when inequality constraints are present. For dealing with optimization problems min_x f(x)
subject to inequality constraints c(x) <= 0
the algorithm introduces slack variables, solving the problem min_(x,s) f(x) + barrier_parameter*sum(ln(s))
subject to the equality constraints c(x) + s = 0
instead of the original problem. This subproblem is solved for decreasing values of barrier_parameter
and with decreasing tolerances for the termination, starting with initial_barrier_parameter
for the barrier parameter and initial_barrier_tolerance
for the barrier tolerance. Default is 0.1 for both values (recommended in p. 19). Also note that barrier_parameter
and barrier_tolerance
are updated with the same prefactor.
Method to factorize the Jacobian of the constraints. Use None (default) for the auto selection or one of:
'NormalEquation' (requires scikit-sparse)
'AugmentedSystem'
'QRFactorization'
'SVDFactorization'
The methods 'NormalEquation' and 'AugmentedSystem' can be used only with sparse constraints. The projections required by the algorithm will be computed using, respectively, the the normal equation and the augmented system approaches explained in . 'NormalEquation' computes the Cholesky factorization of A A.T
and 'AugmentedSystem' performs the LU factorization of an augmented system. They usually provide similar results. 'AugmentedSystem' is used by default for sparse matrices.
The methods 'QRFactorization' and 'SVDFactorization' can be used only with dense constraints. They compute the required projections using, respectively, QR and SVD factorizations. The 'SVDFactorization' method can cope with Jacobian matrices with deficient row rank and will be used whenever other factorization methods fail (which may imply the conversion of sparse matrices to a dense format when required). By default, 'QRFactorization' is used for dense matrices.
Relative step size for the finite difference approximation.
Maximum number of algorithm iterations. Default is 1000.
Level of algorithm's verbosity:
If True (default), then verbose
will be set to 1 if it was 0.
All values corresponding to the constraints are ordered as they were passed to the solver. And values corresponding to :None:None:`bounds`
constraints are put after other constraints.
All numbers of function, Jacobian or Hessian evaluations correspond to numbers of actual Python function calls. It means, for example, that if a Jacobian is estimated by finite differences, then the number of Jacobian evaluations will be zero and the number of function evaluations will be incremented by all calls during the finite difference estimation.
Solution found.
Infinity norm of the Lagrangian gradient at the solution.
Maximum constraint violation at the solution.
Objective function at the solution.
Gradient of the objective function at the solution.
Gradient of the Lagrangian function at the solution.
Total number of iterations.
Number of the objective function evaluations.
Number of the objective function gradient evaluations.
Number of the objective function Hessian evaluations.
Total number of the conjugate gradient method iterations.
Optimization method used.
List of constraint values at the solution.
List of the Jacobian matrices of the constraints at the solution.
List of the Lagrange multipliers for the constraints at the solution. For an inequality constraint a positive multiplier means that the upper bound is active, a negative multiplier means that the lower bound is active and if a multiplier is zero it means the constraint is not active.
Number of constraint evaluations for each of the constraints.
Number of Jacobian matrix evaluations for each of the constraints.
Number of Hessian evaluations for each of the constraints.
Radius of the trust region at the last iteration.
Penalty parameter at the last iteration, see :None:None:`initial_constr_penalty`
.
Tolerance for the barrier subproblem at the last iteration. Only for problems with inequality constraints.
Barrier parameter at the last iteration. Only for problems with inequality constraints.
Total execution time.
Termination message.
Termination status:
Reason for CG subproblem termination at the last iteration:
Minimize a scalar function subject to constraints.
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