SimulatedAnnealing.Solve Method |
Minimizes a function value using SA algorithm.
Namespace: DWSIM.MathOps.MathEx.OptimizationLAssembly: DWSIM.MathOps (in DWSIM.MathOps.dll) Version: 8.8.1.0
Syntaxpublic double[] Solve(
Func<double[], double> functionbody,
Func<double[], double[]> functiongradient,
double[] vars,
double[] lbounds = null,
double[] ubounds = null
)
Public Function Solve (
functionbody As Func(Of Double(), Double),
functiongradient As Func(Of Double(), Double()),
vars As Double(),
Optional lbounds As Double() = Nothing,
Optional ubounds As Double() = Nothing
) As Double()
Request Example
View SourceParameters
- functionbody Func<Double[], Double>
- f(x) where x is a vector of doubles, returns the value of the function.
- functiongradient Func<Double[], Double[]>
- Optional. g(x) where x is a vector of doubles, returns the value of the gradient of the function with respect to each variable.
- vars Double[]
- initial values for x
- lbounds Double[] (Optional)
- lower bounds for x
- ubounds Double[] (Optional)
- upper bounds for x
Return Value
Double[]vector of variables corresponding to the function's minimum value.
See Also