ParameterOptimizer Class |
Namespace: AGI.Foundation.NumericalMethods
The ParameterOptimizer type exposes the following members.
Name | Description | |
---|---|---|
ParameterOptimizer |
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.
| |
ParameterOptimizer(ParameterOptimizer, CopyContext) | Initializes a new instance as a copy of an existing instance. |
Name | Description | |
---|---|---|
CostFunction |
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.
| |
CurrentIteration |
Gets or sets the number of the current iteration. This should be incremented in
the FindSolution(Int32, Boolean, ITrackCalculationProgress) method.
| |
Equalities |
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.
| |
Function |
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 .
| |
Inequalities |
Gets the inequality constraint settings corresponding to the
results computed by the Function.
| |
IsThreadSafe |
Gets a value indicating whether the methods on this instance are safe to call from
multiple threads simultaneously.
| |
LastRunsResults |
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.
| |
Multithreaded |
Gets or sets a value indicating whether this optimizer should evaluate with as many threads as the current threading policy facet and
optimizer algorithm will allow. Note that derived types should copy this in their copy constructor.
| |
Variables |
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.
|
Name | Description | |
---|---|---|
CheckCostFunctionConvergence |
A helper method to determine if the cost function changed
by less than its Tolerance in the last iteration.
| |
CheckEqualitySatisfaction |
A helper method to determine if the equality constraints are
satisfied with the currentEqualityValues.
| |
CheckInequalitySatisfaction |
A helper method to determine if the inequality constraints are
satisfied with the currentInequalityValues.
| |
CheckVariableConvergence |
A helper method to determine if each of the variables changed
by less than their respective VariableTolerance in the last iteration.
| |
Clone |
Clones this object using the specified context.
| |
Dispose |
Releases any resources associated with this instance.
| |
Dispose(Boolean) |
Releases any resources associated with this instance.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindSolution(Int32) |
Optimizes the Function. By default, the results of every iteration will be stored.
| |
FindSolution(Int32, Boolean) |
Optimizes the Function.
| |
FindSolution(Int32, Boolean, ITrackCalculationProgress) |
Optimizes the Function.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Reset |
Resets the ParameterOptimizer by setting the LastRunsResults to
and the CurrentIteration to zero. This method should be
called in any derived version.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |