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
430c769b
Valider
430c769b
rédigé
Il y a 8 ans
par
Matthieu RÉ
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fixed Normalized Indicators
parent
99df19db
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
src/ibea/indicator.cpp
+8
-5
8 ajouts, 5 suppressions
src/ibea/indicator.cpp
src/ibea/indicator.h
+1
-1
1 ajout, 1 suppression
src/ibea/indicator.h
src/ibea/population.cpp
+27
-1
27 ajouts, 1 suppression
src/ibea/population.cpp
src/ibea/population.h
+2
-0
2 ajouts, 0 suppression
src/ibea/population.h
avec
38 ajouts
et
7 suppressions
src/ibea/indicator.cpp
+
8
−
5
Voir le fichier @
430c769b
...
@@ -6,12 +6,15 @@
...
@@ -6,12 +6,15 @@
* sets of vectors. Furthermore, instead of calling in every
* sets of vectors. Furthermore, instead of calling in every
* epsilon_indicator the method coco_evaluate, we better save every f(x) and
* epsilon_indicator the method coco_evaluate, we better save every f(x) and
* enter as parameters of the function the two vectors f(x1) and f(x2) we want
* enter as parameters of the function the two vectors f(x1) and f(x2) we want
* to compare.
* to compare. Each indicator uses normalized terms :
* @param fa: image of the first vector to compare by f
* f_i'(x)=(f_i(x)-bmin[i])/(bmax[i]-bmin[i])
* @param fb: image of the second vector to compare by f
* @param x: image of the first vector to compare by f
* @param y: image of the second vector to compare by f
* @param bmin: vector containing minimum bounds of the f(x) on the population
* @param bmin: vector containing maximum bounds of the f(x) on the population
* @returns: the espsilon-indicator
* @returns: the espsilon-indicator
*/
*/
double
epsilon_indicator
(
double
*
a
,
double
*
b
,
int
dim_obj
)
{
double
epsilon_indicator
(
double
*
x
,
double
*
y
,
double
*
bmin
,
double
*
bmax
,
int
dim_obj
)
{
int
k
;
int
k
;
double
eps_k
=
0.0
,
eps_temp
;
double
eps_k
=
0.0
,
eps_temp
;
...
@@ -23,7 +26,7 @@ double epsilon_indicator(double * a, double * b, int dim_obj) {
...
@@ -23,7 +26,7 @@ double epsilon_indicator(double * a, double * b, int dim_obj) {
*/
*/
for
(
k
=
0
;
k
<
dim_obj
;
k
++
)
{
for
(
k
=
0
;
k
<
dim_obj
;
k
++
)
{
eps_temp
=
b
[
k
]
-
a
[
k
]
;
eps_temp
=
(
y
[
k
]
-
x
[
k
])
/
(
bmax
[
k
]
-
bmin
[
k
])
;
if
(
k
==
0
)
if
(
k
==
0
)
eps_k
=
eps_temp
;
eps_k
=
eps_temp
;
else
if
(
eps_k
<
eps_temp
)
else
if
(
eps_k
<
eps_temp
)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/indicator.h
+
1
−
1
Voir le fichier @
430c769b
#ifndef INDICATOR_H
#ifndef INDICATOR_H
#define INDICATOR_H
#define INDICATOR_H
double
epsilon_indicator
(
double
*
a
,
double
*
b
,
int
dim_obj
);
double
epsilon_indicator
(
double
*
x
,
double
*
y
,
double
*
bmin
,
double
*
bmax
,
int
dim_obj
);
#endif
#endif
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/population.cpp
+
27
−
1
Voir le fichier @
430c769b
...
@@ -25,6 +25,10 @@ Population::Population(int size, int dimension, int n_objectives) :
...
@@ -25,6 +25,10 @@ Population::Population(int size, int dimension, int n_objectives) :
}
}
fitnesses_
=
(
double
*
)
coco_allocate_memory
(
size_
*
sizeof
(
double
));
fitnesses_
=
(
double
*
)
coco_allocate_memory
(
size_
*
sizeof
(
double
));
bmin_
=
(
double
*
)
coco_allocate_memory
(
size_
*
sizeof
(
double
));
bmax_
=
(
double
*
)
coco_allocate_memory
(
size_
*
sizeof
(
double
));
}
}
Population
::~
Population
(){
Population
::~
Population
(){
...
@@ -115,10 +119,32 @@ void Population::evaluate(evaluate_function_t evaluate_function){
...
@@ -115,10 +119,32 @@ void Population::evaluate(evaluate_function_t evaluate_function){
}
}
void
Population
::
compute_indicators
(){
void
Population
::
compute_indicators
(){
double
tmp_bmin
,
tmp_bmax
;
for
(
int
i
=
0
;
i
<
n_objectives_
;
i
++
)
{
for
(
int
j
=
0
;
j
<
current_size_
;
j
++
)
{
if
(
j
==
0
)
{
tmp_bmin
=
values_
[
j
][
i
];
tmp_bmax
=
values_
[
j
][
i
];
}
else
{
if
(
values_
[
j
][
i
]
>
tmp_bmax
)
{
tmp_bmax
=
values_
[
j
][
i
];
}
if
(
values_
[
j
][
i
]
<
tmp_bmin
)
{
tmp_bmin
=
values_
[
j
][
i
];
}
}
}
bmin_
[
i
]
=
tmp_bmin
;
bmax_
[
i
]
=
tmp_bmax
;
}
c_
=
0
;
c_
=
0
;
for
(
int
i
=
0
;
i
<
current_size_
;
i
++
){
for
(
int
i
=
0
;
i
<
current_size_
;
i
++
){
for
(
int
j
=
0
;
j
<
current_size_
;
j
++
){
for
(
int
j
=
0
;
j
<
current_size_
;
j
++
){
indicator_values_
[
i
][
j
]
=
epsilon_indicator
(
values_
[
i
],
values_
[
j
],
n_objectives_
);
indicator_values_
[
i
][
j
]
=
epsilon_indicator
(
values_
[
i
],
values_
[
j
],
bmin_
,
bmax_
,
n_objectives_
);
if
(
abs
(
indicator_values_
[
i
][
j
])
>
c_
){
if
(
abs
(
indicator_values_
[
i
][
j
])
>
c_
){
c_
=
abs
(
indicator_values_
[
i
][
j
]);
c_
=
abs
(
indicator_values_
[
i
][
j
]);
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/population.h
+
2
−
0
Voir le fichier @
430c769b
...
@@ -43,6 +43,8 @@ private:
...
@@ -43,6 +43,8 @@ private:
double
**
values_
;
double
**
values_
;
double
**
indicator_values_
;
double
**
indicator_values_
;
double
*
fitnesses_
;
double
*
fitnesses_
;
double
*
bmin_
;
double
*
bmax_
;
int
ind_min_
;
int
ind_min_
;
double
c_
;
double
c_
;
...
...
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