OptimizerLoop::OptimizerLoop(const std::string& name, const std::string& algLibWthOutExt,
const std::string& symbolNameToOptimizerAlgBaseInstanceFactory,
bool algInitOnFile,bool initAlgo, Proc * procForTypes):
- DynParaLoop(name,Runtime::_tc_string),_algInitOnFile(algInitOnFile),_alglib(algLibWthOutExt),
+ DynParaLoop(name,Runtime::_tc_string,std::unique_ptr<NbBranchesAbstract>(new NbBranches(this))),_algInitOnFile(algInitOnFile),_alglib(algLibWthOutExt),
_algoInitPort(NAME_OF_ALGO_INIT_PORT, this, Runtime::_tc_string, true),
_loader(NULL),_alg(0),_convergenceReachedWithOtherCalc(false),
_retPortForOutPool(NAME_OF_OUT_POOL_INPUT,this,Runtime::_tc_string),
//internal graph update
int i;
- int nbOfBr=_nbOfBranches.getIntValue();
+ int nbOfBr=_nbOfBranches->getIntValue();
_alg->setNbOfBranches(nbOfBr);
_alg->startProxy();
{
// Run the finalize nodes, the OptimizerLoop will be done only when they all finish
_unfinishedCounter = 0; // This counter indicates how many branches are not finished
- for (int i=0 ; i<_nbOfBranches.getIntValue() ; i++)
+ for (int i=0 ; i<_nbOfBranches->getIntValue() ; i++)
if (_execIds[i] == NOT_RUNNING_BRANCH_ID)
{
DEBTRACE("Launching finalize node for branch " << i)
linkName += start->getName()+" to "+end->getName()+")";
// Yes, it should be possible to link back the result port to any input port of the loop.
- if(end == _nbOfBranches.getPort() || end == &_algoInitPort)
+ if(end == _nbOfBranches->getPort() || end == &_algoInitPort)
if(start != &_algoResultPort)
throw Exception(std::string("Illegal OptimizerLoop link.") + linkName);
else