Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_GP::SIG_GPFitnessFunction Class Reference

This abstract class represents the structure of the different fitnessclasses which computes the fitness of an robot controll programm. More...

#include <SIG_GPFitnessFunction.h>

Inheritance diagram for SIGEL_GP::SIG_GPFitnessFunction:

SIGEL_GP::SIG_GPSimpleFitnessFunction List of all members.

Public Methods

 SIG_GPFitnessFunction (SIGEL_Program::SIG_Program & program, SIGEL_Robot::SIG_Robot & rob, SIGEL_Environment::SIG_Environment & environment, SIGEL_Simulation::SIG_SimulationParameters & simparameter, QString name)
 The function, which creates the object of a fitnessfunction with the needed data, for the simulationrun. More...

virtual ~SIG_GPFitnessFunction ()
 The destructor of the fitnessfunction. More...

virtual double evalFitness () = 0
 This operation activates the computation of the fitnessvalue. More...


Public Attributes

QString const name
 The name of the fitnessfunction. More...


Protected Methods

bool isValid ( double value )
DL_vector normalizeRobotPosition ( DL_vector originalPosition, DL_matrix actualRobotRotation )

Protected Attributes

SIGEL_Program::SIG_Programprogram
 The individual, which conatins the robot control programm. More...

SIGEL_Robot::SIG_Robotrob
 The robot artichecture on which the robot control programm shall be executed. More...

SIGEL_Environment::SIG_Environmentenvironment
 The environment for the simulation run. More...

SIGEL_Simulation::SIG_SimulationParameterssimparameter
 The simulation parameter for the simulation run. More...


Detailed Description

This abstract class represents the structure of the different fitnessclasses which computes the fitness of an robot controll programm.

Definition at line 22 of file SIG_GPFitnessFunction.h.


Constructor & Destructor Documentation

SIGEL_GP::SIG_GPFitnessFunction::SIG_GPFitnessFunction ( SIGEL_Program::SIG_Program & pprogram,
SIGEL_Robot::SIG_Robot & prob,
SIGEL_Environment::SIG_Environment & penvironment,
SIGEL_Simulation::SIG_SimulationParameters & psimparameter,
QString pname )
 

The function, which creates the object of a fitnessfunction with the needed data, for the simulationrun.

Precondition:
The parameters has to be set, the GPFitnesstrainer takes controll about the PVM-Prozess.
Postcondition:
An object of the FitnessFunction is created and the parameters are set to the attributes.
Parameters:
ind   The individual, which contains the robot controll programm.
robot   The robot architecture of the robot, on which the robot controll programm shall be executed
environment   The environment of the simulationrun.
simparameter   Parameters for the simulationrun.

Definition at line 5 of file SIG_GPFitnessFunction.cpp.

SIGEL_GP::SIG_GPFitnessFunction::~SIG_GPFitnessFunction ( ) [virtual]
 

The destructor of the fitnessfunction.

Precondition:
The computation of the fitnessvalue is done.
Postcondition:
The object of the fitnessfunction is destructed.

Definition at line 19 of file SIG_GPFitnessFunction.cpp.


Member Function Documentation

double SIGEL_GP::SIG_GPFitnessFunction::evalFitness ( ) [pure virtual]
 

This operation activates the computation of the fitnessvalue.

It is virtual, this means that the implemantation is for every fitnessfunction different.

Precondition:
An object of the fitnessfunction is created, the needed datas are set and everything is ready to run.
Postcondition:
The fitnessvalue is computed and returned, the object of the fitness function is destructed.
Returns:
A double is returned, which represents the fitnessvalue. If an error has occured, the returnvalue of the double is -1.

Reimplemented in SIGEL_GP::SIG_GPSimpleFitnessFunction.

bool SIGEL_GP::SIG_GPFitnessFunction::isValid ( double value ) [protected]
 

Definition at line 21 of file SIG_GPFitnessFunction.cpp.

DL_vector SIGEL_GP::SIG_GPFitnessFunction::normalizeRobotPosition ( DL_vector originalPosition,
DL_matrix actualRobotRotation ) [protected]
 

Definition at line 26 of file SIG_GPFitnessFunction.cpp.


Member Data Documentation

SIGEL_Environment::SIG_Environment & SIGEL_GP::SIG_GPFitnessFunction::environment [protected]
 

The environment for the simulation run.

Definition at line 43 of file SIG_GPFitnessFunction.h.

QString const SIGEL_GP::SIG_GPFitnessFunction::name
 

The name of the fitnessfunction.

Definition at line 57 of file SIG_GPFitnessFunction.h.

SIGEL_Program::SIG_Program & SIGEL_GP::SIG_GPFitnessFunction::program [protected]
 

The individual, which conatins the robot control programm.

Definition at line 29 of file SIG_GPFitnessFunction.h.

SIGEL_Robot::SIG_Robot & SIGEL_GP::SIG_GPFitnessFunction::rob [protected]
 

The robot artichecture on which the robot control programm shall be executed.

Definition at line 36 of file SIG_GPFitnessFunction.h.

SIGEL_Simulation::SIG_SimulationParameters & SIGEL_GP::SIG_GPFitnessFunction::simparameter [protected]
 

The simulation parameter for the simulation run.

Definition at line 50 of file SIG_GPFitnessFunction.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:43 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000