MutatorB#
- class pybrops.opt.algo.pymoo_addon.MutatorB(setspace, phc, nhcstep, **kwargs)[source]#
Bases:
Mutation
Randomly test nearby solutions and randomly choose one solution that exhibits extreme values for one of the objectives.
Constructor for SubsetMutation.
- Parameters:
setspace (numpy.ndarray) – Set space of which individuals are a discrete subset.
phc (float) – Probability that an individiual is hillclimbed.
nhc (int) – Number of steps to take during hillclimbing.
kwargs (dict) – Additional keyword arguments used for cooperative inheritance.
Methods
do
get_prob_var
Hillclimb mutation for a single individual.
Perform a reduced exchange mutation
Attributes
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.