-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyAlgorithm.h
More file actions
37 lines (30 loc) · 815 Bytes
/
myAlgorithm.h
File metadata and controls
37 lines (30 loc) · 815 Bytes
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
#pragma once
#ifndef _MYALGO_OPT_
#define _MYALGO_OPT_
#include "OptUHA.h"
class myAlgorithm : OptUHA
{
protected:
// déclarer les paramètres de votre algorithme ici
int NB_ABEILLES_EMPLOYE = pop_size / 2;
int NB_ABEILLES_SPECTATEUR = pop_size / 2;
int NB_FOOD_SOURCE = pop_size / 2;
int LIMIT_TRIAL = NB_ABEILLES_EMPLOYE * dimension;
vector<FoodSource> d_population;
vector<double> d_probabilite;
FoodSource d_bestFS;
public:
double solve();
myAlgorithm();
~myAlgorithm() = default;
// Ajouter d'autres fonctions liées à votre algorithme ici
void initializePopulation();
double maxFitness() const;
int indexOfSolutionWhereSuperiorOfLimit() const;
void FindBestSolution();
void calculeProbabilite();
void employedBeePhase();
void onLookerBeePhase();
void scoutBeePhase();
};
#endif