optilab.functions.multimodal package

Submodules

optilab.functions.multimodal.ackley_function module

The ackley objective function

class AckleyFunction(dim: int)[source]

Bases: ObjectiveFunction

Ackley objective function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.multimodal.rastrigin_function module

The rastrigin objective function

class RastriginFunction(dim: int)[source]

Bases: ObjectiveFunction

Rastrigin objective function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.multimodal.rosenbrock_function module

The rosenbrock objective function

class RosenbrockFunction(dim: int)[source]

Bases: ObjectiveFunction

Rosenbrock objective function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

Module contents

Multimodal objective functions. They have multiple local minima.