Click or drag to resize

ActiveSetSequentialQuadraticProgrammingOptimizer Class

An optimizer that solves OptimizerMultivariableFunctions. This uses an active set method for handling inequality constraints and a quasi-Newton method for solving quadratic subproblems. There are no special provisions for reducing memory footprint or handling sparse Hessian matrices so this class is not suitable for handing large, sparse optimization problems.
Inheritance Hierarchy

Namespace:  AGI.Foundation.NumericalMethods
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public sealed class ActiveSetSequentialQuadraticProgrammingOptimizer : SequentialQuadraticProgrammingOptimizer

The ActiveSetSequentialQuadraticProgrammingOptimizer type exposes the following members.

Constructors
  NameDescription
Public methodActiveSetSequentialQuadraticProgrammingOptimizer
Initializes a new instance. You must add at least one variable to the Variables as well as set the Function. Further, either the CostFunction must be set or at least one equality constraint must be added to the Equalities to pose a well-defined optimization problem.
Top
Properties
  NameDescription
Public propertyConvergenceFunction

Gets or sets a customizable convergence function that is used to determine if the optimizer converges on a given iteration.

By default, the cost function change from the previous to the current iteration must be within the Tolerance of the CostFunction, all of the variable changes from the previous to the current iteration must be within the VariableTolerance of the Variables, all of the equality constraints in Equalities must match their desired values within tolerance, and all of the inequality constraints in Inequalities must be satisfied.

Public propertyCostFunction
Gets or sets the cost function settings corresponding to the results computed by the Function. If there are no equality constraints set, then this property must not be for this optimizer to work.
(Inherited from ParameterOptimizer.)
Public propertyCurrentIteration
Gets or sets the number of the current iteration. This should be incremented in the FindSolution(Int32, Boolean, ITrackCalculationProgress) method.
(Inherited from ParameterOptimizer.)
Public propertyEqualities
Gets the equality constraint settings corresponding to the results computed by the Function. If the CostFunction is , there must be at least one constraint set for this optimizer to work.
(Inherited from ParameterOptimizer.)
Public propertyFunction
Gets or sets the function to solve. When the solver converges, this function must have been run with the variable values that converged. This behavior must be obeyed when Multithreaded is either or .
(Inherited from ParameterOptimizer.)
Public propertyInequalities
Gets the inequality constraint settings corresponding to the results computed by the Function.
(Inherited from ParameterOptimizer.)
Public propertyIsThreadSafe
Gets a value indicating whether the methods on this instance are safe to call from multiple threads simultaneously.
(Overrides ParameterOptimizerIsThreadSafe.)
Public propertyLastRunsResults
Gets or sets the results of the solver run. This includes such information as if the solver converged, all the iteration results (if configured to save them), if the run was aborted, etc.
(Inherited from ParameterOptimizer.)
Public propertyLineSearchSettings
Gets or sets an optional property that can be used to specify tolerances, convergence criteria, and maximum iterations for a line search that uses GoldenSectionFindExtremum to find the optimal feasible step in the same direction as the computed step.
Public propertyMultithreaded
Gets or sets a value indicating whether this optimizer should evaluate an iteration with as many threads as the current threading policy facet will allow, or with as many Variables as there are in the function plus 1; whichever is less. By default this is .
(Overrides ParameterOptimizerMultithreaded.)
Public propertyVariables
Gets the SolverVariableSettings that will be used when computing this function. The variables passed to the function will be in the same order as this list of settings. There must be at least one variable set for this solver to work.
(Inherited from ParameterOptimizer.)
Top
Methods
  NameDescription
Public methodClone
Clones this object using the specified context.
(Overrides ParameterOptimizerClone(CopyContext).)
Public methodComputeNextStep
Computes the next optimization step that this parameter optimizer should take.
(Overrides SequentialQuadraticProgrammingOptimizerComputeNextStep(Double, Matrix, ParameterOptimizerIterationResults, ITrackCalculationProgress).)
Public methodConvergenceCheck
Determines whether the optimizer converged or not.
(Overrides SequentialQuadraticProgrammingOptimizerConvergenceCheck(OptimizerMultivariableFunctionResults, OptimizerMultivariableFunctionResults).)
Public methodDispose
Releases any resources associated with this instance.
(Inherited from ParameterOptimizer.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindSolution(Int32)
Optimizes the Function. By default, the results of every iteration will be stored.
(Inherited from ParameterOptimizer.)
Public methodFindSolution(Int32, Boolean)
Optimizes the Function.
(Inherited from ParameterOptimizer.)
Public methodFindSolution(Int32, Boolean, ITrackCalculationProgress)
Optimizes the Function.
(Inherited from SequentialQuadraticProgrammingOptimizer.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReset
Resets the ParameterOptimizer by setting the LastRunsResults to and the CurrentIteration to zero. This method should be called in any derived version.
(Inherited from ParameterOptimizer.)
Public methodStatic memberSolveLagrangianDerivativeEquation
Solves for the Lagrange multipliers and derivatives of the Lagrangian using the cost function, equality errors, active inequality errors, and the gradients of each with respect to the variables.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberUpdateHessian
Uses a damped Broyden-Fletcher-Goldfarb-Shanno (BFGS) quasi-Newton update to update the Hessian matrix.
Top
See Also