OptiGenAlg (class)

File generated according to Generator/ClassesRef/Optimization/OptiGenAlg.csv WARNING! All changes made in this file will be lost!

class OptiGenAlg(multi_output=-1, selector=None, crossover=None, mutator=None, p_cross=0.9, p_mutate=0.1, size_pop=40, nb_gen=100, problem=-1, logger_name='Pyleecan.OptiGenAlg', init_dict=None)[source]

Bases: pyleecan.Classes._frozen.FrozenClass

Genetic algorithm class

VERSION = 1
save(save_path='')

Save the object to the save_path

Parameters:
  • self – A pyleecan object
  • save_path (str) – path to the folder to save the object
get_logger()

Get the object logger or its parent’s one

Parameters:obj – A pyleecan object
Returns:logger – Pyleecan object dedicated logger
Return type:logging.Logger
as_dict()[source]

Convert this objet in a json seriable dict (can be use in __init__)

multi_output

Optimization results containing every output

selector

Selector of the genetic algorithm

crossover

Crossover of the genetic algorithm

mutator

Mutator of the genetic algorithm

p_cross

Probability of crossover

p_mutate

Probability of mutation

size_pop

Size of the population

nb_gen

Number of generations

problem

Problem to solve

logger_name

Name of the logger to use