metaheuristic_designer.benchmarks.benchmark_funcs module#
- class MaxOnes(dimension, mode='max', constraint_handler=None)[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(population_matrix)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class DiophantineEq(dimension, coeff, target, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class SleepTest(dimension, sleep_time=2, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Sphere(dimension, mode='min', constraint_handler=None)[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class HighCondElliptic(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class BentCigar(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Discus(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Rosenbrock(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Ackley(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Weierstrass(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Griewank(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Rastrigin(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class ModSchwefel(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class Katsuura(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class HappyCat(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class HGBat(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class ExpandedGriewankPlusRosenbrock(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class ExpandedShafferF6(dimension, mode='min')[source]#
Bases:
ObjectiveFunc- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class SumPowell(dimension, mode='min', lim_min=-1, lim_max=1)[source]#
Bases:
ObjectiveFuncSum of Powell function
- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
- class N4XinSheYang(dimension, mode='min', lim_min=-10, lim_max=10)[source]#
Bases:
ObjectiveFuncN4 Xin-She Yang function
- Attributes:
paramsAccess parameter values by attribute-style lookup.
Methods
__call__(population)Shorthand for executing the objective function on a vector.
add_parameter_constraints(...)Attach extra constraint handlers for extended encodings (e.g., PSO).
calculate_fitness(population)Evaluate fitness for the whole population.
get_params()Return a copy of the current parameter dictionary.
get_state()Return a dictionary with the current configuration.
objective(solution)Implementation of the objective function.
repair_population(population)Transforms an invalid vector into one that satisfies the restrictions of the problem.
restart()Reset the evaluation counter to zero.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.