src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy

Module Contents

Classes

CEC2013MMO_Numpy_Problem

CEC2013_MMO_Numpy_Problem

A base class for CEC2013 Multi-Modal Optimization (MMO) problems implemented in NumPy.

CFunction

Introduction:

The abstract class for problems with composition functions.

F1

Introduction:

The first test function: Five-Uneven-Peak Trap.

F2

Introduction:

The second test function: equal_maxima.

F3

Introduction:

The third test function: uneven_decreasing_maxima

F4

Introduction:

The 4th test function: himmelblau

F5

Introduction:

The 5th test function: six_hump_camel_back

F6

Introduction:

The 6th test function: shubert

F7

Introduction:

The 7th test function: vincent

F8

Introduction:

The 8th test function: modified_rastrigin_all

F9

Introduction:

The 9th test function: Composition function 1.

F10

Introduction:

The 10th test function: Composition function 2.

F11

Introduction:

The 11th test function: Composition function 3.

F12

Introduction:

The 12th test function: Composition function 4.

Functions

FSphere

Introduction:

Sphere function, one of basic functions for the composition function.

FRastrigin

Introduction:

Rastrigin’s function, one of basic functions for the composition function.

FGrienwank

Introduction:

Grienwank’s function, one of basic functions for the composition function.

FWeierstrass

Introduction:

Weierstrass function, one of basic functions for the composition function.

F8F2

Introduction:

Auxiliary function for FEF8F2.

FEF8F2

Introduction:

Expanded Griewank’s plus Rosenbrock’s function (EF8F2), one of basic functions for the composition function.

Data

API

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.MINMAX[source]

None

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.basic_problem.Basic_Problem

CEC2013_MMO_Numpy_Problem

A base class for CEC2013 Multi-Modal Optimization (MMO) problems implemented in NumPy.

Introduction

CEC2013 MMO benchmark puts together 20 multimodal problems (including several identical functions with different dimension sizes), with different characteristics, for evaluating niching algorithms.

Original Paper

Benchmark Functions for CEC’2013 Special Session and Competition on Niching Methods for Multimodal Function Optimization

Official Implementation

CEC2013MMO

License

Simplified BSD License

Problem Suite Composition

The CEC2013 MMO problem suite contains 20 optimization problems, each with specific characteristics such as dimensionality, bounds, and multimodal properties. These problems are categorized into different difficulty levels (easy, difficult, and all) and can be used for benchmarking optimization algorithms.

Initialization

Introduction:

Initialize the cec2013 mmo problem with the settings.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

