Package adams.opt.optimise
Class RandomOptimiser
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.opt.optimise.AbstractOptimiser
-
- adams.opt.optimise.RandomOptimiser
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,Randomizable
,SizeOfHandler
,Serializable
,Comparable
public class RandomOptimiser extends AbstractOptimiser implements Randomizable
Generate random parameter values.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-iterations <int> (property: iterations) The number of iterations to use. default: 1000
-seed <long> (property: seed) The seed value for the random number generator. default: 1
- Version:
- $Revision$
- Author:
- dale
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Iterations
number of iterations.protected long
m_Seed
the seed value.-
Fields inherited from class adams.opt.optimise.AbstractOptimiser
m_bestf, m_bestv
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RandomOptimiser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.int
getIterations()
Gets the iterations use.long
getSeed()
Returns the seed value.String
globalInfo()
Returns a string describing the object.String
iterationsTipText()
Returns the tip text for this property.OptData
optimise(OptData datadef, FitnessFunction fitness)
Do the optimisation.String
seedTipText()
Returns the tip text for this property.void
setIterations(int value)
Sets the iterations to use.void
setSeed(long value)
Sets the seed value.-
Methods inherited from class adams.opt.optimise.AbstractOptimiser
checkBest, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getOptimisers, initialize, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setIterations
public void setIterations(int value)
Sets the iterations to use.- Parameters:
value
- the iterations.
-
getIterations
public int getIterations()
Gets the iterations use.- Returns:
- the iterations
-
iterationsTipText
public String iterationsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSeed
public void setSeed(long value)
Sets the seed value.- Specified by:
setSeed
in interfaceRandomizable
- Parameters:
value
- the seed
-
getSeed
public long getSeed()
Returns the seed value.- Specified by:
getSeed
in interfaceRandomizable
- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipText
in interfaceRandomizable
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
optimise
public OptData optimise(OptData datadef, FitnessFunction fitness)
Do the optimisation.- Specified by:
optimise
in classAbstractOptimiser
- Parameters:
datadef
- data initialisations.fitness
- fitness function.- Returns:
- best vars
-
-