TestIndividual Class Reference
Test a specific individual taken from evolutionary data. More...

Public Member Functions | |
TestIndividual () | |
Constructor. | |
virtual | ~TestIndividual () |
Destructor. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
Configures the object using a ConfigurationParameters object. | |
virtual void | runTest () |
Run the test on the individual selected. | |
virtual void | save (ConfigurationParameters ¶ms, 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
Constructor & Destructor Documentation
TestIndividual | ( | ) |
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] |
Member Function Documentation
void configure | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Configures the object using a ConfigurationParameters object.
- Parameters:
-
params the configuration parameters object with parameters to use prefix the 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 describe | ( | QString | type | ) | [static] |
Describe Function.
Reimplemented from AbstractTest.
Definition at line 130 of file tests.cpp.
References ParameterSettable::addTypeDescription(), ParameterSettable::Descriptor::describeInt(), ParameterSettable::Descriptor::describeString(), ParameterSettable::IntDescriptor::help(), ParameterSettable::StringDescriptor::help(), ParameterSettable::IntDescriptor::limits(), and ParameterSettable::MaxInteger.
void runTest | ( | ) | [virtual] |
Run the test on the individual selected.
Implements AbstractTest.
Definition at line 136 of file tests.cpp.
References AbstractTest::component(), EvoRobotExperiment::doAllTrialsForIndividual(), EvoRobotExperiment::endGeneration(), Evoga::getEvoRobotExperiment(), EvoRobotComponent::getGA(), Logger::info(), EvoRobotExperiment::initGeneration(), Evoga::loadGenotypes(), EvoRobotExperiment::setActivityPhase(), and EvoRobotExperiment::setNetParameters().
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:
-
params the configuration parameters object on which save actual parameters prefix the 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 | ) |
void setPopulationToTest | ( | QString | filename, |
bool | deferLoading = true |
||
) |
Replace the current population loaded into GA with population loaded from file.
- Parameters:
-
filename the file from which load the population deferLoading if 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: