Commit 8622278c authored by kruger's avatar kruger

Small changes on the Library mainly in message handling

parent 06fd787a
......@@ -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 without 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 4510 "EaseaLex.cpp"
#line 4519 "EaseaLex.cpp"
void YYLEXNAME::yytables()
{
......
......@@ -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 without 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: ");
......
......@@ -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\nFor more details during the EASEA compiling, use the \"-v\" option\n",EASEALexer.yylineno);
}
......
......@@ -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\nFor more details during the EASEA compiling, use the \"-v\" option\n",EASEALexer.yylineno);
}
......@@ -190,7 +190,7 @@ CPPFLAGS+=
Generate R script:false
Plot stats:false //Default: 0
Remote island model: true
Remote island model: false
IP file: ip.txt //File containing all the remote island's IP
Save population: true
......
......@@ -159,7 +159,7 @@ void CEvolutionaryAlgorithm::runEvolutionaryLoop(){
gettimeofday(&begin,0);
#endif
std::cout << "Parent's population initializing "<< std::endl;
std::cout << "Population 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\tTIME\t\tEVAL\tBEST\t\tAVG\t\tSTDEV\n\n");
printf("GEN\tTIME\t\tEVAL\tBEST\t\t\t\tAVG\t\t\t\tSTDEV\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;
}
}
......
......@@ -78,6 +78,8 @@ CControlCStopingCriterion::CControlCStopingCriterion(){
}
bool CControlCStopingCriterion::reached(){
if(ARRET_DEMANDE)
std::cout << "Algorithm stopped on user demand" << std::endl;
return ARRET_DEMANDE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment