TrustConstr
TrustConstr is a gradient-based optimization algorithm that uses a trust-region
interior point method or an equality-constrained sequential quadratic programming (SQP)
method to solve a problem depending on whether the problem has inequality constraints or not.
It can utilize second-order derivative information in the form of the Hessian of the objective
for unconstrained problems or the Hessian of the Lagrangian for constrained problems.
TrustConstr can also use objective Hessian-vector products when the
objective Hessian is unavailable.
This solver uses the ‘trust-constr’ algorithm from the Scipy library.
To use the TrustConstr solver in modOpt, start by importing it as shown in the following code:
from modopt import TrustConstr
Options could be set by just passing them within the solver_options dictionary when
instantiating the TrustConstr optimizer object.
For example, we can set the maximum number of iterations maxiter
and the tolerance on the barrier parameter barrier_tol as shown below.
optimizer = TrustConstr(prob, solver_options={'maxiter':100, 'barrier_tol':1e-8})
The options available for the TrustConstr solver in modOpt as given in the following table.
For more information on the Scipy ‘trust-constr’ algorithm, visit
Scipy documentation.
Option |
Type |
Description |
|---|---|---|
|
int |
Maximum number of iterations. |
|
float |
Terminate successfully when both the infinity norm (max abs value) of |
|
float |
Terminate successfully when |
|
float |
When inequality constraints are present, the algorithm will terminate |
|
float |
Initial trust radius. |
|
float |
Initial constraints penalty parameter for computing the merit function. The penalty parameter is automatically updated during the optimization, |
|
float |
Initial barrier parameter for the barrier subproblem. The subproblem is solved for decreasing values of Both |
|
float |
Initial tolerance for the barrier subproblem termination. |
|
str |
Method to be used for factorizing the constraint Jacobian.
‘NormalEquation’ and ‘AugmentedSystem’ can be used only with sparse constraints. |
|
bool |
If If |
|
bool |
If |
|
int |
Verbosity of the console output. |
|
callable |
Function to be called after each iteration. |