Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
Multi-Objectives_Optimization_IBEA
Gestion
Activité
Membres
Programmation
Wiki externe
Code
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Analyse
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
SPLiiNe
Multi-Objectives_Optimization_IBEA
Validations
f0c86a9a
Valider
f0c86a9a
rédigé
Il y a 8 ans
par
Jonathan CROUZET
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Implemented the ibea algorithme
parent
6e047fbe
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/ibea/ibea.cpp
+53
-5
53 ajouts, 5 suppressions
src/ibea/ibea.cpp
src/ibea/ibea.h
+9
-15
9 ajouts, 15 suppressions
src/ibea/ibea.h
avec
62 ajouts
et
20 suppressions
src/ibea/ibea.cpp
+
53
−
5
Voir le fichier @
f0c86a9a
#include
"../coco/coco.h"
#include
"population.h"
#include
"fitness.h"
#include
"tournament.h"
#include
"combination.h"
#include
"mutation.h"
#include
"ibea.h"
IBEA
::
IBEA
(){
}
IBEA
::~
IBEA
(){
void
ibea
(
void
*
evaluate
,
const
size_t
dimension
,
const
size_t
number_of_objectives
,
const
double
*
lower_bounds
,
const
double
*
upper_bounds
,
const
size_t
max_budget
,
coco_random_state_t
*
random_generator
)
{
/* Parameters */
int
n_individus
=
20
;
/* number of individus per generations */
int
n_generations
=
(
int
)
max_budget
/
n_individus
;
/* number of generations */
int
mu
=
10
;
/* number of tournament */
int
eta
=
100
;
/* polynomiale mutation degree */
Population
pop
=
Population
(
n_individus
,
dimension
);
Population
new_pop
=
Population
(
n_individus
,
dimension
);
random_init
(
&
pop
,
random_generator
);
/* Iterations */
int
m
=
0
;
while
(
m
<
n_generations
){
/* 2 Fitness assignment */
fitnesses
(
&
pop
);
new_pop_
.
empty
();
while
(
new_pop
.
getCurrentSize
()
<
n_individus
){
/* 3 Environemental select */
fitnesses_update
(
pop_
);
/* 4 */
/* 5 Fill mating pool */
binary_tournament
(
pop
,
&
new_pop
,
mu
,
random_generator
);
}
void
IBEA
::
run
(){
/* 6 Combination and Mutation */
pop_
.
empty
();
combinate
(
new_pop
,
&
pop
,
random_generator
);
mutate
(
&
pop
,
lower_bounds
,
upper_bounds
,
eta
,
random_generator
);
m
++
;
}
}
void
random_init
(
&
Population
pop
,
coco_random_state_t
*
random_generator
){
for
(
int
i
=
0
;
i
<
pop
.
getSize
();
i
++
){
for
(
int
j
=
0
;
j
<
pop
.
getDim
();
j
++
)
{
range
=
upper_bounds
[
j
]
-
lower_bounds
[
j
];
pop
.
setIndiv
(
i
,
j
)
=
lower_bounds
[
j
]
+
coco_random_uniform
(
random_generator
)
*
range
;
}
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/ibea.h
+
9
−
15
Voir le fichier @
f0c86a9a
#ifndef IBEA_H
#define IBEA_H
class
IBEA
{
private:
Population
pop
;
void
(
*
evaluate
)();
void
(
*
fitness
)(
Population
);
void
(
*
tournament
)();
void
(
*
mutation
)(
Population
);
void
(
*
combination
)(
Population
);
public:
IBEA
();
~
IBEA
();
void
run
();
};
void
ibea
(
void
*
evaluate
,
const
size_t
dimension
,
const
size_t
number_of_objectives
,
const
double
*
lower_bounds
,
const
double
*
upper_bounds
,
const
size_t
max_budget
,
coco_random_state_t
*
random_generator
);
void
random_init
(
&
Population
pop
,
coco_random_state_t
*
random_generator
);
#endif
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter