Optimization.NET
Download Optimization.NET 3.5 (.NET 3.5)
The link above contains the full source code, including NUnit test files (+ VStudio 2008 project file)
of the Optimization.NET library. The lib directory contains latest version
of NUnit framework 2.5.5 that is required for the compilation and running of the NUnit tests.
Usage examples can be found in the Test folder (NUnit tests)
Rosenbrock
Implementation of the Rosenbrock algorithm of finding minimum of the n-dimensional function.
Public constructor:
public Rosenbrock(int dim, double[] initialPar, IFunction f, double step, double epsilon, int itMax)
- dim: problem dimension (number of variables in the function)
- initialPar: vector with search parameters
- f: function to minimize
- step: initial step to start minimum search
- epsilon: accuracy of the final result
- itMax: max number of iteration
function to call to execute minimum search:
public void FindMinimum()
Mimium is stored in the initalPar array
Nelder-Mead
Implementation of the Nelder-Mead algorithm of finding minimum of the n-dimensional function.
Public constructor:
public Nelder(int dim, double[] initialPar, IFunction f, double step, double epsilon, int itMax)
- dim: problem dimension (number of variables in the function)
- initialPar: vector with search parameters
- f: function to minimize
- step: initial step to start minimum search
- epsilon: accuracy of the final result
- itMax: max number of iteration
function to call to execute minimum search:
public void FindMinimum()
Mimium is stored in the initalPar array
DFP
Implementation of the Davidon - Fletcher - Powell algorithm of finding minimum of the n-dimensional function.
Public constructor:
public DFP(int dim, double[]initialPar, IGradientFunction f, double step, double epsilon, int itMax)
- dim: problem dimension (number of variables in the function)
- initialPar: vector with search parameters
- f: function to minimize - must inherit from the IGradientFunction
- step: initial step to start minimum search
- epsilon: accuracy of the final result
- itMax: max number of iteration
function to call to execute minimum search:
public void FindMinimum()
Similarly to above the mimium is stored in the initalPar array
BFGS
Implementation of the BGGS algorithm of finding minimum of the n-dimensional function. This one
should be most efficient and successfull of all.
Public constructor:
public BFGS(int dim, double[]initialPar, IGradientFunction f, double step, double epsilon, int itMax)
- dim: problem dimension (number of variables in the function)
- initialPar: vector with search parameters
- f: function to minimize - must inherit from the IGradientFunction
- step: initial step to start minimum search
- epsilon: accuracy of the final result
- itMax: max number of iteration
function to call to execute minimum search:
public void FindMinimum()
Similarly to above the mimium is stored in the initalPar array
Full NDoc documentation is here