1 #include "PluginOptEvTest1.hxx"
2 #include "TypeCode.hxx"
7 using namespace YACS::ENGINE;
9 PluginOptEvTest1::PluginOptEvTest1(Pool *pool):OptimizerAlgSync(pool),_tcIn(0),_tcOut(0),_idTest(0)
11 _tcIn=new TypeCode(Double);
12 _tcOut=new TypeCode(Int);
15 PluginOptEvTest1::~PluginOptEvTest1()
21 TypeCode *PluginOptEvTest1::getTCForIn() const
26 TypeCode *PluginOptEvTest1::getTCForOut() const
31 void PluginOptEvTest1::parseFileToInit(const std::string& fileName)
35 void PluginOptEvTest1::start()
38 Any *val=AtomAny::New(1.2);
39 _pool->pushInSample(4,val);
40 val=AtomAny::New(3.4);
41 _pool->pushInSample(9,val);
44 void PluginOptEvTest1::takeDecision()
48 Any *val=AtomAny::New(5.6);
49 _pool->pushInSample(16,val);
50 val=AtomAny::New(7.8);
51 _pool->pushInSample(25,val);
52 val=AtomAny::New(9. );
53 _pool->pushInSample(36,val);
54 val=AtomAny::New(12.3);
55 _pool->pushInSample(49,val);
59 Any *val=AtomAny::New(45.6);
60 _pool->pushInSample(64,val);
61 val=AtomAny::New(78.9);
62 _pool->pushInSample(81,val);
66 Any *tmp= _pool->getCurrentInSample();
67 if(fabs(tmp->getDoubleValue()-45.6)<1.e-12)
73 void PluginOptEvTest1::initialize(const Any *input) throw (Exception)
77 void PluginOptEvTest1::finish()
81 OptimizerAlgBase *PluginOptEvTest1Factory(Pool *pool)
83 return new PluginOptEvTest1(pool);