Attributes:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • FES (int): Current number of function evaluations performed.

  • optimum (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

abstractmethod func(x)[source]

Introduction:

Abstract method to evaluate the fitness of a solution x. Must be implemented in a subclass.

Args:

  • x (np.ndarray) : A solution for evaluation.

Raises:

  • NotImplementedError: Raised when the func method is called without being implemented in a subclass.

how_many_goptima(pop, accuracy)[source]

Introduction:

Determines the number of global optima found in a given population within a specified accuracy.

Args:

  • pop (np.ndarray) : A group of solutions for the calculation of found global optima.

  • accuracy (float) : The accuracy used to determin if a solution can be regarded as a satisfied global optimum.

Returns:

  • count(int): The number of global optima found within the specified accuracy.

  • seeds (np.ndarray): The representive solutions for found global optima.

__find_seeds_indices(sorted_pop, radius)[source]

Introduction:

Identifies seed points in a sorted population based on a given radius.

Args:

  • sorted_pop (np.ndarray): A group of solutions for indentifition.

  • radius(float) : Radius used to determine whether two solutions belong to different peaks.

Returns:

  • seeds_idx (list of int) : The index of the solutions regarded as the seed of peaks.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CFunction(dim, lb, ub, fopt, rho, nopt, maxfes, nofunc)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The abstract class for problems with composition functions.

Attributes:

  • __nofunc_ (int) : The number of basic functions.

  • __C_ (float) : A predefined constant.

  • __lambda_ (np.ndarray) : A parameter used to stretch or compress each basic function.

  • __sigma_ (np.ndarray) : A parameter to control the coverage range of each basic function, with small values to produce a narrow coverage range.

  • __bias_ (np.ndarray) : Defines a function value bias for each basic function and denotes which optimum is the global optimum

  • __O_ (np.ndarray) : The new shifted optimum of each basic function.

  • __M_ (list) : The linear transformation (rotation) matrix of each basic problem.

  • __weight_ (np.ndarray) : the corresponding weight of each basic function.

  • __fi_ (np.ndarray) : The results of evaluation of basic functions.

  • __z_ (np.ndarray) : The result after shifting, ratation and stretch/compress.

  • __f_bias_ (int) : A function value bias for the constructed composition function.

  • __fmaxi_ (np.ndarray) : The maximal value of basic functions.

  • __function_ (dict) : The list of basic functions.

Initialization

Introduction:

Initialize a problem with a composition function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

  • nofunc (int): the number of basic functions

Attributes:

  • __nofunc_ (int): The number of basic functions

__nofunc_[source]

None

__C_[source]

2000.0

__lambda_[source]

None

__sigma_[source]

None

__bias_[source]

None

__O_[source]

None

__M_[source]

None

__weight_[source]

None

__fi_[source]

None

__z_[source]

None

__f_bias_[source]

0

__fmaxi_[source]

None

__tmpx_[source]

None

__function_[source]

None

abstractmethod func(x)[source]

Introduction:

Abstract method to evaluate the fitness of a solution x. Must be implemented in a subclass.

Args:

  • x (np.ndarray) : A solution for evaluation.

Raises:

  • NotImplementedError: Raised when the func method is called without being implemented in a subclass.

__evaluate_inner_(x)[source]

Introduction:

Evaluate the given solutions with the composition function.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Return:

  • np.array: The result of evaluation.

__calculate_weights(x)[source]

Introduction:

Calculate the weights of basic functions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

__calculate_fmaxi()[source]

Introduction:

Calculate the maximal values of each basic function.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

__transform_to_z_noshift(x, index)[source]

Introduction:

Transform the global optima without shfit.

Args:

  • x (np.ndarray) : A solution for evaluation.

  • index (int): the index of the corresponding basic function.

__transform_to_z(x, index)[source]

Introduction:

Transform the solution with shift, stretch/compress and rotation.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

  • index (int): The index of the corresponding basic function.

__load_rotmat(file_obj)[source]

Introduction:

Load the rotation matrix.

Args:

  • file_obj (file object) : a file handler for reading the rotation matrix information.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.FSphere(x)[source]

Introduction:

Sphere function, one of basic functions for the composition function.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.FRastrigin(x)[source]

Introduction:

Rastrigin’s function, one of basic functions for the composition function.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.FGrienwank(x)[source]

Introduction:

Grienwank’s function, one of basic functions for the composition function.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.FWeierstrass(x)[source]

Introduction:

Weierstrass function, one of basic functions for the composition function.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F8F2(x)[source]

Introduction:

Auxiliary function for FEF8F2.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.FEF8F2(x)[source]

Introduction:

Expanded Griewank’s plus Rosenbrock’s function (EF8F2), one of basic functions for the composition function.

Args:

  • x (np.ndarray) : A batch of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F1(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The first test function: Five-Uneven-Peak Trap.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F2(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The second test function: equal_maxima.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F3(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The third test function: uneven_decreasing_maxima

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F4(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The 4th test function: himmelblau

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F5(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The 5th test function: six_hump_camel_back

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F6(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The 6th test function: shubert

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F7(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The 7th test function: vincent

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F8(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CEC2013MMO_Numpy_Problem

Introduction:

The 8th test function: modified_rastrigin_all

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F9(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CFunction

Introduction:

The 9th test function: Composition function 1.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

Attibutes:

  • _CFunction__sigma_ (np.ndarray): The _sigma attribute in the father class ‘CFunction’.

  • _CFunction__bias_(np.ndarray): The _bias attribute in the father class ‘CFunction’.

  • _CFunction__weight_(np.ndarray): The _weight attribute in the father class ‘CFunction’.

  • _CFunction__lambda_(np.ndarray): The _lambda attribute in the father class ‘CFunction’.

  • _CFunction__O_(np.ndarray): The _O attribute in the father class ‘CFunction’.

  • _CFunction__M_(list): The _M attribute in the father class ‘CFunction’.

  • _CFunction__function_(dict): The _function attribute in the father class ‘CFunction’.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F10(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CFunction

Introduction:

The 10th test function: Composition function 2.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

Attibutes:

  • _CFunction__sigma_ (np.ndarray): The _sigma attribute in the father class ‘CFunction’.

  • _CFunction__bias_(np.ndarray): The _bias attribute in the father class ‘CFunction’.

  • _CFunction__weight_(np.ndarray): The _weight attribute in the father class ‘CFunction’.

  • _CFunction__lambda_(np.ndarray): The _lambda attribute in the father class ‘CFunction’.

  • _CFunction__O_(np.ndarray): The _O attribute in the father class ‘CFunction’.

  • _CFunction__M_(list): The _M attribute in the father class ‘CFunction’.

  • _CFunction__function_(dict): The _function attribute in the father class ‘CFunction’.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F11(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CFunction

Introduction:

The 11th test function: Composition function 3.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

Attibutes:

  • _CFunction__sigma_ (np.ndarray): The _sigma attribute in the father class ‘CFunction’.

  • _CFunction__bias_(np.ndarray): The _bias attribute in the father class ‘CFunction’.

  • _CFunction__weight_(np.ndarray): The _weight attribute in the father class ‘CFunction’.

  • _CFunction__lambda_(np.ndarray): The _lambda attribute in the father class ‘CFunction’.

  • _CFunction__O_(np.ndarray): The _O attribute in the father class ‘CFunction’.

  • _CFunction__M_(list): The _M attribute in the father class ‘CFunction’.

  • _CFunction__function_(dict): The _function attribute in the father class ‘CFunction’.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.

class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.F12(dim, lb, ub, fopt, rho, nopt, maxfes)[source]

Bases: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_numpy.CFunction

Introduction:

The 12th test function: Composition function 4.

Initialization

Introduction:

Initialization the test function.

Args:

  • dim (int): Dimensionality of the problem.

  • lb (float): Lower bound of the search space.

  • ub (float): Upper bound of the search space.

  • fopt (float): The optimal fitness value for the problem.

  • rho (float): Radius used to determine proximity for seed identification.

  • nopt (int): Number of global optima in the problem.

  • maxfes (int): Maximum number of function evaluations allowed.

Attibutes:

  • _CFunction__sigma_ (np.ndarray): The _sigma attribute in the father class ‘CFunction’.

  • _CFunction__bias_(np.ndarray): The _bias attribute in the father class ‘CFunction’.

  • _CFunction__weight_(np.ndarray): The _weight attribute in the father class ‘CFunction’.

  • _CFunction__lambda_(np.ndarray): The _lambda attribute in the father class ‘CFunction’.

  • _CFunction__O_(np.ndarray): The _O attribute in the father class ‘CFunction’.

  • _CFunction__M_(list): The _M attribute in the father class ‘CFunction’.

  • _CFunction__function_(dict): The _function attribute in the father class ‘CFunction’.

__str__()[source]

Returns a string representation of the object.

Returns:

  • str: The name with the dimension.

func(x)[source]

Introduction:

Evaluate the inputed solutions.

Args:

  • x (np.ndarray) : A group of solutions for evaluation.

Returns:

  • np.ndarray: The evaluation results.