gemseo.problems.optimization.rosenbrock module#
The Rosenbrock analytic problem.
- class Rosenbrock(n_x=2, l_b=-2.0, u_b=2.0, scalar_var=False, initial_guess=None)[source]#
Bases:
OptimizationProblem
The Rosenbrock optimization problem.
\[f(x) = \sum_{i=2}^{n_x} 100(x_{i} - x_{i-1}^2)^2 + (1 - x_{i-1})^2\]with the default
DesignSpace
\([-0.2,0.2]^{n_x}\).- Parameters:
n_x (int) --
The dimension of the design space.
By default it is set to 2.
l_b (float) --
The lower bound (common value to all variables).
By default it is set to -2.0.
u_b (float) --
The upper bound (common value to all variables).
By default it is set to 2.0.
scalar_var (bool) --
If
True
, the design space will contain only scalar variables (as many as the problem dimension); ifFalse
, the design space will contain a single multidimensional variable (whose size equals the problem dimension).By default it is set to False.
initial_guess (ndarray | None) -- The initial guess for optimal solution.