Base class to implement in external dynamic lib in case of optimizer non event oriented. More...
#include <OptimizerAlg.hxx>
Public Member Functions | |
virtual | ~OptimizerAlgASync () |
virtual void | finishProxy () |
Public Member Functions inherited from YACS::ENGINE::OptimizerAlgBase | |
virtual TypeCode * | getTCForInProxy () const |
virtual TypeCode * | getTCForOutProxy () const |
virtual TypeCode * | getTCForAlgoInitProxy () const |
virtual TypeCode * | getTCForAlgoResultProxy () const |
virtual void | initializeProxy (const Any *input) throw (Exception) |
virtual void | startProxy () |
virtual void | takeDecisionProxy () |
virtual Any * | getAlgoResultProxy () |
virtual void | setPool (Pool *pool) |
virtual void | setProc (Proc *proc) |
virtual Proc * | getProc () |
virtual bool | hasError () const |
virtual const std::string & | getError () const |
virtual void | setError (const std::string &message) |
void | setNbOfBranches (int nbOfBranches) |
int | getNbOfBranches () const |
Public Member Functions inherited from YACS::ENGINE::RefCounter | |
unsigned int | getRefCnt () const |
void | incrRef () const |
bool | decrRef () |
Protected Member Functions | |
OptimizerAlgASync (Pool *pool) | |
virtual void | start () |
Called when optimization has succeed. More... | |
virtual void | takeDecision () |
Update _pool attribute before performing anything. More... | |
virtual void | run () |
virtual void | startToTakeDecision ()=0 |
Protected Member Functions inherited from YACS::ENGINE::OptimizerAlgBase | |
OptimizerAlgBase (Pool *pool) | |
virtual | ~OptimizerAlgBase () |
virtual TypeCode * | getTCForIn () const =0 |
returns typecode of type expected as Input. OwnerShip of returned pointer is held by this. More... | |
virtual TypeCode * | getTCForOut () const =0 |
returns typecode of type expected as Output. OwnerShip of returned pointer is held by this. More... | |
virtual TypeCode * | getTCForAlgoInit () const |
returns typecode of type expected for algo initialization. OwnerShip of returned pointer is held by this. More... | |
virtual TypeCode * | getTCForAlgoResult () const |
returns typecode of type expected as algo result. OwnerShip of returned pointer is held by this. More... | |
virtual void | initialize (const Any *input) throw (Exception) |
virtual void | finish () |
virtual Any * | getAlgoResult () |
Called when optimization has succeed. More... | |
Protected Member Functions inherited from YACS::ENGINE::RefCounter | |
RefCounter () | |
RefCounter (const RefCounter &other) | |
virtual | ~RefCounter () |
Additional Inherited Members | |
Static Public Attributes inherited from YACS::ENGINE::RefCounter | |
static unsigned int | _totalCnt =0 |
Protected Attributes inherited from YACS::ENGINE::OptimizerAlgBase | |
Pool * | _pool |
Proc * | _proc |
std::string | _errorMessage |
int | _nbOfBranches |
Base class to implement in external dynamic lib in case of optimizer non event oriented.
Definition at line 99 of file OptimizerAlg.hxx.
|
protected |
Definition at line 143 of file OptimizerAlg.cxx.
|
virtual |
Definition at line 147 of file OptimizerAlg.cxx.
|
virtual |
Reimplemented from YACS::ENGINE::OptimizerAlgBase.
Definition at line 151 of file OptimizerAlg.cxx.
References YACS::ENGINE::OptimizerAlgBase::finishProxy().
|
protectedvirtual |
_pool->getCurrentId gives the id at the origin of this call. Perform the job of analysing to know what new jobs to do (_pool->pushInSample) or in case of convergence _pool->destroyAll
Definition at line 167 of file OptimizerAlg.cxx.
References YACS::ENGINE::OptimizerAlgBase::_pool, YACS::ENGINE::Pool::destroyAll(), and startToTakeDecision().
|
protectedvirtual |
Called when optimization has succeed.
Implements YACS::ENGINE::OptimizerAlgBase.
Definition at line 162 of file OptimizerAlg.cxx.
|
protectedpure virtual |
_pool->getCurrentId gives the id at the origin of this call. Perform the job between 2 'condition->wait()' of analysing to know what new jobs to do (_pool->pushInSample) or in case of convergence _pool->destroyAll WARNING ! 'condition->wait()' must be called before any analyse of Pool.
Referenced by run().
|
protectedvirtual |
Update _pool attribute before performing anything.
Implements YACS::ENGINE::OptimizerAlgBase.
Definition at line 157 of file OptimizerAlg.cxx.