Package de.labathome.trustconstr.records
Class OptimizeResult
java.lang.Object
de.labathome.trustconstr.records.OptimizeResult
Mutable output of
MinimizeTrustConstr.minimize(java.util.function.Function<de.labathome.trustconstr.matrix.Matrix, java.lang.Double>, java.util.function.Function<de.labathome.trustconstr.matrix.Matrix, de.labathome.trustconstr.matrix.Matrix>, java.util.function.Function<de.labathome.trustconstr.matrix.Matrix, de.labathome.trustconstr.matrix.Matrix>, de.labathome.trustconstr.matrix.Matrix, C, int, double, double). Mirrors
scipy's OptimizeResult: the solution, KKT-related residuals,
iteration counters, termination metadata, and constraint multipliers.-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleBarrier parameter at the last iteration.doubleTolerance for the barrier subproblem at the last iteration.intTotal number of the conjugate gradient method iterations.Reason for CG subproblem termination at the last iteration: 0 : CG subproblem not evaluated. 1 : Iteration limit was reached. 2 : Reached the trust-region boundary. 3 : Negative curvature detected. 4 : Tolerance was satisfied.Matrix[]List of constraint values at the solution.doublePenalty parameter at the last iteration, see `initial_constr_penalty`.doubleMaximum constraint violation at the solution.longTotal execution time in nanoseconds.doubleObjective function at the solution.[n] Gradient of the objective function at the solution.Matrix[]List of the Jacobian matrices of the constraints at the solution.[n] Gradient of the Lagrangian function at the solution.Termination message.Optimization method used.intTotal number of iterations.int[]Number of constraint evaluations for each of the constraints.int[]Number of Hessian evaluations for each of the constraints.int[]Number of Jacobian matrix evaluations for each of the constraints.intNumber of the objective function evaluations.intNumber of the objective function Hessian evaluations.intNumber of the objective function gradient evaluations.doubleInfinity norm of the Lagrangian gradient at the solution.int{0, 1, 2, 3}: Termination status: 0 : The maximum number of function evaluations is exceeded. 1 : `gtol` termination condition is satisfied. 2 : `xtol` termination condition is satisfied. 3 : `callback` function requested termination.booleanWhether the optimizer reports success.doubleRadius of the trust region at the last iteration.Matrix[]List of the Lagrange multipliers for the constraints at the solution.[n] Solution found. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
[n] Solution found. -
optimality
public double optimalityInfinity norm of the Lagrangian gradient at the solution. -
constraintViolation
public double constraintViolationMaximum constraint violation at the solution. -
fun
public double funObjective function at the solution. -
grad
[n] Gradient of the objective function at the solution. -
lagrangianGrad
[n] Gradient of the Lagrangian function at the solution. -
nIter
public int nIterTotal number of iterations. -
numFunctionEval
public int numFunctionEvalNumber of the objective function evaluations. -
numJacobianEval
public int numJacobianEvalNumber of the objective function gradient evaluations. -
numHessianEval
public int numHessianEvalNumber of the objective function Hessian evaluations. -
cgIter
public int cgIterTotal number of the conjugate gradient method iterations. -
method
Optimization method used. -
constr
List of constraint values at the solution. -
jac
List of the Jacobian matrices of the constraints at the solution. -
v
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. -
numConstraintEval
public int[] numConstraintEvalNumber of constraint evaluations for each of the constraints. -
numConstraintJacobianEval
public int[] numConstraintJacobianEvalNumber of Jacobian matrix evaluations for each of the constraints. -
numConstraintHessianEval
public int[] numConstraintHessianEvalNumber of Hessian evaluations for each of the constraints. -
trustRadius
public double trustRadiusRadius of the trust region at the last iteration. -
constraintPenalty
public double constraintPenaltyPenalty parameter at the last iteration, see `initial_constr_penalty`. -
barrierTolerance
public double barrierToleranceTolerance for the barrier subproblem at the last iteration. Only for problems with inequality constraints. -
barrierParameter
public double barrierParameterBarrier parameter at the last iteration. Only for problems with inequality constraints. -
executionTime
public long executionTimeTotal execution time in nanoseconds. -
message
Termination message. -
status
public int status{0, 1, 2, 3}: Termination status: 0 : The maximum number of function evaluations is exceeded. 1 : `gtol` termination condition is satisfied. 2 : `xtol` termination condition is satisfied. 3 : `callback` function requested termination. -
success
public boolean successWhether the optimizer reports success.Derived at result construction:
status== 1(gtol satisfied): alwaystrue-- gtol-termination requires the constraint violation to also be belowgtol.status== 2(xtol satisfied / trust-radius collapse):trueonly if the residual constraint violation is belowgtol-- distinguishes "converged at an active boundary" from "stuck on an infeasible problem".status== 0(maxIter exceeded) orstatus== 3(callback terminated):false.
Mirrors scipy's
OptimizeResult.successsemantics, including the behaviour exercised by scipytest_issue_18882where a degenerate constraint causes trust-radius collapse with a non-trivial constraint violation -- that outcome reportssuccess=false. -
cgStopCond
Reason for CG subproblem termination at the last iteration: 0 : CG subproblem not evaluated. 1 : Iteration limit was reached. 2 : Reached the trust-region boundary. 3 : Negative curvature detected. 4 : Tolerance was satisfied.
-
-
Constructor Details
-
OptimizeResult
public OptimizeResult()
-
-
Method Details