gemseo / problems / analytical

rosenbrock module

The Rosenbrock analytic problem

class gemseo.problems.analytical.rosenbrock.RosenMF(dimension=2)[source]

Bases: gemseo.core.discipline.MDODiscipline

RosenMF, a multi-fidelity Rosenbrock MDODiscipline, returns the value:

\[\mathrm{fidelity} * \mathrm{Rosenbrock}(x)\]

where both \(\mathrm{fidelity}\) and \(x\) are provided as input data.

The constructor defines the default inputs of the MDODiscipline, namely the default design parameter values and the fidelity.


dimension (int) – problem dimension

class gemseo.problems.analytical.rosenbrock.Rosenbrock(n_x=2, l_b=- 2.0, u_b=2.0, scalar_var=False, initial_guess=None)[source]

Bases: gemseo.algos.opt_problem.OptimizationProblem

Rosenbrock OptimizationProblem uses the Rosenbrock objective function

\[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}\).

The constructor initializes the Rosenbrock OptimizationProblem by defining the DesignSpace and the objective function.

  • n_x (int) – problem dimension

  • l_b (float) – lower bound (common value to all variables)

  • u_b (float) – upper bound (common value to all variables)

  • scalar_var (bool) – if True the design space will contain only scalar variables (as many as the problem dimension); if False the design space will contain a single multidimensional variable (whose size equals the problem dimension)

  • initial_guess (numpy array) – initial guess for optimal solution


Return the theoretical optimal value.


design variables values of optimized values, function value at optimum

Return type

numpy array