Test a specific individual taken from evolutionary data. More...

Inheritance diagram for TestIndividual:

Public Member Functions

 TestIndividual ()
 Constructor.
 
virtual ~TestIndividual ()
 Destructor.
 
virtual void configure (ConfigurationParameters &params, QString prefix)
 Configures the object using a ConfigurationParameters object.
 
virtual void runTest ()
 Run the test on the individual selected.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
 
void setIndividualToTest (int idIndividual)
 Set id of the individual to test.
 
void setPopulationToTest (QString filename, bool deferLoading=true)
 Replace the current population loaded into GA with population loaded from file.
 
- Public Member Functions inherited from AbstractTest
 AbstractTest ()
 Constructor.
 
virtual ~AbstractTest ()
 Destructor.
 
EvoRobotComponentcomponent ()
 Returns a pointer to the Component.
 
QString iconFilename ()
 the filename of the icon to show on the menu/toolbar
 
QString menuText ()
 the text to show on the menu/toolbar
 
virtual void postConfigureInitialization ()
 This function is called after all linked objects have been configured.
 
virtual void setComponent (EvoRobotComponent *component)
 Sets the Component.
 
QString tooltip ()
 the tooltip text to show on the menu/toolbar
 
- Public Member Functions inherited from ParameterSettableWithConfigureFunction
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 ParameterSettable ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 

Static Public Member Functions

static void describe (QString type)
 Describe Function.
 
- Static Public Member Functions inherited from AbstractTest
static void describe (QString type)
 Describe Function.
 
- Static Public Member Functions inherited from ParameterSettableWithConfigureFunction
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 
- Static Public Member Functions inherited from ParameterSettable
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 

Additional Inherited Members

- Public Types inherited from ParameterSettableWithConfigureFunction
enum  Property
 
- Public Slots inherited from AbstractTest
- Public Attributes inherited from ParameterSettableWithConfigureFunction
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 
- Static Public Attributes inherited from ParameterSettableWithConfigureFunction
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 
- Protected Member Functions inherited from ParameterSettableWithConfigureFunction
void notifyChangesToParam (QString paramName)
 
- Static Protected Member Functions inherited from ParameterSettableWithConfigureFunction
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 
- Protected Attributes inherited from AbstractTest
QString m_iconFilename
 change in in subclasses for setting the icon will appear on the menu/toolbar
 
QString m_menuText
 change in in subclasses for setting the text will appear on the menu/toolbar
 
QString m_tooltip
 change in in subclasses for setting the tooltip will appear on the menu/toolbar
 

Detailed Description

Test a specific individual taken from evolutionary data.

Definition at line 78 of file tests.h.

Constructor & Destructor Documentation

Constructor.

Warning
This class must work correctly even if the configure function is not called, because it could be create without a ConfigurationParameters object when the user doesn't explicitly add this in the configuration file

Definition at line 97 of file tests.cpp.

References AbstractTest::m_iconFilename, AbstractTest::m_menuText, and AbstractTest::m_tooltip.

~TestIndividual ( )
virtual

Destructor.

Definition at line 108 of file tests.cpp.

Member Function Documentation

void configure ( ConfigurationParameters params,
QString  prefix 
)
virtual

Configures the object using a ConfigurationParameters object.

Parameters
paramsthe configuration parameters object with parameters to use
prefixthe prefix to use to access the object configuration parameters. This is guaranteed to end with the separator character when called by the factory, so you don't need to add one

Reimplemented from AbstractTest.

Definition at line 112 of file tests.cpp.

References AbstractTest::configure(), ConfigurationHelper::getInt(), ConfigurationHelper::getString(), and TestIndividual::setPopulationToTest().

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual

Save the actual status of parameters into the ConfigurationParameters object passed.

This is not implemented, a call to this function will cause an abort

Parameters
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Reimplemented from AbstractTest.

Definition at line 121 of file tests.cpp.

References ConfigurationParameters::createParameter(), AbstractTest::save(), and ConfigurationParameters::startObjectParameters().

void setIndividualToTest ( int  idIndividual)

Set id of the individual to test.

Parameters
idIndividualis the id of the individual in the current population
Note
it takes the individual from the current population loaded into GA.

Definition at line 157 of file tests.cpp.

void setPopulationToTest ( QString  filename,
bool  deferLoading = true 
)

Replace the current population loaded into GA with population loaded from file.

Parameters
filenamethe file from which load the population
deferLoadingif true (default behaviour) the loading of the population will take when the runTest() will be called, if false the loading of the population will be done immediately

Definition at line 161 of file tests.cpp.

References AbstractTest::component(), EvoRobotComponent::getGA(), Logger::info(), and Evoga::loadGenotypes().

Referenced by TestIndividual::configure().


The documentation for this class was generated from the following files: