Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Arnaud Kress
easea
Commits
8622278c
Commit
8622278c
authored
Oct 18, 2010
by
kruger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes on the Library mainly in message handling
parent
06fd787a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
23 deletions
+43
-23
EaseaLex.cpp
EaseaLex.cpp
+16
-7
EaseaLex.l
EaseaLex.l
+15
-6
EaseaParse.cpp
EaseaParse.cpp
+2
-2
EaseaParse.y
EaseaParse.y
+2
-2
examples/weierstrass_std/weierstrass.ez
examples/weierstrass_std/weierstrass.ez
+1
-1
libeasea/CEvolutionaryAlgorithm.cpp
libeasea/CEvolutionaryAlgorithm.cpp
+5
-5
libeasea/CStoppingCriterion.cpp
libeasea/CStoppingCriterion.cpp
+2
-0
No files found.
EaseaLex.cpp
View file @
8622278c
...
...
@@ -1961,8 +1961,8 @@ fprintf(fpOutputFile,"%d",bSTART_FROM_FILE);
#line 1257 "EaseaLex.l"
if (nWARNINGS) printf ("\nWARNING !!!\nTarget file(s) generation went through WITH %d WARNING(S) !\n",nWARNINGS);
else printf ("\nCONGRATULATIONS !!!\nTarget file(s) generation succeeded with
no warning
.\n");
printf ("
Have a nice compile time
.\n");
else printf ("\nCONGRATULATIONS !!!\nTarget file(s) generation succeeded with
out warnings
.\n");
printf ("
You can now type \"make\" to compile your project
.\n");
if (TARGET==CUDA || TARGET==STD) fprintf(fpOutputFile,"\n# That's all folks ! \n");
else fprintf(fpOutputFile,"\n// That's all folks ! \n");
fflush(fpOutputFile);
...
...
@@ -4390,10 +4390,19 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
pSymbolTable = pSymTable;
if (!yycreate(pParser)) return 0;
if (bVERBOSE) printf("\n ");
if (bVERBOSE) printf("\n E A S E A (v1.0)");
if (bVERBOSE) printf("\n ___________________ ");
if (bVERBOSE) printf("\n ");
if (bVERBOSE) {
printf("\n ");
printf("\n E A S E A (v1.1)");
printf("\n ___________________ ");
printf("\n ");
printf("\n Stochastic Optimisation and Nature Inspired Computing");
printf("\nLaboratoire des Sciences de l'Image, de l'Informatique et de la Teledetection");
printf("\n Universite de Strasbourg - France");
printf("\n Ogier Maitre - Frederic Kruger - Pierre Collet");
printf("\n ");
printf("\n ___________________ ");
printf("\n ");
}
if (sRAW_PROJECT_NAME[0]==0){
printf("\nInsert a .ez file name or a local project name: ");
...
...
@@ -4506,7 +4515,7 @@ double CEASEALexer::myStrtod() const{
return d;
}
#line 451
0
"EaseaLex.cpp"
#line 451
9
"EaseaLex.cpp"
void YYLEXNAME::yytables()
{
...
...
EaseaLex.l
View file @
8622278c
...
...
@@ -1256,8 +1256,8 @@ if(OPERATING_SYSTEM=WINDOWS)
}
<TEMPLATE_ANALYSIS>"\\TEMPLATE_END" {
if (nWARNINGS) printf ("\nWARNING !!!\nTarget file(s) generation went through WITH %d WARNING(S) !\n",nWARNINGS);
else printf ("\nCONGRATULATIONS !!!\nTarget file(s) generation succeeded with
no warning
.\n");
printf ("
Have a nice compile time
.\n");
else printf ("\nCONGRATULATIONS !!!\nTarget file(s) generation succeeded with
out warnings
.\n");
printf ("
You can now type \"make\" to compile your project
.\n");
if (TARGET==CUDA || TARGET==STD) fprintf(fpOutputFile,"\n# That's all folks ! \n");
else fprintf(fpOutputFile,"\n// That's all folks ! \n");
fflush(fpOutputFile);
...
...
@@ -2254,10 +2254,19 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
pSymbolTable = pSymTable;
if (!yycreate(pParser)) return 0;
if (bVERBOSE) printf("\n ");
if (bVERBOSE) printf("\n E A S E A (v1.0)");
if (bVERBOSE) printf("\n ___________________ ");
if (bVERBOSE) printf("\n ");
if (bVERBOSE) {
printf("\n ");
printf("\n E A S E A (v1.1)");
printf("\n ___________________ ");
printf("\n ");
printf("\n Stochastic Optimisation and Nature Inspired Computing");
printf("\nLaboratoire des Sciences de l'Image, de l'Informatique et de la Teledetection");
printf("\n Universite de Strasbourg - France");
printf("\n Ogier Maitre - Frederic Kruger - Pierre Collet");
printf("\n ");
printf("\n ___________________ ");
printf("\n ");
}
if (sRAW_PROJECT_NAME[0]==0){
printf("\nInsert a .ez file name or a local project name: ");
...
...
EaseaParse.cpp
View file @
8622278c
...
...
@@ -497,7 +497,7 @@ pCURRENT_TYPE=yyattribute(2 - 2).pSymbol; pCURRENT_TYPE->ObjectQualifier=yyattri
if((TARGET_FLAVOR==CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) { nGENOME_NAME=yyattribute(1 - 4).pSymbol->sName; nPROBLEM_DIM=(int)yyattribute(3 - 4).dValue;}
printf("DEBUG : size of $3 %d nSize %d\n",(int)yyattribute(3 - 4).dValue
,pCURRENT_TYPE->nSize);
//printf("DEBUG : size of $3 %d nSize %d\n",(int)$3
,pCURRENT_TYPE->nSize);
yyattribute(1 - 4).pSymbol->nSize=pCURRENT_TYPE->nSize*(int)yyattribute(3 - 4).dValue;
yyattribute(1 - 4).pSymbol->pClass=pCURRENT_CLASS;
...
...
@@ -1710,7 +1710,7 @@ double CEASEAParser::divide(double a, double b)
void CEASEAParser::yysyntaxerror(){
printf("Syntax Error at line : %d\n",EASEALexer.yylineno);
printf("Syntax Error at line : %d\n
For more details during the EASEA compiling, use the \"-v\" option\n
",EASEALexer.yylineno);
}
...
...
EaseaParse.y
View file @
8622278c
...
...
@@ -372,7 +372,7 @@ Object
| Symbol '[' Expr ']' {
if((TARGET_FLAVOR==CMAES) && nPROBLEM_DIM==0 && strcmp(pCURRENT_CLASS->sName,"Genome")==0) { nGENOME_NAME=$1->sName; nPROBLEM_DIM=(int)$3;}
printf("DEBUG : size of $3 %d nSize %d\n",(int)$3,pCURRENT_TYPE->nSize);
//
printf("DEBUG : size of $3 %d nSize %d\n",(int)$3,pCURRENT_TYPE->nSize);
$1->nSize=pCURRENT_TYPE->nSize*(int)$3;
$1->pClass=pCURRENT_CLASS;
...
...
@@ -841,6 +841,6 @@ double CEASEAParser::divide(double a, double b)
void CEASEAParser::yysyntaxerror(){
printf("Syntax Error at line : %d\n",EASEALexer.yylineno);
printf("Syntax Error at line : %d\n
For more details during the EASEA compiling, use the \"-v\" option\n
",EASEALexer.yylineno);
}
examples/weierstrass_std/weierstrass.ez
View file @
8622278c
...
...
@@ -190,7 +190,7 @@ CPPFLAGS+=
Generate R script:false
Plot stats:false //Default: 0
Remote island model:
tru
e
Remote island model:
fals
e
IP file: ip.txt //File containing all the remote island's IP
Save population: true
...
...
libeasea/CEvolutionaryAlgorithm.cpp
View file @
8622278c
...
...
@@ -159,7 +159,7 @@ void CEvolutionaryAlgorithm::runEvolutionaryLoop(){
gettimeofday
(
&
begin
,
0
);
#endif
std
::
cout
<<
"P
arent's population initializing
"
<<
std
::
endl
;
std
::
cout
<<
"P
opulation initialisation (Generation 0)...
"
<<
std
::
endl
;
this
->
initializeParentPopulation
();
if
(
!
INSTEAD_EVAL_STEP
)
...
...
@@ -316,11 +316,11 @@ void CEvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){
//Affichage
if
(
params
->
printStats
){
if
(
currentGeneration
==
0
)
printf
(
"GEN
\t
TIME
\t\t
EVAL
\t
BEST
\t\t
AVG
\t\t
STDEV
\n\n
"
);
printf
(
"GEN
\t
TIME
\t\t
EVAL
\t
BEST
\t\t
\t\t
AVG
\t\t
\t\t
STDEV
\n\n
"
);
#ifdef WIN32
printf
(
"%lu
\t
%2.6f
\t
%lu
\t
%.15e
\t
%.15e
\t
%.15e
\n
"
,
currentGeneration
,
duration
,
population
->
currentEvaluationNb
,
population
->
Best
->
getFitness
(),
currentAverageFitness
,
currentSTDEV
);
printf
(
"%lu
\t
%2.6f
\t
%lu
\t
%.15e
\t
\t
%.15e
\t
\t
%.15e
\n
"
,
currentGeneration
,
duration
,
population
->
currentEvaluationNb
,
population
->
Best
->
getFitness
(),
currentAverageFitness
,
currentSTDEV
);
#else
printf
(
"%d
\t
%ld.%06ld
\t
%d
\t
%.15e
\t
%.15e
\t
%.15e
\n
"
,
currentGeneration
,
res
.
tv_sec
,
res
.
tv_usec
,
population
->
currentEvaluationNb
,
population
->
Best
->
getFitness
(),
currentAverageFitness
,
currentSTDEV
);
printf
(
"%d
\t
%ld.%06ld
\t
%d
\t
%.15e
\t
\t
%.15e
\t
\t
%.15e
\n
"
,
currentGeneration
,
res
.
tv_sec
,
res
.
tv_usec
,
population
->
currentEvaluationNb
,
population
->
Best
->
getFitness
(),
currentAverageFitness
,
currentSTDEV
);
#endif
//printf("%lu\t%ld.%06ld\t%lu\t%f\t%f\t%f\n",currentGeneration,res.tv_sec,res.tv_usec,population->currentEvaluationNb,population->Best->getFitness(),currentAverageFitness,currentSTDEV);
}
...
...
@@ -489,7 +489,7 @@ bool CEvolutionaryAlgorithm::allCriteria(){
for
(
size_t
i
=
0
;
i
<
stoppingCriteria
.
size
();
i
++
){
if
(
stoppingCriteria
.
at
(
i
)
->
reached
()
){
std
::
cout
<<
"Stopping criterion reached
: "
<<
i
<<
std
::
endl
;
std
::
cout
<<
"Stopping criterion reached
"
<<
std
::
endl
;
return
true
;
}
}
...
...
libeasea/CStoppingCriterion.cpp
View file @
8622278c
...
...
@@ -78,6 +78,8 @@ CControlCStopingCriterion::CControlCStopingCriterion(){
}
bool
CControlCStopingCriterion
::
reached
(){
if
(
ARRET_DEMANDE
)
std
::
cout
<<
"Algorithm stopped on user demand"
<<
std
::
endl
;
return
ARRET_DEMANDE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment