TestIndividual Class Reference

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

Inheritance diagram for TestIndividual:

List of all members.

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.

Static Public Member Functions

static void describe (QString type)
 Describe Function.

Detailed Description

Test a specific individual taken from evolutionary data.

Definition at line 79 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 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(), 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: