class iwopy.benchmarks.rosenbrock.RosenbrockObjective(iwopy.wrappers.SimpleObjective)[source]

The Rosenbrock function is defined as

f(x,y) = (a-x)^2 + b(y-x^2)^2

Recommended values for the parameters are: a = 1 b = 100

Domain: x = [-inf, inf] y = [-inf, inf]

The unconstraint Rosenbrock function has a global minima at

(x,y) = (1,1)

with a function value of

f(x,y) = 0

Public members

RosenbrockObjective(problem, pars=(1.0, 100.0), ...)[source]

Construtor

f(x, y)[source]

The Rosenbrock function f(x, y)

g(var, x, y, components=None)[source]

The derivative of the Rosenbrock function

property has_ana_derivs

Returns analyical derivatives flag

maximize()[source]

Returns flag for maximization of each component.

n_components()[source]

Returns the number of components of the function.

calc_individual(vars_int, vars_float, problem_results, ...)[source]

Calculate values for a single individual of the underlying problem.

calc_population(vars_int, vars_float, problem_results, ...)[source]

Calculate values for all individuals of a population.

ana_deriv(vars_int, vars_float, var, components=None)[source]

Calculates the analytic derivative, if possible.

initialize(verbosity=0)[source]

Initialize the object.

property component_names

The names of the components

property var_names_int

The names of the integer variables

property n_vars_int

The number of int variables

property var_names_float

The names of the float variables

property n_vars_float

The number of float variables

vardeps_int()[source]

Gets the dependencies of all components on the function int variables

vardeps_float()[source]

Gets the dependencies of all components on the function float variables

rename_vars_int(varmap)[source]

Rename integer variables.

rename_vars_float(varmap)[source]

Rename float variables.

finalize_individual(vars_int, vars_float, problem_results, ...)[source]

Finalization, given the champion data.

finalize_population(vars_int, vars_float, problem_results, ...)[source]

Finalization, given the final population data.

__str__()[source]

Get info string

property initialized

Flag for finished initialization

finalize(verbosity=0)[source]

Finalize the object.