From: Eduardo DAVILA Date: Wed, 17 Jul 2019 09:05:18 +0000 (+0200) Subject: #3278BBTK Feature New Normal - FindOptimalParam Box X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6fa8f3a318658b972b5012d26f12ac642d30b1bc;p=bbtk.git #3278BBTK Feature New Normal - FindOptimalParam Box --- diff --git a/packages/std/src/bbstdFindOptimalParam.cxx b/packages/std/src/bbstdFindOptimalParam.cxx index 2e863ce..28bcdeb 100644 --- a/packages/std/src/bbstdFindOptimalParam.cxx +++ b/packages/std/src/bbstdFindOptimalParam.cxx @@ -25,12 +25,16 @@ int FindOptimalParam::Evaluate( double value ) { int result=-9999; std::string strCommand = Replace( bbGetInputString(), value ); + strCommand=strCommand+" NameFileTransfer="+bbGetInputTransferFile(); + printf("EED FindOptimalParam::Evaluate command=%s\n", strCommand.c_str()); system( strCommand.c_str() ); FILE *ff = fopen( bbGetInputTransferFile().c_str() , "r"); if (ff!=NULL) { fscanf(ff,"%d",&result); - } // ff + } else { + printf("EED Warnning!! FindOptimalParam::Evaluate TransferFile not set.\n"); + }// ff fclose(ff); return result; } @@ -59,9 +63,9 @@ void FindOptimalParam::Process() double start = bbGetInputInitStart(); double end = bbGetInputInitEnd(); double actual; - int iter=0; - int evalStart = 1; - int evalEnd = 0; + int iter = 0; + int evalStart = 1; + int evalEnd = 0; int evalActual; do {