public class NelderMeadEx2 extends Object
Solves a constrained optimization problem using a direct search complex method.
The constrained problem $$ \min f(x_1,x_2) = 100.0(x_2-x_1^2)^2 + (1.0-x_1)^2 \\ \text{subject to} \quad \begin{array}{l} -2 \le x_1 \le 0.5 \\ -1 \le x_2 \le 2 \end{array} $$ is solved with an initial guess \((-1.2,1.0)\) and the solution is printed. The analytical solution is \((x_1,x_2) = (0.5,0.25)\) with optimum value \(0.25\).
Constructor and Description |
---|
NelderMeadEx2() |
public static void main(String[] args)
Copyright © 2020 Rogue Wave Software. All rights reserved.