Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit 55135426 authored by kruger's avatar kruger
Browse files

Resolution du Probleme gnuplot

parent 79afc9a6
......@@ -229,7 +229,8 @@ void CEvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){
if((this->params->plotStats && this->gnuplot->valid) || this->params->generateGnuplotScript){
FILE *f;
string fichier (params->outputFilename);
f = fopen(params->outputFilename,"a"); //ajouter .dat
fichier.append(".dat");
f = fopen(fichier.c_str(),"a"); //ajouter .dat
if(f!=NULL){
if(currentGeneration==0)
fprintf(f,"#GEN\tTIME\t\tEVAL\tBEST\t\tAVG\t\tSTDEV\n\n");
......@@ -253,7 +254,7 @@ void CEvolutionaryAlgorithm::showPopulationStats(struct timeval beginTime){
#ifdef __linux__
if(this->params->plotStats && this->gnuplot->valid){
if(currentGeneration==0)
fprintf(this->gnuplot->fWrit,"plot \'%s\' using 3:4 t \'Best Fitness\' w lines, \'%s\' using 3:5 t \'Average\' w lines, \'%s\' using 3:6 t \'StdDev\' w lines\n", params->outputFilename,params->outputFilename,params->outputFilename);
fprintf(this->gnuplot->fWrit,"plot \'%s.dat\' using 3:4 t \'Best Fitness\' w lines, \'%s.dat\' using 3:5 t \'Average\' w lines, \'%s.dat\' using 3:6 t \'StdDev\' w lines\n", params->outputFilename,params->outputFilename,params->outputFilename);
else
fprintf(this->gnuplot->fWrit,"replot\n");
fflush(this->gnuplot->fWrit);
......
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