English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: URANIE::Sampler::TOATSampling Class Reference
Uranie / Sampler v4.9.0
/* @license-end */
URANIE::Sampler::TOATSampling Class Reference

This class creates a "One factor At a Time" design of experiment. It has been developped mainly for finite differences sensitivity computation. More...

#include <TOATSampling.h>

Inheritance diagram for URANIE::Sampler::TOATSampling:
Collaboration diagram for URANIE::Sampler::TOATSampling:

Public Member Functions

Constructor and Destructor
 TOATSampling (URANIE::DataServer::TDataServer *tds, Option_t *option="steps=1%")
 Constructor of the OAT sampler.
 
virtual ~TOATSampling ()
 Default destructor.
 
Getting and setting parameters
virtual Double_t getStepSizeParameter ()
 Get the step size parameter.
 
virtual TString getSamplingMode ()
 Get OAT sampling mode.
 
virtual Bool_t isPercentMode ()
 
virtual void setOption (Option_t *option)
 Set the step size parameter.
 
Double_t getStepPrecision ()
 getStepPrecision
 
void setStepPrecision (Double_t dval)
 
Generation of the sample
virtual void createTuple ()
 Create the data tree for the data server.
 
virtual void generateSample (Option_t *option="")
 Generates the sample.
 
Printing Log
virtual void printLog (Option_t *option="")
 Prints the log.
 
- Public Member Functions inherited from URANIE::Sampler::TSamplerDeterminist
 TSamplerDeterminist (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t ns)
 Constructor with a dataserver.
 
virtual ~TSamplerDeterminist ()
 Default destructor.
 
- Public Member Functions inherited from URANIE::Sampler::TSampler
 TSampler (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul)
 Constructor with a TDataServer, the options and the size of the sample.
 
virtual ~TSampler ()
 Default destructor.
 
Int_t GetID ()
 Returns the ID of the class.
 
void setMethodName (TString str)
 Sets the method name in a global variable.
 
TString getMethodName ()
 Gets the method name.
 
virtual URANIE::DataServer::TDataServer * getTDS ()
 Return the TDS filling by the sampling algorithm.
 
void parseOption (Option_t *option)
 Parse the option.
 
virtual void createListOfAttributes ()
 Creates the List of attributes to simulate.
 
URANIE::DataServer::TDSNtupleD * getTuple ()
 Returns the TDSNtupleD of data.
 
virtual void fillOtherAttributes ()
 Fills the TDSNtupleD of data with other TFormulaAttributes.
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 

Private Attributes

Double_t _dstepSize
 
TString _smode
 
Bool_t _bisPercent
 
Double_t _dStepPrecision
 

Additional Inherited Members

- Public Attributes inherited from URANIE::Sampler::TSampler
Int_t _nS
 The size of the sample.
 
Int_t _nX
 The size of attributes to sample.
 
URANIE::DataServer::TDSNtupleD * _ntsample
 the tntuple of data
 
TString _sMethod
 The title of the sampler method.
 
Bool_t _blog
 Log Printing.
 
Bool_t _bupdateFile
 Update the back up file when generating the attributeformula if there is some.
 
URANIE::DataServer::TDataServer * _tds
 Pointer to a TDS.
 
TList * _lstOfAttributesToSample
 The list of Stochastic Attributes to sample.
 

Detailed Description

This class creates a "One factor At a Time" design of experiment. It has been developped mainly for finite differences sensitivity computation.

The principle of the OAT design of experiment is to modify only one attribute at a time, all the other factors being kept at a nominal (default) value. This is the simplest way to compute partial derivatives or sensitivities. For the latter application however, it might not be the best solution as this approach does not explore multi-factorial effects.

The first point of the design always corresponds to all the attributes set to their nominal value. Then, depending on the application, the following options are available:

  • "minmax": the varying attribute will take its maximum and minimum values. All the others are given their nominal value.
  • "steps=x": the varying attribute will move around its nominal value by a given step "x", usually small. "x" can either be a real value (e.g. "steps=3.1415") or a percentage of the nominal value (e.g. "steps=0.123%"). This variation step will be applied to all the attributes. Please note that if the modified value
    is outside of the attribute's range of variation, the value of the relevant boundary will be used instead.

