Get_Predation_and_Fitness_Operators.py

Meow

Organisms.GA.Get_Predation_and_Fitness_Operators.check_asap3_version(self, predation_information, fitness_information)

This method is required because their seems to be subtle issues with asap3 3.12.2. Require that asap3 3.11.10 be used.

Parameters:
  • predation_information (dict.) – All the informatino about the predation operator.

  • fitness_information (dict.) – All the information about the fitness operator

Organisms.GA.Get_Predation_and_Fitness_Operators.get_fitness_operator(fitness_information, predation_operator, population, generations, no_of_cpus, print_details)

This def will set up the fitness operator to be by the genetic algorithm. This is dependent on the entry for the ‘Predation_Switch’ given in the fitness_information.

Parameters:
  • fitness_information (dict.) – All the information about the fitness operator

  • predation_information (dict.) – All the informatino about the predation operator.

  • population (Organisms.GA.Population) – The population

  • generations – The number of generations being run

  • generations – int

  • no_of_cpus (int) – The number of cpus that are to be used by your genetic algorithm run.

  • print_details (bool.) – Print information to the terminal

Returns:

The fitness operator object

Return type:

Organisms.GA.Fitness_Operators.Fitness_Operator

Organisms.GA.Get_Predation_and_Fitness_Operators.get_predation_and_fitness_operators(predation_information, fitness_information, population, generations, no_of_cpus, print_details)

This def will set up the predation and fitness operators to be by the genetic algorithm.

Parameters:
  • predation_information (dict.) – All the informatino about the predation operator.

  • fitness_information (dict.) – All the information about the fitness operator

  • population (Organisms.GA.Population) – The population

  • generations – The number of generations being run

  • generations – int

  • no_of_cpus (int) – The number of cpus that are to be used by your genetic algorithm run.

  • print_details (bool.) – Print information to the terminal

Returns:

The predation operator object and the fitness operator object

Return type:

A Organisms.GA.Predation_Operators.Predation_Operator object and a Organisms.GA.Fitness_Operators.Fitness_Operator object

Organisms.GA.Get_Predation_and_Fitness_Operators.get_predation_operator(predation_information, fitness_information, population, no_of_cpus, print_details)

This def will set up the predation operator to be by the genetic algorithm. This is dependent on the entry for the ‘Predation_Switch’ given in the predation_information.

Parameters:
  • predation_information (dict.) – All the informatino about the predation operator.

  • fitness_information (dict.) – All the information about the fitness operator

  • population (Organisms.GA.Population) – The population

  • no_of_cpus (int) – The number of cpus that are to be used by your genetic algorithm run.

  • print_details (bool.) – Print information to the terminal

Returns:

The predation operator object

Return type:

Organisms.GA.Predation_Operators.Predation_Operator