Commit 77fddbae authored by Alexis Lebis's avatar Alexis Lebis

add display option -d

parent 79bdf0e8
...@@ -44,6 +44,7 @@ int main(int argc, char* argv[]){ ...@@ -44,6 +44,7 @@ int main(int argc, char* argv[]){
unsigned int _seedParam = parser.createParam((unsigned int)(0), "seed", "Random number seed", 'S').value(); unsigned int _seedParam = parser.createParam((unsigned int)(0), "seed", "Random number seed", 'S').value();
std::string _outputFile = parser.createParam(std::string("/scratch"), "outputfile", "", '\0', "Representation", true).value(); std::string _outputFile = parser.createParam(std::string("/scratch"), "outputfile", "", '\0', "Representation", true).value();
eo::rng.reseed(_seedParam); eo::rng.reseed(_seedParam);
unsigned int localDisplay = parser.createParam((unsigned int)(0), "localDisplay", "whether or not display on local output", 'd', "Param").value();
//PROBLEM PARAMETERS //PROBLEM PARAMETERS
unsigned int SEED = parser.createParam((unsigned int)(7777), "csdvpSeed", "Seed used for the CSDVP",'s',"Param").value(); unsigned int SEED = parser.createParam((unsigned int)(7777), "csdvpSeed", "Seed used for the CSDVP",'s',"Param").value();
...@@ -301,16 +302,21 @@ int main(int argc, char* argv[]){ ...@@ -301,16 +302,21 @@ int main(int argc, char* argv[]){
filename+=oss.str(); filename+=oss.str();
std::ofstream outputfile4(filename.c_str(), std::ios::app); std::ofstream outputfile4(filename.c_str(), std::ios::app);
std::pair<bool, double> resECTS;
std::pair<bool, double> resRep ;
std::pair<bool, double> resJob ;
std::pair<bool, double> resPrq ;
if(localDisplay)
/*std::cout << "===== CURRENT POP =====" << std::endl; {
std::cout << "===== CURRENT POP =====" << std::endl;
pop.best_element().printOn(std::cout); pop.best_element().printOn(std::cout);
std::cout << " fitness:" << pop.best_element().fitness() << std::endl; std::cout << " fitness:" << pop.best_element().fitness() << std::endl;
std::cout << "Stats & metrics: \n" << std::endl; std::cout << "Stats & metrics: \n" << std::endl;
std::pair<bool, double> resECTS = ctrECTS.integrityCheck(pop.best_element()); resECTS = ctrECTS.integrityCheck(pop.best_element());
std::pair<bool, double> resRep = ctrRep.integrityCheck(pop.best_element()); resRep = ctrRep.integrityCheck(pop.best_element());
std::pair<bool, double> resJob = ctrJob.integrityCheck(pop.best_element()); resJob = ctrJob.integrityCheck(pop.best_element());
std::pair<bool, double> resPrq = ctrPrq.integrityCheck(pop.best_element()); resPrq = ctrPrq.integrityCheck(pop.best_element());
std::cout << "ECTS: "; std::cout << "ECTS: ";
if(resECTS.first) if(resECTS.first)
...@@ -340,7 +346,8 @@ int main(int argc, char* argv[]){ ...@@ -340,7 +346,8 @@ int main(int argc, char* argv[]){
std::cout << "failed"; std::cout << "failed";
std::cout << " | value: " << resPrq.second << std::endl; std::cout << " | value: " << resPrq.second << std::endl;
std::cout << "\n==========" << std::endl; std::cout << "\n==========" << std::endl;
*/ }
// ---------- ALGO HERE // ---------- ALGO HERE
eoEasyEA<QUEEN> algo(cont,eval,select,transform,replace); eoEasyEA<QUEEN> algo(cont,eval,select,transform,replace);
...@@ -389,7 +396,8 @@ int main(int argc, char* argv[]){ ...@@ -389,7 +396,8 @@ int main(int argc, char* argv[]){
// ------------------- // -------------------
/* if(localDisplay)
{
std::cout << "\n===== BEST INDIVIDU =====" << std::endl; std::cout << "\n===== BEST INDIVIDU =====" << std::endl;
pop.best_element().printOn(std::cout); pop.best_element().printOn(std::cout);
std::cout << " fitness:" << pop.best_element().fitness() << std::endl; std::cout << " fitness:" << pop.best_element().fitness() << std::endl;
...@@ -429,8 +437,8 @@ int main(int argc, char* argv[]){ ...@@ -429,8 +437,8 @@ int main(int argc, char* argv[]){
std::cout << " | value: " << resPrq.second << std::endl; std::cout << " | value: " << resPrq.second << std::endl;
std::cout << "===============" << std::endl; std::cout << "===============" << std::endl;
}
*/
// ================================= END RUN ZONE =============================== // ================================= END RUN ZONE ===============================
return EXIT_SUCCESS; return EXIT_SUCCESS;
......
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