iOpt.problems Package

GKLS

class problems.GKLS.GKLS(dimension: int, functionNumber: int = 1)[исходный код]

Базовые классы: iOpt.problem.Problem

GKLS-generator, allows to generate multi-extremal optimization problems with known properties in advance: The number of local minima, the sizes of their regions of attraction, the point of global minimum, the value of function in it, etc.

__init__(dimension: int, functionNumber: int = 1) None[исходный код]

Constructor of the GKLS generator class

Параметры
  • dimension – Task dimensionality, \(2 <= dimension <= 5\)

  • functionNumber – set task number, \(1 <= functionNumber <= 100\)

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculate the value of a function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at the point.

rastrigin

class problems.rastrigin.Rastrigin(dimension: int)[исходный код]

Базовые классы: iOpt.problem.Problem

The Rastrigin function is given by the formula:

\(f(y)=(\sum_{i=1}^{N}[x_{i}^{2}-10*cos(2\pi x_{i})])\), where \(x\in [-2.2, 1.8], N\) – problem dimensionality

__init__(dimension: int)[исходный код]

The constructor of the Rastrigin problem class

Параметры

dimension – problem dimensionality.

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculate the value of the selected function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at point.

get_name()[исходный код]

Get the name of the problem

Результат

self.name.

Grishagin

class problems.grishagin.Grishagin(function_number: int)[исходный код]

Базовые классы: iOpt.problem.Problem

The Grishagin function is given by the formula:

\(f(y) = \{ (\sum_{i=1}^{7}\sum_{i=1}^{7} A_{ij}a_{ij}(x)+B_{ij}b_{ij}(x))^{2}+\) \(+(\sum_{i=1}^{7}\sum_{i=1}^{7} C_{ij}a_{ij}(x)+D_{ij}b_{ij}(x))^{2}\}\), where \(a_{ij}(x) = sin(i\pi x_{1})sin(j\pi x_{2}),\) \(b_{ij}(x) = cos(i\pi x_{1})cos(j\pi x_{2}),\) coefficients \(A_{ij}, B_{ij}, C_{ij}, D_{ij}\) - uniformly distributed values on the segment \([-1, 1].\)

__init__(function_number: int)[исходный код]

Constructor of the Grishagin problem class

Параметры

functionNumber – the number of the task in the set, \(1 <= functionNumber <= 100\)

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculating the value of the selected function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at the point.

Hill

class problems.hill.Hill(function_number: int)[исходный код]

Базовые классы: iOpt.problem.Problem

The Hill function is a multimodal, continuous, deterministic function, given by the formula:

\(f(x)=a_{0}+\sum_{i=1}^{m}(a_{i}sin(2i\pi x)+b_{i}cos(2i\pi x))\), where \(m\) is the number of maxima of the function, \(a, b\) - parameters generated randomly. In this generator the problem is one-dimensional.

__init__(function_number: int)[исходный код]

Constructor of the Hill problem class

Параметры

functionNumber – task number in the set, \(1 <= functionNumber <= 1000\)

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculate the value of the selected function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at point.

Shekel

class problems.shekel.Shekel(function_number: int)[исходный код]

Базовые классы: iOpt.problem.Problem

The Scheckel function is a multivariate, multimodal, continuous, deterministic function, given by the formula:

\(f(x) = \sum_{i=1}^{m}(c_{i}+(x-a_{i})^{2})^{-1}\), where \(m\) – number of maxima of the function, \(a, c\) - randomly generated parameters. In this generator, the problem is one-dimensional.

__init__(function_number: int)[исходный код]

Constructor of the Shekel problem class

Параметры

functionNumber – task number in the set, \(1 <= functionNumber <= 1000\).

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculating the value of the selected function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at point.

Shekel4

class problems.shekel4.Shekel4(function_number: int)[исходный код]

Базовые классы: iOpt.problem.Problem

The Scheckel function is a multivariate, multimodal, continuous, deterministic function, given by the formula:

\(f(x) = \sum_{i=1}^{m}(c_{i}+\sum_{j=1}^{n}(x-a_{i})^{2})^{-1}\), where \(m\) – number of maxima of the function, \(a, c\) - parameters generated randomly. In the generator, the dimensionality of the problem is 4.

__init__(function_number: int)[исходный код]

Constructor of the Shekel problem class.

Параметры

functionNumber – task number in the set, \(1 <= functionNumber <= 3\)

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculating the value of the selected function at a given point

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at point.

stronginC3

xsquared

class problems.xsquared.XSquared(dimension: int)[исходный код]

Базовые классы: iOpt.problem.Problem

Criterion function \(f(x) = x^2\)

calculate(point: iOpt.trial.Point, function_value: iOpt.trial.FunctionValue) iOpt.trial.FunctionValue[исходный код]

Calculation of the criterion value

Параметры
  • point – coordinates of the trial point where the value of the function will be calculated.

  • function_value – object defining the function number in the task and storing the function value.

Результат

Calculated value of the function at point.

get_name()[исходный код]

Get the name of the problem

Результат

self.name.