English Français

Documentation / Manuel développeur

Modules disponibles

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

Description of the class TMaxiMinLHS. More...

#include <TMaxiMinLHS.h>

Inheritance diagram for URANIE::Sampler::TMaxiMinLHS:
Collaboration diagram for URANIE::Sampler::TMaxiMinLHS:

Public Member Functions

Constructor and Destructor
 TMaxiMinLHS (URANIE::DataServer::TDataServer *tds, int sampleSize, double sainitTemp, double saCoeff, int saN, int sainnerN)
 Creates a TMaxiMinLHS object from a TDataServer, definig the SA properties

 
virtual ~TMaxiMinLHS ()
 Default destructor.
 
Generate the sample
void generateSample (Option_t *option="")
 Generates the sample.
 
void setSeed (Int_t ind=0)
 Set the random generator seed.
 
void transformMatrix (TMatrixD &RefMat, bool toProbaSpace)
 transform the sample
 
virtual void fillOtherAttributes ()
 Fills the TAttributeFormula and totally correlated attributes.
 
Printing Log
virtual void printLog (Option_t *option="")
 Prints the log.
 
void createTuple ()
 Creates the TDSNtupleD of data with only the TStochasticAttributes.
 
- Public Member Functions inherited from URANIE::Sampler::TSamplerStochastic
 TSamplerStochastic (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul)
 Constructor with a dataserver.
 
virtual ~TSamplerStochastic ()
 Default destructor.
 
void setSeed (Int_t ind=0)
 Init the seed.
 
Int_t getSeed ()
 Returns the seed value.
 
- 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.
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 

Public Attributes

main parameters
double _SAinitTemp
 Initial temperature of the simulated Annealing algorithm for maximin lhs.
 
double _SACoeff
 Temperature coefficient of the simulated Annealing algorithm for maximin lhs.
 
unsigned int _SAN
 Number of iteration the simulated Annealing algorithm for maximin lhs.
 
unsigned int _SAinnerN
 Inner Number of iteration before changing the temperature of the simulated Annealing algorithm for maximin lhs.
 
internal variables
bool _bAlreadyFilled
 If the tree is already filled.
 
TMatrixD _currentLHS
 
TMatrixD _varyingLHS
 
TMatrixD _currentDist
 
TMatrixD _varyingDist
 
TMatrixD _fp
 
TSampling_sampling
 Pointer to a TSampling object if tds is empty;.
 
unsigned int _ns
 
unsigned int _nx
 Local counter for number of samples and variables.
 
double * _vi
 
double * _vj
 arrays used throughout many calculations
 
- 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.
 

Method for the LHS_maximin producation

Double_t getLPNorm (const TMatrixD &Dist_)
 Compute the Lp norm.
 
Double_t getUpdatedLPNorm (Double_t LP_norm_, unsigned int nrowRand1_, unsigned int nrowRand2_)
 update the Lp norm
 
TMatrixD maximinSA_LHS (const TMatrixD &lhs)
 Generate the new LHS.
 
void setSAProperties (double &sainitTemp, double &saCoeff, int &saN, int &sainnerN)
 Set the Simulated Annealing algorithm properties.
 
void Permutation (unsigned int &ncolRand, unsigned int &nrowRand1, unsigned int &nrowRand2)
 Permute the content of the lhs plan.
 
static Double_t getMinDist (const TMatrixD &lhs)
 Compute the minimal distance between points.
 
static void getDistMatrix (TMatrixD &Dist, const TMatrixD &lhs)
 Compute the distance matrix.
 

Additional Inherited Members

- Protected Member Functions inherited from URANIE::Sampler::TSamplerStochastic
virtual void init ()
 The preprocessing step.
 
virtual void terminate ()
 The post-processing step.
 
- Protected Attributes inherited from URANIE::Sampler::TSamplerStochastic
Int_t _nSeed
 

Detailed Description

Description of the class TMaxiMinLHS.

This class is used to produce a maximin lhs doe. It starts either with an empy tds or an already filled one, with the hypothesis that it has been filled with an LHS doe

An simulated annealing algorithm is implemented here to deal with the permutation. This implementation has be done by Guillaume Damblin.

Constructor & Destructor Documentation

◆ TMaxiMinLHS()

URANIE::Sampler::TMaxiMinLHS::TMaxiMinLHS ( URANIE::DataServer::TDataServer *  tds,
int  sampleSize,
double  sainitTemp,
double  saCoeff,
int  saN,
int  sainnerN 
)

Creates a TMaxiMinLHS object from a TDataServer, definig the SA properties

none of these is given, "lhs" is chosen.

Parameters
tds(TDataServer *) pointer to the TDataServer.
sampleSize(Int_t) number of values to generate for each random variable.
sainitTemp(double): initial temperature for simulated annealing algo (see methodology for explanation)
saCoeff(double): coefficient used to decrease temperature for simulated annealing algo (see methodology for explanation)
saN(int): number of iterations in the outer loop for simulated annealing algo (see methodology for explanation)
sinneraN(int): number of iterations in the inner loop for simulated annealing algo (see methodology for explanation)
Exceptions
UErrorExceptionsif sampleSize <= 0

Referenced by ClassImp().

◆ ~TMaxiMinLHS()

virtual URANIE::Sampler::TMaxiMinLHS::~TMaxiMinLHS ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ createTuple()

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

Creates the TDSNtupleD of data with only the TStochasticAttributes.

Reimplemented from URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ fillOtherAttributes()

virtual void URANIE::Sampler::TMaxiMinLHS::fillOtherAttributes ( )
virtual

Fills the TAttributeFormula and totally correlated attributes.

Reimplemented from URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ generateSample()

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

Generates the sample.

Generates the random data and fills the TDataServer with it.

Parameters
option(Option_t *) option string (Default = "")

Implements URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ getDistMatrix()

static void URANIE::Sampler::TMaxiMinLHS::getDistMatrix ( TMatrixD &  Dist,
const TMatrixD &  lhs 
)
static

Compute the distance matrix.

Compute the distance matrix

Parameters
Dist(TMatrixD) the distance matrix of the lhs plan under study
lhs(TMatrixD) the lhs plan under study

Referenced by ClassImp().

◆ getLPNorm()

Double_t URANIE::Sampler::TMaxiMinLHS::getLPNorm ( const TMatrixD &  Dist_)

Compute the Lp norm.

Compute the Lp norm

Parameters
lhs(TMatrixD) the distance matrix of the lhs plan under study

Referenced by ClassImp().

◆ getMinDist()

static Double_t URANIE::Sampler::TMaxiMinLHS::getMinDist ( const TMatrixD &  lhs)
static

Compute the minimal distance between points.

Compute the minimal distance between points

Parameters
lhs(TMatrixD) the lhs plan under study

Referenced by ClassImp().

◆ getUpdatedLPNorm()

Double_t URANIE::Sampler::TMaxiMinLHS::getUpdatedLPNorm ( Double_t  LP_norm_,
unsigned int  nrowRand1_,
unsigned int  nrowRand2_ 
)

update the Lp norm

Update the Lp norm

Parameters
lhs(TMatrixD) the distance matrix of the lhs plan under study

Referenced by ClassImp().

◆ maximinSA_LHS()

TMatrixD URANIE::Sampler::TMaxiMinLHS::maximinSA_LHS ( const TMatrixD &  lhs)

Generate the new LHS.

Generate a new lhs doe by doing all the permutation allowed by the Simulated Annealing algorithm. The method requires four parameters that shoud be set by setSAProperties()

Parameters
lhs(TMatrixD) the lhs plan under study

Referenced by ClassImp().

◆ Permutation()

void URANIE::Sampler::TMaxiMinLHS::Permutation ( unsigned int &  ncolRand,
unsigned int &  nrowRand1,
unsigned int &  nrowRand2 
)

Permute the content of the lhs plan.

Permute the content of the lhs plan

Parameters
lhs_new(TMatrixD) the new lhs after permutation
lhs(TMatrixD) the lhs plan under study

