IExternalNonLinearMinimizationSolverSolve Method |
Minimizes a black-box non-linear equation.
Namespace: DWSIM.InterfacesAssembly: DWSIM.Interfaces (in DWSIM.Interfaces.dll) Version: 8.8.1.0
Syntax double[] Solve(
Func<double[], double> functionbody,
Func<double[], double[]> functiongradient,
Func<double[], double, bool> iterationcallback,
double[] vars,
double[] lbounds,
double[] ubounds,
int maxits,
double tolerance
)
Function Solve (
functionbody As Func(Of Double(), Double),
functiongradient As Func(Of Double(), Double()),
iterationcallback As Func(Of Double(), Double, Boolean),
vars As Double(),
lbounds As Double(),
ubounds As Double(),
maxits As Integer,
tolerance As Double
) As Double()
Request Example
Parameters
- functionbody FuncDouble, Double
- Function which gets the current x values and returns the function value.
- functiongradient FuncDouble, Double
- Optional. Function which gets the current x values and returns the gradient values.
- iterationcallback FuncDouble, Double, Boolean
- Function called n each iteration step. First argument is the x-vector, second argument is function value. Return true to stop the iterations or false to continue.
- vars Double
- Initial value of the variables.
- lbounds Double
- Optional. Lower bounds for variables.
- ubounds Double
- Optional. Upper bounds for variables.
- maxits Int32
- Maximum iterations.
- tolerance Double
- Tolerance for solution.
Return Value
DoubleThe solution vector corresponding to the function minimum.
See Also