rmooControl | R Documentation |
Default settings for non-dominated genetic operators used in the 'rmoo' package.
rmooControl(...)
... |
no arguments, a single character vector, or a named list with components. |
If the function is called with no arguments returns the current default settings, i.e., a list with the following default components:
"binary"
population
= "rmoobin_Population"
selection
= "rmoobin_tourSelection"
crossover
= "rmoobin_spCrossover"
mutation
= "rmoobin_raMutation"
"real-valued"
population
= "rmooreal_Population"
selection
= "rmooreal_tourSelection"
crossover
= "rmooreal_sbxCrossover"
mutation
= "rmooreal_polMutation"
"permutation"
population
= "rmooperm_Population"
selection
= "rmooperm_tourSelection"
crossover
= "rmooperm_oxCrossover"
mutation
= "rmooperm_simMutation"
"discrete"
population
= "rmooint_Population"
selection
= "rmooint_tourSelection"
crossover
= "rmooint_uxCrossover"
mutation
= "rmooint_uxMutation"
"eps"
= the tolerance value used by the package functions. By default set at sqrt(.Machine$double.eps)
.
The function may be called with a single string specifying the name of the component. In this case the function returns the current default settings.
To change the default values, a named component must be followed by a single value (in case of "eps"
) or a list of component(s) specifying the name of the function for a genetic operator. See the Examples section.
If the argument list is empty the function returns the current list of values. If the argument list is not empty, the returned list is invisible.
The parameter values set via a call to this function will remain in effect for the rest of the session, affecting the subsequent behaviour of the functions for which the given parameters are relevant.
Francisco Benitez
Scrucca, L. (2017) On some extensions to 'GA' package: hybrid optimisation, parallelisation and islands evolution. The R Journal, 9/1, 187-206, doi: 10.32614/RJ-2017-008.
nsga2()
,
rnsga2()
and
nsga3()
# get and save defaults
defaultControl <- rmooControl()
print(defaultControl)
# get current defaults only for real-valued search
rmooControl("real-valued")
# set defaults for selection operator of real-valued search
rmooControl("real-valued" = list(selection = "rmooreal_lrSelection"))
rmooControl("real-valued")
# set defaults for selection and crossover operators of real-valued search
rmooControl("real-valued" = list(selection = "rmooreal_lrSelection",
crossover = "rmooreal_spCrossover"))
rmooControl("real-valued")
# restore defaults
rmooControl(defaultControl)
rmooControl()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.