Defines a solver based upon Nelder and Mead's simplex algorithm for minimization of functions of multiple variables.
Gets the size of the initial simplex that will be utilized by the Nelder-Mead algorithm in the event that the user does not supply a simplex geometry, or if the user supplies an invalid simplex geometry.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nelder_mead), | intent(in) | :: | this |
The nelder_mead object. |
The size of the simplex (length of an edge).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(in) | :: | this |
The equation_optimizer object. |
The maximum number of function evaluations.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(in) | :: | this |
The equation_optimizer object. |
True if the iteration status should be printed; else, false.
Gets an N-by-(N+1) matrix containing the current simplex.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nelder_mead), | intent(in) | :: | this |
The nelder_mead object. |
The N-by-(N+1) matrix containing the simplex. Each vertex of the simplex is stored as its own column of this matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(in) | :: | this |
The equation_optimizer object. |
The tolerance.
Sets the size of the initial simplex that will be utilized by the Nelder-Mead algorithm in the event that the user does not supply a simplex geometry, or if the user supplies an invalid simplex geometry.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nelder_mead), | intent(inout) | :: | this |
The nelder_mead object. |
||
| real(kind=real64), | intent(in) | :: | x |
The size of the simplex (length of an edge). |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(inout) | :: | this |
The equation_optimizer object. |
||
| integer(kind=int32), | intent(in) | :: | n |
The maximum number of function evaluations. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(inout) | :: | this |
The equation_optimizer object. |
||
| logical, | intent(in) | :: | x |
True if the iteration status should be printed; else, false. |
Sets an N-by-(N+1) matrix as the current simplex. Notice, if this matrix is different in size from the problem dimensionallity, the Nelder-Mead routine will replace it with an appropriately sized matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nelder_mead), | intent(inout) | :: | this |
The nelder_mead object. |
||
| real(kind=real64), | dimension(:,:) | :: | x |
The simplex matrix. Each column of the matrix must contain the coordinates of each vertex of the simplex. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_optimizer), | intent(inout) | :: | this |
The equation_optimizer object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance. |
Utilizes the Nelder-Mead simplex method for finding a minimum value of the specified function.
The implementation of the Nelder-Mead algorithm presented here is a slight modification of the original work of Nelder and Mead. The Numerical Recipes implementation is also quite similar. In fact, the Numerical Recipes section relating to reflection, contraction, etc. is leveraged for this implemetation.
See Also:
Nelder, John A.; R. Mead (1965). "A simplex method for function minimization". Computer Journal. 7: 308–313.
[Gao, Fuchang, Han, Lixing (2010). "Implementing the Nelder-Mead simplex algorithm with adaptive parameters."] (http://www.webpages.uidaho.edu/~fuchang/res/ANMS.pdf)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(nelder_mead), | intent(inout) | :: | this |
The nelder_mead object. |
||
| class(fcnnvar_helper), | intent(in) | :: | fcn |
The fcnnvar_helper object containing the equation to optimize. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
On input, the initial guess at the optimal point. On output, the updated optimal point estimate. |
|
| real(kind=real64), | intent(out), | optional | :: | fout |
An optional output, that if provided, returns the value of the function at x. |
|
| type(iteration_behavior), | optional | :: | ib |
An optional output, that if provided, allows the caller to obtain iteration performance statistics. |
||
| class(errors), | intent(inout), | optional, | target | :: | err |
An error handling object. |