git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1458 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
8a7b122a61
commit
c798938fe0
1 changed files with 30 additions and 26 deletions
|
|
@ -45,33 +45,37 @@ public:
|
||||||
virtual bool operator() ( const eoPop<EOT>& _pop ) {
|
virtual bool operator() ( const eoPop<EOT>& _pop ) {
|
||||||
time_t diff = time(0) - start;
|
time_t diff = time(0) - start;
|
||||||
|
|
||||||
|
|
||||||
if (diff > (id * maxTime/10) ){
|
if (diff > (id * maxTime/10) ){
|
||||||
time_t begin=time(0);
|
time_t begin=time(0);
|
||||||
//traitement
|
std::cout << id << "start :" << begin << std::endl;
|
||||||
std::ostringstream os;
|
//traitement
|
||||||
os << fileName << "." << id;
|
std::string tmp=fileName;
|
||||||
std::ofstream outfile(os.str());
|
std::ostringstream os;
|
||||||
|
os << id;
|
||||||
for(unsigned int i=0 ; i < _pop.size(); i++){
|
|
||||||
for(unsigned int j=0 ; j<EOT::ObjectiveVector::nObjectives(); j++){
|
tmp+=".";
|
||||||
outfile << _pop[i].objectiveVector()[j];
|
tmp+=os.str();
|
||||||
if(j != EOT::ObjectiveVector::nObjectives() -1)
|
std::ofstream outfile(tmp.c_str());
|
||||||
outfile << " ";
|
|
||||||
}
|
for(unsigned int i=0 ; i < _pop.size(); i++){
|
||||||
outfile << std::endl;
|
for(unsigned int j=0 ; j<EOT::ObjectiveVector::nObjectives(); j++){
|
||||||
}
|
outfile << _pop[i].objectiveVector()[j];
|
||||||
|
if(j != EOT::ObjectiveVector::nObjectives() -1)
|
||||||
outfile.close();
|
outfile << " ";
|
||||||
|
}
|
||||||
id++;
|
outfile << std::endl;
|
||||||
start-=(time(0)-begin);
|
}
|
||||||
}
|
|
||||||
if(diff >= maxTime)
|
outfile.close();
|
||||||
return false;
|
|
||||||
return true;
|
id++;
|
||||||
|
start-=(time(0)-begin);
|
||||||
|
}
|
||||||
|
if(diff >= maxTime)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual std::string className(void) const { return "eoTenTimeContinue"; }
|
virtual std::string className(void) const { return "eoTenTimeContinue"; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue