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.9.0
/* @license-end */
TOptimShare.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.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
47namespace URANIE
48{
49namespace Reoptimizer
50{
51
52class TOptimShare: public URANIE::Relauncher::TMaster
53{
54private:
55 void create();
56
57protected:
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
67public:
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 }
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
objectifs et contraintes standards
Definition TOptimFit.h:48
Definition TOptimShare.h:53
void setLog()
Definition TOptimShare.h:96
URANIE::DataServer::TDataServer * _tdstrc
Definition TOptimShare.h:61
void create()
Definition TOptimShare.cxx:112
virtual ~TOptimShare()
Definition TOptimShare.cxx:102
Bool_t _blog
Definition TOptimShare.h:63
double _prec
Definition TOptimShare.h:59
double getTolerance()
Definition TOptimShare.h:83
void addConstraint(URANIE::DataServer::TAttribute *, TOptimFit *f=NULL)
Definition TOptimShare.cxx:125
void initTrace()
Definition TOptimShare.cxx:133
Bool_t getLog()
Definition TOptimShare.h:108
virtual void addObjective(URANIE::DataServer::TAttribute *, TOptimFit *f=NULL)=0
TObjArray _const
Definition TOptimShare.h:60
void setTolerance(double prec)
Set the mono precision stop threshold.
Definition TOptimShare.h:79
void changeLog()
Definition TOptimShare.h:104
void unsetLog()
Definition TOptimShare.h:100
void setTrace(URANIE::DataServer::TDataServer *tds)
Definition TOptimShare.h:88
int _idtrc
Definition TOptimShare.h:62
Definition TCMAES.h:70