20 #ifndef __OPTIMIZERLOOP_HXX__
21 #define __OPTIMIZERLOOP_HXX__
77 OptimizerLoop(
const std::string& name,
const std::string& algLibWthOutExt,
78 const std::string& symbolNameToOptimizerAlgBaseInstanceFactory,
79 bool algInitOnFile,
bool initAlgo=
true,
Proc * procForTypes = NULL);
82 void init(
bool start=
true);
84 int getNumberOfInputPorts()
const;
89 std::list<InputPort *> getSetOfInputPort()
const;
90 std::list<InputPort *> getLocalInputPorts()
const;
91 void selectRunnableTasks(std::vector<Task *>& tasks);
92 void getReadyTasks(std::vector<Task *>& tasks);
95 virtual void accept(
Visitor *visitor);
96 virtual std::string
getSymbol()
const {
return _symbol; }
97 virtual std::string getAlgLib()
const ;
98 virtual void setAlgorithm(
const std::string& alglib,
const std::string& symbol,
99 bool checkLinks=
true,
Proc * procForTypes = NULL);
100 virtual void checkBasicConsistency()
const throw(
Exception);
101 virtual std::
string typeName() {
return "YACS__ENGINE__OptimizerLoop";}
102 int getNumberOfOutputPorts()
const;
103 std::list<OutputPort *> getSetOfOutputPort()
const;
104 std::list<OutputPort *> getLocalOutputPorts()
const;
111 void buildDelegateOf(
InPort * & port,
OutPort *initialStart,
const std::list<ComposedNode *>& pointsOfView);
112 void buildDelegateOf(std::pair<OutPort *, OutPort *>& port,
InPort *finalTarget,
const std::list<ComposedNode *>& pointsOfView);
113 void checkControlDependancy(
OutPort *start,
InPort *end,
bool cross,
114 std::map <
ComposedNode *, std::list < OutPort * >, SortHierarc >& fw,
115 std::vector<OutPort *>& fwCross,
116 std::map<
ComposedNode *, std::list < OutPort *>, SortHierarc >& bw,
118 void checkCFLinks(
const std::list<OutPort *>& starts,
InputPort *end,
unsigned char& alreadyFed,
bool direction,
LinkInfo& info)
const;
119 void checkLinkPossibility(
OutPort *start,
const std::list<ComposedNode *>& pointsOfViewStart,
120 InPort *end,
const std::list<ComposedNode *>& pointsOfViewEnd)
throw(
Exception);
122 void cleanInterceptors();
123 void launchMaxOfSamples(
bool first);
124 bool isFullyLazy()
const;
125 bool isFullyBusy(
unsigned& branchId)
const;
126 void initInterceptors(
unsigned nbOfBr);
127 void pushValueOutOfScopeForCase(
unsigned branchId);
129 virtual void loadAlgorithm();
137 static const char NAME_OF_ALGO_INIT_PORT[];
138 static const char NAME_OF_OUT_POOL_INPUT[];
139 static const char NAME_OF_ALGO_RESULT_PORT[];