00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef EVOROBOTCOMPONENT_H
00024 #define EVOROBOTCOMPONENT_H
00025
00026 #include "component.h"
00027 #include "evoga.h"
00028 #include "workerthread.h"
00029 #include "baseexception.h"
00030 #include <QMutex>
00031
00032 namespace farsa {
00033
00039 class FARSA_EXPERIMENTS_API EvoRobotComponent : public Component {
00040 Q_OBJECT
00041 public:
00043 EvoRobotComponent();
00045 ~EvoRobotComponent();
00047 ComponentUI* getUIManager();
00049 virtual void configure(farsa::ConfigurationParameters& params, QString prefix);
00051 virtual void save(farsa::ConfigurationParameters& params, QString prefix);
00053 virtual void postConfigureInitialization();
00055 static void describe( QString type );
00057 Evoga* getGA();
00058 public slots:
00060 void stop();
00062 void evolve();
00064 void runTest();
00066 void runTestFromQAction();
00069 void exceptionDuringOperation(BaseException *e);
00073 void onThreadOperationDone( QString message );
00074 signals:
00076 void actionFinished();
00077 private:
00079 Evoga* ga;
00081 WorkerThread* gaThread;
00083 bool batchRunning;
00085 bool runningOperation;
00087 QMutex mutex;
00089 QString currentTestName;
00090 };
00091
00092 }
00093
00094 #endif