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
ef6a002b
Valider
ef6a002b
rédigé
Il y a 8 ans
par
Jonathan CROUZET
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fixed boundary problem on mutation
parent
0667bca8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
src/experiment.c
+5
-13
5 ajouts, 13 suppressions
src/experiment.c
src/ibea/ibea.cpp
+4
-2
4 ajouts, 2 suppressions
src/ibea/ibea.cpp
src/ibea/mutation.cpp
+8
-0
8 ajouts, 0 suppression
src/ibea/mutation.cpp
avec
17 ajouts
et
15 suppressions
src/experiment.c
+
5
−
13
Voir le fichier @
ef6a002b
/**
* An example of benchmarking random search on a COCO suite. A grid search optimizer is also
* implemented and can be used instead of random search.
*
* Set the global parameter BUDGET_MULTIPLIER to suit your needs.
*/
#include
<stdlib.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<stdio.h>
#include
<string.h>
#include
<string.h>
...
@@ -68,7 +62,7 @@ static void timing_data_time_problem(timing_data_t *timing_data, coco_problem_t
...
@@ -68,7 +62,7 @@ static void timing_data_time_problem(timing_data_t *timing_data, coco_problem_t
static
void
timing_data_finalize
(
timing_data_t
*
timing_data
);
static
void
timing_data_finalize
(
timing_data_t
*
timing_data
);
/**
/**
* The main method initializes the random number generator and calls the
example
experiment on the
* The main method initializes the random number generator and calls the experiment on the
* bi-objective suite.
* bi-objective suite.
*/
*/
int
main
(
void
)
{
int
main
(
void
)
{
...
@@ -95,8 +89,7 @@ int main(void) {
...
@@ -95,8 +89,7 @@ int main(void) {
}
}
/**
/**
* A simple example of benchmarking random search on a suite with instances from 2016 that can serve also as
* The benchmarking experiment
* a timing experiment.
*
*
* @param suite_name Name of the suite (use "bbob" for the single-objective and "bbob-biobj" for the
* @param suite_name Name of the suite (use "bbob" for the single-objective and "bbob-biobj" for the
* bi-objective suite).
* bi-objective suite).
...
@@ -115,9 +108,9 @@ void experiment(const char *suite_name,
...
@@ -115,9 +108,9 @@ void experiment(const char *suite_name,
/* Set some options for the observer. See documentation for other options. */
/* Set some options for the observer. See documentation for other options. */
char
*
observer_options
=
char
*
observer_options
=
coco_strdupf
(
"result_folder:
R
S_on_%s "
coco_strdupf
(
"result_folder:
IBEA_EP
S_on_%s "
"algorithm_name:
R
S "
"algorithm_name:
IBEA_EP
S "
"algorithm_info:
\"
A simple random search algorithm
\"
"
,
suite_name
);
"algorithm_info:
\"
IBEA algorithm with espsilon indicator
\"
"
,
suite_name
);
/* Initialize the suite and observer */
/* Initialize the suite and observer */
suite
=
coco_suite
(
suite_name
,
"year: 2016"
,
"dimensions: 2,3,5,10,20,40"
);
suite
=
coco_suite
(
suite_name
,
"year: 2016"
,
"dimensions: 2,3,5,10,20,40"
);
...
@@ -170,7 +163,6 @@ void experiment(const char *suite_name,
...
@@ -170,7 +163,6 @@ void experiment(const char *suite_name,
coco_observer_free
(
observer
);
coco_observer_free
(
observer
);
coco_suite_free
(
suite
);
coco_suite_free
(
suite
);
}
}
/**
/**
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/ibea.cpp
+
4
−
2
Voir le fichier @
ef6a002b
#include
<cmath>
#include
"../coco/coco.h"
#include
"../coco/coco.h"
#include
"population.h"
#include
"population.h"
#include
"tournament.h"
#include
"tournament.h"
...
@@ -15,8 +17,8 @@ void ibea(evaluate_function_t evaluate,
...
@@ -15,8 +17,8 @@ void ibea(evaluate_function_t evaluate,
{
{
/* Parameters */
/* Parameters */
int
n_individus
=
10
;
/* number of individus per generations */
int
n_individus
=
10
;
/* number of individus per generations */
int
n_generations
=
2
;
/* number of generations */
int
n_generations
=
floor
(
max_budget
/
n_individus
)
;
/* number of generations */
int
mu
=
5
;
/* number of tournament */
int
mu
=
2
;
/* number of
binary
tournament */
double
eta
=
20
;
/* polynomiale mutation degree */
double
eta
=
20
;
/* polynomiale mutation degree */
double
p_combination
=
1
;
double
p_combination
=
1
;
double
p_mutation
=
0.1
;
double
p_mutation
=
0.1
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/mutation.cpp
+
8
−
0
Voir le fichier @
ef6a002b
#include
<cstdlib>
#include
<cstdlib>
#include
<cmath>
#include
<cmath>
#include
<algorithm>
#include
<algorithm>
#include
<cstdio>
#include
"../coco/coco.h"
#include
"../coco/coco.h"
#include
"population.h"
#include
"population.h"
...
@@ -26,6 +27,13 @@ double polynomiale_mutation(double parent,
...
@@ -26,6 +27,13 @@ double polynomiale_mutation(double parent,
}
}
child
=
parent
+
delta_q
*
(
upper_bound
-
lower_bound
);
child
=
parent
+
delta_q
*
(
upper_bound
-
lower_bound
);
if
(
child
>
upper_bound
){
child
=
upper_bound
;
}
if
(
child
<
lower_bound
){
child
=
lower_bound
;
}
return
child
;
return
child
;
}
}
...
...
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