Extreme Optimization™: Complexity made simple.

Numerical Components
for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Contact us
Introduction
Deployment Guide
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand ReferenceReference
  • Home
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Reference
    • Extreme.Mathematics Namespace
    • Extreme.Mathematics.Algorithms Namespace
    • Extreme.Mathematics.Calculus Namespace
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations Namespace
    • Extreme.Mathematics.Curves Namespace
    • Extreme.Mathematics.Curves.Nonlinear Namespace
    • Extreme.Mathematics.EquationSolvers Namespace
    • Extreme.Mathematics.Generic Namespace
    • Extreme.Mathematics.Generic.LinearAlgebra Namespace
    • Extreme.Mathematics.Generic.LinearAlgebra.Providers Namespace
    • Extreme.Mathematics.LinearAlgebra Namespace
    • Extreme.Mathematics.LinearAlgebra.Complex Namespace
    • Extreme.Mathematics.LinearAlgebra.Complex.Decompositions Namespace
    • Extreme.Mathematics.LinearAlgebra.IO Namespace
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers Namespace
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners Namespace
    • Extreme.Mathematics.LinearAlgebra.Providers Namespace
    • Extreme.Mathematics.LinearAlgebra.Sparse Namespace
    • Extreme.Mathematics.Optimization Namespace
    • Extreme.Mathematics.Optimization.LineSearches Namespace
    • Extreme.Mathematics.SignalProcessing Namespace
    • Extreme.Statistics Namespace
    • Extreme.Statistics.Distributions Namespace
    • Extreme.Statistics.IO Namespace
    • Extreme.Statistics.Multivariate Namespace
    • Extreme.Statistics.Random Namespace
    • Extreme.Statistics.Tests Namespace
    • Extreme.Statistics.TimeSeriesAnalysis Namespace
  • Extreme.Mathematics.EquationSolvers Namespace
    • BisectionSolver Class
    • DekkerBrentSolver Class
    • DoglegSystemSolver Class
    • EquationSolver Class
    • EquationSystemSolver Class
    • NewtonRaphsonSolver Class
    • NewtonRaphsonSystemSolver Class
    • RegulaFalsiSolver Class
    • RootBracketingSolver Class
  • DoglegSystemSolver Class
    • Members
    • Constructors
    • Methods
    • Properties
Collapse image Expand Image Copy image CopyHover image
         




DoglegSystemSolver Class

Members See Also 
Represents an algorithm that solves a system of nonlinear equations using Powell's dogleg method.

Namespace: Extreme.Mathematics.EquationSolvers
Assembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 4.2.11333.0 (4.2.12253.0)

Syntax

C#
                      public sealed class DoglegSystemSolver : EquationSystemSolver
Visual Basic (Declaration)
                      Public NotInheritable Class DoglegSystemSolver _
	Inherits EquationSystemSolver
Visual C++
                      public ref class DoglegSystemSolver sealed : public EquationSystemSolver
F#
[<SealedAttribute>]
type DoglegSystemSolver =  
    class
        inherit EquationSystemSolver
    end

Remarks

Use the DoglegSystemSolver class to solve a system of nonlinear equations. The class uses a variant of Powell's dogleg method to find a solution. This is the method of choice for most problems.

The target functions are set in one of two ways. The TargetFunction property is a delegate that represents a multivariate function returning a vector in its second argument. This is a function that returns a vector containing the values each target function. Alternatively, the SetTargetFunctions(array<Func<(Of <<'(Vector, Double>)>>)>[]()[][]) method can be used to provide the target functions as an array of multivariate function delegates.

Similarly, the gradients of the target functions can be set in two ways. The JacobianFunction property is a delegate that represents a multivariate function returning a matrix in its second argument that calculates the Jacobian of the system of equations. The Jacobian is a matrix whose rows are the gradients of the target functions. Alternatively, the SetGradientFunctions(array<Func<(Of <<'(Vector, Vector>)>>)>[]()[][]) method lets you supply the gradients of individual target functions as an array of either multivariate function returning a vector or multivariate function returning a vector in its second argument delegates.

The starting point for the iteration is set through the InitialGuess property. This property must be set to a valid Vector before the algorithm is run. MaxIterations sets the maximum number of iterations, while MaxEvaluations sets the maximum number of function evaluations.

The Solve(Vector) method performs the actual approximation of the root. This method returns the Vector that is best approximation that was found. The Status property indicates whether the algorithm was successful. One value to look out for is ConvergedToFalseSolution. This occurs when the algorithm converges to a local minimum of the sum of squares of the function valuies.

The algorithm has two convergence tests. By default, the algorithm terminates when either of these is satisfied. You can deactivate either test by setting its Active property to falseFalsefalsefalse (False in Visual Basic). If both tests are deactivated, then the algorithm always terminates when the maximum number of iterations or function evaluations is reached.

The first test is based on the uncertainty in the location of the approximate solution. The SolutionTest property returns a VectorConvergenceTest object that allows you to specify the desired Tolerance and specific ConvergenceCriterion. See the VectorConvergenceTest class for details on how to further customize this test.

The second test is based on the value of the target functions at the approximate solution. The ValueTest property returns a VectorConvergenceTest object that can be used to customize the test. By default, the error is set to the component with the largest absolute value.

The method uses derivative information if it is available. If the JacobianFunction property is nullNothingnullptra null reference (Nothing in Visual Basic), and no gradient functions have been supplied, then numerical derivatives are used. Special techniques are used to keep the number of numerical derivative evaluations down to a minimum. Even though the algorithm without derivatives takes less time per iteration, it usually requires significantly more iterations to find a solution. Except for very large problems, or when the evaluation of derivatives is very expensive, derivative information should be supplied.

The dogleg algorithm works by minimizing the sum of the squares of the target functions. The approximation to the solution is updated in each step by either a Newton step, a steepest descent step, or a combination of both.

This method produces excellent results in most cases. However, because the algorithm is in essence a minimizer, it is possible that the algorithm gets 'stuck' in a local minimum, and converges to a point that is not a solution of the system of equations. The Status property indicates whether an actual solution was found.

Inheritance Hierarchy

System..::..Object
  Extreme.Mathematics.Algorithms..::..ManagedIterativeAlgorithm<(Of <(<'Object>)>)>
    Extreme.Mathematics.Algorithms..::..ManagedIterativeAlgorithm
      Extreme.Mathematics.EquationSolvers..::..EquationSystemSolver
        Extreme.Mathematics.EquationSolvers..::..DoglegSystemSolver

See Also

DoglegSystemSolver Members
Extreme.Mathematics.EquationSolvers Namespace

Send comments on this topic to support@extremeoptimization.com

Copyright (c) 2004-2011 ExoAnalytics Inc.

Copyright © 2003-2013, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.