English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReOptimizer: TVizirGenetic.h Source File
Uranie / ReOptimizer v4.9.0
/* @license-end */
TVizirGenetic.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2024 CEA/DES
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or any
7// later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
18// $Id$
19// $Author$
20// $Date$
21// $Revision 1.2 $
22// $State$
24
32#ifndef __TVIZIR__
33#define __TVIZIR__
34
35//ROOT
36#include "Rtypes.h"
37#include "TNamed.h"
38
39// Uranie
40#include "Reoptimizer.h"
41#include "TVizirSolver.h"
42
43//struct vizir;
44struct vzrcrossoverbuild;
45
46namespace URANIE
47{
48namespace Reoptimizer
49{
50
52{
53public:
55 {
56 }
57 virtual struct vzrcrossoverbuild *crossover() = 0;
58
59 ClassDef(URANIE::Reoptimizer::TVizirCrossover, ID_REOPTIMIZER)
60};
61
63{
64protected:
65 //struct vizir *_viz;
68 Bool_t _blog, _coded;
69
70public:
72 virtual ~TVizirGenetic();
73
74 // set specific parameter
76 void setSurvivalRate(double val)
77 {
78 _survie = val;
79 }
81 void setHomozygoteRate(double val)
82 {
83 _zygotie = val;
84 }
86 void setMutationRate(double val)
87 {
88 _mutation = val;
89 }
91 void setCrossover(TVizirCrossover *val, Bool_t coded=kFALSE);
92
93 // protocole
94 virtual struct vzragent *build(int, int, int, double);
95 virtual Bool_t isCoded() {return _coded;}
96
97 void fitnessChanged(struct vzragent *);
98
99 //---------------------------------------------
103 void setLog()
104 {
105 _blog = kTRUE;
106 }
107 void unsetLog()
108 {
109 _blog = kFALSE;
110 }
112 {
113 _blog = _blog ? kFALSE : kTRUE;
114 }
115 Bool_t getLog()
116 {
117 return _blog;
118 }
120
121 virtual void printLog(Option_t *option = "");
123
124 ClassDef(URANIE::Reoptimizer::TVizirGenetic, ID_REOPTIMIZER)
125};
126
127}
128} //namespace
129#endif
classe abstraite et racine pour les solvers de Vizir
Definition TVizirGenetic.h:52
virtual struct vzrcrossoverbuild * crossover()=0
virtual ~TVizirCrossover()
Definition TVizirGenetic.h:54
Definition TVizirGenetic.h:63
void fitnessChanged(struct vzragent *)
Definition TVizirGenetic.cxx:106
Bool_t getLog()
Definition TVizirGenetic.h:115
TVizirCrossover * _cross
Definition TVizirGenetic.h:66
Bool_t _coded
Definition TVizirGenetic.h:68
void setSurvivalRate(double val)
Set the survival rate.
Definition TVizirGenetic.h:76
void setMutationRate(double val)
Set the probability of mutation.
Definition TVizirGenetic.h:86
void changeLog()
Definition TVizirGenetic.h:111
double _zygotie
Definition TVizirGenetic.h:67
void setHomozygoteRate(double val)
Set the proba of homozigotie.
Definition TVizirGenetic.h:81
void setLog()
Definition TVizirGenetic.h:103
double _mutation
Definition TVizirGenetic.h:67
double _survie
Definition TVizirGenetic.h:67
virtual struct vzragent * build(int, int, int, double)
Definition TVizirGenetic.cxx:74
void unsetLog()
Definition TVizirGenetic.h:107
void setCrossover(TVizirCrossover *val, Bool_t coded=kFALSE)
Set crossover.
Definition TVizirGenetic.cxx:99
virtual Bool_t isCoded()
Definition TVizirGenetic.h:95
virtual ~TVizirGenetic()
Definition TVizirGenetic.cxx:69
virtual void printLog(Option_t *option="")
print log
Definition TVizirGenetic.cxx:112
Bool_t _blog
Definition TVizirGenetic.h:68
TVizirGenetic()
Definition TVizirGenetic.cxx:60
Definition TVizirSolver.h:78
Definition TCMAES.h:70