English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReOptimizer: TOptimShare.h Source File
Uranie / ReOptimizer  v4.10.0
/* @license-end */
TOptimShare.h
Go to the documentation of this file.
1 // 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.4 $
22 // $State$
24 
32 #ifndef __TOPTIMSHARE__
33 #define __TOPTIMSHARE__
34 
35 //ROOT
36 #include "Rtypes.h"
37 #include "TNamed.h"
38 
39 // Uranie
40 #include "Reoptimizer.h"
41 #include "TMaster.h"
42 
43 #include "TDataServer.h"
44 #include "TEval.h"
45 #include "TOptimFit.h"
46 
47 namespace URANIE
48 {
49 namespace Reoptimizer
50 {
51 
52 class TOptimShare: public URANIE::Relauncher::TMaster
53 {
54 private:
55  void create();
56 
57 protected:
58  //int _gene, _hide;
59  double _prec;
60  TObjArray _const;
61  URANIE::DataServer::TDataServer *_tdstrc;
62  int _idtrc;
63  Bool_t _blog;
64 
65  void initTrace();
66 
67 public:
68  TOptimShare(URANIE::DataServer::TDataServer *tds,
69  URANIE::Relauncher::TRun *run);
70  TOptimShare(URANIE::DataServer::TDataServer *tds,
71  URANIE::Relauncher::TEval *fun);
72  virtual ~TOptimShare();
73 
74  // initialisation
75  virtual void addObjective(URANIE::DataServer::TAttribute *, TOptimFit *f =
76  NULL) = 0;
77  void addConstraint(URANIE::DataServer::TAttribute *, TOptimFit *f = NULL);
79  void setTolerance(double prec)
80  {
81  _prec = prec;
82  }
83  double getTolerance()
84  {
85  return _prec;
86  }
87 
88  void setTrace(URANIE::DataServer::TDataServer *tds) { _tdstrc = tds; }
89 
91  //virtual void solverLoop(URANIE::Relauncher::TRun *) = 0;
92  //---------------------------------------------
96  void setLog()
97  {
98  _blog = kTRUE;
99  }
100  void unsetLog()
101  {
102  _blog = kFALSE;
103  }
104  void changeLog()
105  {
106  _blog = _blog ? kFALSE : kTRUE;
107  }
108  Bool_t getLog()
109  {
110  return _blog;
111  }
113 
114  ClassDef(URANIE::Reoptimizer::TOptimShare, ID_REOPTIMIZER)
115 };
116 
117 }
118 } //namespace
119 
120 #endif
Definition: TCMAES.h:66
objectifs et contraintes standards
TObjArray _const
Definition: TOptimShare.h:60
int _idtrc
Definition: TOptimShare.h:62
double _prec
Definition: TOptimShare.h:59
void create()
Definition: TOptimShare.cxx:112
Bool_t getLog()
Definition: TOptimShare.h:108
Definition: TOptimShare.h:52
Definition: TOptimFit.h:47
virtual ~TOptimShare()
Definition: TOptimShare.cxx:102
TOptimShare(URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run)
Definition: TOptimShare.cxx:47
void changeLog()
Definition: TOptimShare.h:104
Bool_t _blog
Definition: TOptimShare.h:63
void setTrace(URANIE::DataServer::TDataServer *tds)
Definition: TOptimShare.h:88
void addConstraint(URANIE::DataServer::TAttribute *, TOptimFit *f=NULL)
Definition: TOptimShare.cxx:125
URANIE::DataServer::TDataServer * _tdstrc
Definition: TOptimShare.h:61
void setLog()
Definition: TOptimShare.h:96
void initTrace()
Definition: TOptimShare.cxx:133
void unsetLog()
Definition: TOptimShare.h:100
virtual void addObjective(URANIE::DataServer::TAttribute *, TOptimFit *f=NULL)=0
void setTolerance(double prec)
Set the mono precision stop threshold.
Definition: TOptimShare.h:79
double getTolerance()
Definition: TOptimShare.h:83