Version: 8.3.0
SalomeTest Class Reference

#include <saclass.hxx>

Collaboration diagram for SalomeTest:

Public Member Functions

 SalomeTest (Superviseur &)
 
 ~SalomeTest (void)
 
void readFromFile (std::string)
 
void start (void)
 
void next (void)
 
void finish (void)
 
 SalomeTest (Superviseur &)
 
 ~SalomeTest (void)
 
void readFromFile (std::string)
 
void start (void)
 
void next (void)
 
void finish (void)
 

Protected Attributes

Superviseursuper
 
SpherePositifrnd1
 
Spherernd2
 
Traditionnel * st1
 
Pivot * st2
 
SalomeEventLoopdst
 
LinearDecoderdec
 
Maestromtr
 
MonoSwarm * swrm
 
Simplexsolv
 

Detailed Description

Definition at line 36 of file saclass.hxx.

Constructor & Destructor Documentation

SalomeTest::SalomeTest ( Superviseur t)

Definition at line 30 of file saclass.cxx.

References dec, dst, mtr, rnd1, rnd2, st1, st2, super, swrm, and gui.Appli::t.

31 {
32  super = &t;
33  rnd1 = (SpherePositif *) NULL;
34  st1 = (Traditionnel *) NULL;
35  rnd2 = (Sphere *) NULL;
36  st2 = (Pivot *) NULL;
37  // distribution
38  dst = (SalomeEventLoop *) NULL;
39  dec = (LinearDecoder *) NULL;
40  mtr = (Maestro *) NULL;
41  // swarm
42  swrm = (MonoSwarm *) NULL;
43 
44 }
SalomeTest::~SalomeTest ( void  )

Definition at line 46 of file saclass.cxx.

References dec, dst, mtr, rnd1, rnd2, st1, st2, and swrm.

47 {
48  delete rnd1;
49  delete rnd2;
50  delete st1;
51  delete st2;
52  // distribution
53  delete dst;
54  delete dec;
55  delete mtr;
56  // swarm
57  delete swrm;
58 }
SalomeTest::SalomeTest ( Superviseur )
SalomeTest::~SalomeTest ( void  )

Member Function Documentation

void SalomeTest::finish ( void  )
void SalomeTest::finish ( void  )

Definition at line 98 of file saclass.cxx.

References dec, Decoder::echo(), and swrm.

Referenced by Emulator::run().

99 {
100  Solution *res;
101 
102  swrm->finish();
103  res = swrm->solution();
104  dec->echo(*res);
105 }
void SalomeTest::next ( void  )
void SalomeTest::next ( void  )

Definition at line 92 of file saclass.cxx.

References swrm.

Referenced by Emulator::run().

93 {
94  int rien;
95  rien = swrm->next();
96 }
void SalomeTest::readFromFile ( std::string  )
void SalomeTest::readFromFile ( std::string  rien)

Definition at line 60 of file saclass.cxx.

References BORNEMAX, BORNEMIN, COTE, dec, dst, CORBAEngineTest::i, mtr, NBEVAL, NBGENE, PLAN, rnd1, rnd2, st1, st2, super, and swrm.

Referenced by Emulator::run().

61 {
62  std::vector<std::pair<double, double> > dom(NBGENE);
63  long i;
64 
65  // domaine de recherche
66  for (i=0; i<NBGENE; i++) {
67  dom[i].first = BORNEMIN;
68  dom[i].second = BORNEMAX;
69  }
70  // topologie
71  Plan top(COTE,COTE);
72  // operateur stochastique
73  rnd1 = new SpherePositif(NBGENE);
74  st1 = new Traditionnel(NBGENE, *rnd1);
75  rnd2 = new Sphere(NBGENE);
76  st2 = new Pivot(NBGENE, *rnd2);
77  // distribution
78  dst = new SalomeEventLoop(*super);
79  dec = new LinearDecoder(dom);
80  mtr = new Maestro((Decoder &) *dec, (Critere *) NULL, (Distrib &) *dst);
81  // swarm
82  swrm = new MonoSwarm(PLAN, NBGENE, (Topologie &) top, (Movement &) *st1, (Movement &) *st1, *mtr);
83 
84  swrm->setStop(NBEVAL);
85 }
void SalomeTest::start ( void  )
void SalomeTest::start ( void  )

Definition at line 87 of file saclass.cxx.

References swrm.

Referenced by Emulator::run().

88 {
89  swrm->start();
90 }

Member Data Documentation

LinearDecoder * SalomeTest::dec
protected

Definition at line 45 of file saclass.hxx.

Referenced by finish(), readFromFile(), SalomeTest(), and ~SalomeTest().

SalomeEventLoop * SalomeTest::dst
protected

Definition at line 44 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

Maestro * SalomeTest::mtr
protected

Definition at line 46 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

SpherePositif* SalomeTest::rnd1
protected

Definition at line 39 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

Sphere* SalomeTest::rnd2
protected

Definition at line 40 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

Simplex* SalomeTest::solv
protected

Definition at line 40 of file sasimpl.hxx.

Traditionnel* SalomeTest::st1
protected

Definition at line 41 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

Pivot* SalomeTest::st2
protected

Definition at line 42 of file saclass.hxx.

Referenced by readFromFile(), SalomeTest(), and ~SalomeTest().

Superviseur * SalomeTest::super
protected

Definition at line 38 of file saclass.hxx.

Referenced by readFromFile(), and SalomeTest().

MonoSwarm* SalomeTest::swrm
protected

Definition at line 48 of file saclass.hxx.

Referenced by finish(), next(), readFromFile(), SalomeTest(), start(), and ~SalomeTest().


The documentation for this class was generated from the following files: