-
Notifications
You must be signed in to change notification settings - Fork 0
/
Manager.h
115 lines (99 loc) · 3.4 KB
/
Manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/**
* @class Manager
*
* The Manager class is one of the most integral components of the system. It contains, instantiates,
* and mediates the communications between other system components: the Optimiser and Graphics Pipeline.
* The Manager class will also make use of threads in order to facilitate concurrent optimisation operations.
*
*
* @note Still in Progress
*
* @author Emilio Singh u14006512, Matheu Botha u14284104
*
* @version 0.1
*
* @date: 2016/07/11 12:16
*
* Contact: u14006512@tuks.co.za
*
* */
#ifndef OPT_MANAGER_H
#define OPT_MANAGER_H
#include <thread>
#include "SettingsPackage/src/settingspackage.h"
#include "GUI/Interface.h"
#include "SnapshotManager/SnapshotManager.h"
#include "OPT/GenOPT/src/SinObjective.h"
#include "OPT/GenOPT/src/SaddleObjective.h"
#include "OPT/GenOPT/src/HillClimber.h"
#include "OPT/GenOPT/src/PSO.h"
#include "OPT/GenOPT/src/CPSO.h"
#include "OPT/GenOPT/src/AlpineObjective.h"
#include "OPT/GenOPT/src/BealeObjective.h"
#include "OPT/GenOPT/src/BohachevskyObjective.h"
#include "OPT/GenOPT/src/EggHolderObjective.h"
#include "OPT/GenOPT/src/GoldSteinPriceObjective.h"
#include "OPT/GenOPT/src/GriewankObjective.h"
#include "OPT/GenOPT/src/Levy13Objective.h"
#include "OPT/GenOPT/src/Michalewicz.h"
#include "OPT/GenOPT/src/PathologicalObjective.h"
#include "OPT/GenOPT/src/QuadricObjective.h"
#include "OPT/GenOPT/src/QuarticObjective.h"
#include "OPT/GenOPT/src/RanaObjective.h"
#include "OPT/GenOPT/src/RastriginObjective.h"
#include "OPT/GenOPT/src/RosenbrockObjective.h"
#include "OPT/GenOPT/src/SalomonObjective.h"
#include "OPT/GenOPT/src/Schwefel22Objective.h"
#include "OPT/GenOPT/src/Schwefel26Objective.h"
#include "OPT/GenOPT/src/SixHumpCamelBackObjective.h"
#include "OPT/GenOPT/src/SkewRastriginObjective.h"
#include "OPT/GenOPT/src/SphericalObjective.h"
#include "OPT/GenOPT/src/StepObjective.h"
#include "OPT/GenOPT/src/WeierstrassObjective.h"
#include "OPT/GenOPT/src/ZakharovObjective.h"
#include "OPT/GenOPT/src/AckleyObjective.h"
#include "GraphicsProcessor/GraphicsProcessor.h"
class Manager {
private:
SettingsPackage* setPkg;
SnapshotManager** snapMan;
ObjectiveFunction* objective;
OPT_Process** optimizer;
std::thread* GUI_Thread;
std::thread** optThreads;
GraphicsProcessor* graphicsProcessor;
double *bounds;
static void optimizeInstance(void *, int i);
public:
///Constructor for the manager objects
Manager();
///Destructor for manager objects
virtual ~Manager();
void startGUI();
void endGUI();
void initializeOptimizer();
void optimize();
void initializeGraphicsProcessor();
void visualize();
/*
* This method creates a new snapshot manager class per request.
* */
void generateSnapshotManager();
SnapshotManager* getSnapshotManager();
bool stillRunning() { return GUI_Thread->joinable(); }
SettingsPackage* getSettingsPackage();
/*
* This method creates a new Graphics Pipeline.
* The created graphics pipeline relates directly to a specific optimiser
* and this pipeline provides graphical rendering services
* */
//GP makeGP(SettingsPackage setPackage);
/*
* This method creates a new Optimiser.
* The created graphics pipeline relates directly to a specific graphical pipline
* and this pipeline provides optimiser services.
* */
void waitForOpts();
void cleanMemory();
};
#endif //OPT_MANAGER_H