Click or drag to resize

NewtonRaphsonMultivariableFunctionSolver Class

A differential corrector for solving SolvableMultivariableFunctions. This uses the Newton-Raphson method for solving a function with multiple variables.
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 class NewtonRaphsonMultivariableFunctionSolver : MultivariableFunctionDifferentialSolver

The NewtonRaphsonMultivariableFunctionSolver type exposes the following members.

Constructors
  NameDescription
Public methodNewtonRaphsonMultivariableFunctionSolver
Initializes a new instance. You must add at least one variable to the Variables and one constraint to the Constraints, as well as set the Function.
Protected methodNewtonRaphsonMultivariableFunctionSolver(NewtonRaphsonMultivariableFunctionSolver, CopyContext)
Initializes a new instance as a copy of an existing instance.
Top
Properties
  NameDescription
Public propertyConstraints
Gets the constraint settings corresponding to the results computed by the Function. There must be at least one constraint set for this solver to work.
(Inherited from MultivariableFunctionSolver.)
Public propertyCurrentIteration
Gets or sets the number of the current iteration. This should be incremented in the FindSolution(Int32, Boolean, ITrackCalculationProgress) method.
(Inherited from MultivariableFunctionSolver.)
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 MultivariableFunctionSolver.)
Public propertyIsThreadSafe
Gets a value indicating whether the methods on this instance are safe to call from multiple threads simultaneously.
(Overrides MultivariableFunctionSolverIsThreadSafe.)
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 MultivariableFunctionSolver.)
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 is used to find the optimal feasible step in the same direction as the computed step. The cost function that is minimized for the line search is the square root of the sum of the squares of the weighted and scaled constraint errors.

GoldenSectionFindExtremum is used to find the minimum of the cost function along the direction of the computed step.

(Inherited from MultivariableFunctionDifferentialSolver.)
Public propertyMultithreaded
Gets or sets a value indicating whether this solver 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 MultivariableFunctionSolverMultithreaded.)
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 MultivariableFunctionSolver.)
Top
Methods
  NameDescription
Public methodClone
Clones this object using the specified context.
(Overrides MultivariableFunctionSolverClone(CopyContext).)
Public methodComputeNextStep
Computes the next differential step that this differential corrector should take.
(Overrides MultivariableFunctionDifferentialSolverComputeNextStep(Double, ITrackCalculationProgress).)
Public methodDispose
Releases any resources associated with this instance.
(Inherited from MultivariableFunctionSolver.)
Protected methodDispose(Boolean)
Releases any resources associated with this instance.
(Inherited from MultivariableFunctionSolver.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindSolution(Int32)
Solves the Function. By default, the results of every iteration will be stored.
(Inherited from MultivariableFunctionSolver.)
Public methodFindSolution(Int32, Boolean)
Solves the function.
(Inherited from MultivariableFunctionSolver.)
Public methodFindSolution(Int32, Boolean, ITrackCalculationProgress)
Solves the function. This method must increment CurrentIteration as well as set LastRunsResults before this method returns.
(Inherited from MultivariableFunctionDifferentialSolver.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Resets the MultivariableFunctionSolver by setting the LastRunsResults to and the CurrentIteration to zero. This method should be called in any derived version.
(Inherited from MultivariableFunctionSolver.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
See the Multivariable Function Solvers topic for more detail on how to use function solvers.
See Also