MutatorF#

class pybrops.opt.algo.pymoo_addon.MutatorF(setspace, phc, maxhc=None, maxhcstep=None, **kwargs)[source]#

Bases: Mutation

Perform a memetic subset exchange mutation (Mutation F).

Constructor for SubsetMutation.

Parameters:
  • setspace (numpy.ndarray) – Set space of which individuals are a discrete subset.

  • phc (float) – Probability that an individiual is hillclimbed.

  • maxhc (int) – Maximum number of solutions to test in a hillclimb. If None, then set to the number of loci in an individual’s chromosome.

  • maxhcstep (int) – Maximum number of steps (assignment of new leader solutions) to take. If None, then set to the maximum number of solutions tested.

  • kwargs (dict) – Additional keyword arguments used for cooperative inheritance.

Methods

do

get_prob_var

hillclimb

Hillclimb mutation for a single individual.

reduced_exchange

Perform a reduced exchange mutation

Attributes

setspace

Set space from which to sample elements.

__call__(problem, elem, *args, to_numpy=False, **kwargs)#

Call self as a function.

hillclimb(problem, x, *args, **kwargs)[source]#

Hillclimb mutation for a single individual.

Parameters:
  • problem (pymoo.core.problem.Problem) – Problem object.

  • x (numpy.ndarray) – Chromosome of a single individual.

Returns:

out – Chromosome of a single individual.

Return type:

numpy.ndarray

reduced_exchange(problem, x, *args, **kwargs)[source]#

Perform a reduced exchange mutation

Return type:

ndarray

property setspace: ndarray#

Set space from which to sample elements.