As a result, an OAT design of experiment will provide 2*n+1 realisations of the input variables, n being the number of attributes to sample.

Note
When the sampling is created, two attributes are added:
  • nominal_set: so far it is always set to 1. This attribute will be used when the variables can vary around more than one nominal value.
  • modified_att: for a given realisation of the sampling, its value is the index of the attribute that is modified. This index starts from 1. if modified_att is 0, it means that all the attributes are set to their nominal value.

Constructor & Destructor Documentation

◆ TOATSampling()

URANIE::Sampler::TOATSampling::TOATSampling ( URANIE::DataServer::TDataServer *  tds,
Option_t *  option = "steps=1%" 
)

Constructor of the OAT sampler.

Parameters
tds(URANIE::DataServer::TDataServer*) Data server containing the attributes.
option(Option_t*) If option contains "minmax", the min and max values of the attributes are used. If it contains "steps=X", the attributes values are the default value plus or minus X. If it contains "steps=X%", the attributes values are the default value plus or minus X percent of the default value (Default = "steps=1%").
Exceptions
UErrorExceptionsif option is "minmax" and some attributes are unbounded.
UErrorExceptionsif option is "steps" and some attributes have no default value.

Referenced by ClassImp().

◆ ~TOATSampling()

virtual URANIE::Sampler::TOATSampling::~TOATSampling ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ createTuple()

virtual void URANIE::Sampler::TOATSampling::createTuple ( )
virtual

Create the data tree for the data server.

Reimplemented from URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ generateSample()

virtual void URANIE::Sampler::TOATSampling::generateSample ( Option_t *  option = "")
virtual

Generates the sample.

This function creates the OAT sampling data.

Parameters
option(Option_t *) If option contains "in=" or "inputs=" followed by list of attribute names separated by colons, only the attributes listed will vary during the OAT sampling (provided they exist in the TDS, of course...).

Implements URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ getSamplingMode()

virtual TString URANIE::Sampler::TOATSampling::getSamplingMode ( )
inlinevirtual

Get OAT sampling mode.

References _smode.

◆ getStepPrecision()

Double_t URANIE::Sampler::TOATSampling::getStepPrecision ( )
inline

getStepPrecision

Returns
(Double_t) the step precision value where to change with the step value in the TAttribute

References _dStepPrecision.

◆ getStepSizeParameter()

virtual Double_t URANIE::Sampler::TOATSampling::getStepSizeParameter ( )
inlinevirtual

Get the step size parameter.

References _dstepSize.

◆ isPercentMode()

virtual Bool_t URANIE::Sampler::TOATSampling::isPercentMode ( )
inlinevirtual

Get the boolean

References _bisPercent.

◆ printLog()

virtual void URANIE::Sampler::TOATSampling::printLog ( Option_t *  option = "")
virtual

Prints the log.

Reimplemented from URANIE::Sampler::TSamplerDeterminist.

Referenced by ClassImp().

◆ setOption()

virtual void URANIE::Sampler::TOATSampling::setOption ( Option_t *  option)
virtual

Set the step size parameter.

This function sets the values of the _dstepSize and _smode variables after parsing the option string.

Parameters
option(Option_t *) If option contains "minmax", the min and max values of the attributes are used. If it contains "steps=X", the attributes values are the default value plus or minus X. If it contains "steps=X%", the attributes values are the default value plus or minus X percent of the default value (Default = "steps=1%").

Referenced by ClassImp().

◆ setStepPrecision()

void URANIE::Sampler::TOATSampling::setStepPrecision ( Double_t  dval)
inline

References _dStepPrecision.

Member Data Documentation

◆ _bisPercent

Bool_t URANIE::Sampler::TOATSampling::_bisPercent
private

Referenced by ClassImp(), and isPercentMode().

◆ _dStepPrecision

Double_t URANIE::Sampler::TOATSampling::_dStepPrecision
private

◆ _dstepSize

Double_t URANIE::Sampler::TOATSampling::_dstepSize
private

Referenced by ClassImp(), and getStepSizeParameter().

◆ _smode

TString URANIE::Sampler::TOATSampling::_smode
private

Referenced by ClassImp(), and getSamplingMode().