Referenced by ClassImp().

◆ printLog()

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

Prints the log.

Parameters
option(Option_t *) option string (Default = "")

Reimplemented from URANIE::Sampler::TSamplerStochastic.

Referenced by ClassImp().

◆ setSAProperties()

void URANIE::Sampler::TMaxiMinLHS::setSAProperties ( double &  sainitTemp,
double &  saCoeff,
int &  saN,
int &  sainnerN 
)

Set the Simulated Annealing algorithm properties.

Set the Simulated Annealing algorithm properties

Parameters
sainitTemp(double) Initial temperature of the simulated Annealing algorithm for maximin lhs
saCoeff(double) Temperature coefficient of the simulated Annealing algorithm for maximin lhs
saN(double) Number of iteration of the simulated Annealing algorithm for maximin lhs
sainnerN(double) Inner Number of iteration before changing the temperature of the simulated Annealing algorithm for maximin lhs

Referenced by ClassImp().

◆ setSeed()

void URANIE::Sampler::TMaxiMinLHS::setSeed ( Int_t  ind = 0)

Set the random generator seed.

Referenced by ClassImp().

◆ transformMatrix()

void URANIE::Sampler::TMaxiMinLHS::transformMatrix ( TMatrixD &  RefMat,
bool  toProbaSpace 
)

transform the sample

Tranform the sample from the probability space to the physical one depending on the boolean

Parameters
RefMat: the reference TMatrixD containing the information
toProbaSpacea boolean to state whether transformation should be done to the probability space or from it

Referenced by ClassImp().

Member Data Documentation

◆ _bAlreadyFilled

bool URANIE::Sampler::TMaxiMinLHS::_bAlreadyFilled

If the tree is already filled.

Referenced by ClassImp().

◆ _currentDist

TMatrixD URANIE::Sampler::TMaxiMinLHS::_currentDist

Referenced by ClassImp().

◆ _currentLHS

TMatrixD URANIE::Sampler::TMaxiMinLHS::_currentLHS

Referenced by ClassImp().

◆ _fp

TMatrixD URANIE::Sampler::TMaxiMinLHS::_fp

Referenced by ClassImp().

◆ _ns

unsigned int URANIE::Sampler::TMaxiMinLHS::_ns

Referenced by ClassImp().

◆ _nx

unsigned int URANIE::Sampler::TMaxiMinLHS::_nx

Local counter for number of samples and variables.

Referenced by ClassImp().

◆ _SACoeff

double URANIE::Sampler::TMaxiMinLHS::_SACoeff

Temperature coefficient of the simulated Annealing algorithm for maximin lhs.

Referenced by ClassImp().

◆ _SAinitTemp

double URANIE::Sampler::TMaxiMinLHS::_SAinitTemp

Initial temperature of the simulated Annealing algorithm for maximin lhs.

Referenced by ClassImp().

◆ _SAinnerN

unsigned int URANIE::Sampler::TMaxiMinLHS::_SAinnerN

Inner Number of iteration before changing the temperature of the simulated Annealing algorithm for maximin lhs.

Referenced by ClassImp().

◆ _sampling

TSampling* URANIE::Sampler::TMaxiMinLHS::_sampling

Pointer to a TSampling object if tds is empty;.

Referenced by ClassImp().

◆ _SAN

unsigned int URANIE::Sampler::TMaxiMinLHS::_SAN

Number of iteration the simulated Annealing algorithm for maximin lhs.

Referenced by ClassImp().

◆ _varyingDist

TMatrixD URANIE::Sampler::TMaxiMinLHS::_varyingDist

Referenced by ClassImp().

◆ _varyingLHS

TMatrixD URANIE::Sampler::TMaxiMinLHS::_varyingLHS

Referenced by ClassImp().

◆ _vi

double* URANIE::Sampler::TMaxiMinLHS::_vi

Referenced by ClassImp().

◆ _vj

double * URANIE::Sampler::TMaxiMinLHS::_vj

arrays used throughout many calculations

Referenced by ClassImp().