diff --git a/source/trunk/Model/XS/XSM_CLOSEST.hxx b/source/trunk/Model/XS/XSM_CLOSEST.hxx index 699c69cdfa12b79179797ef3970d7efeed254eb2..65d1204657160bce7e917f09695fc00bc99fdfcb 100644 --- a/source/trunk/Model/XS/XSM_CLOSEST.hxx +++ b/source/trunk/Model/XS/XSM_CLOSEST.hxx @@ -23,9 +23,17 @@ using namespace std; //-----------------------------------------------------------------------------// /*! Define a XSM_CLOSEST. - CLASS to get cross sections from a set of pre-calculation - (with MURE,or other depletion code) - get cross sections of the closest (in composition) calculation + Class to get cross sections from a set of pre-calculation + (with MURE,or other depletion code). +With this class, cross sections needed to solves Bateman equation come from an + already performed depletion calculation contained in a set of many depletion calculations. + The way to pick up these or these depletion calculation is related to a distance : + The depletion calculation (or EvolutionData) the closest from the new fresh fuel composition + is selected. Different distances are defined : + + \li Standard euclidean distance (weights : 1) IS THE DEFAULT + \li Euclidean distance with weights assigned according mean cross section values + \li Euclidean distance with weights assigned by user @authors BaM,BLG @version 1.0 @@ -42,10 +50,32 @@ class XSM_CLOSEST : public XSModel \name Constructor/Desctructor */ //@{ + + //{ + /// normal constructor + // + /*! + Make a new XSM_CLOSEST + \param DB_index_file : File listing the path of all depletion calculations (in EvolutionData format (.dat file) ) + \param oldreadmethod : + */ XSM_CLOSEST(string DB_index_file, bool oldreadmethod = false ); + //} + + //{ + /// Logger constructor + // + /*! + Make a new XSM_CLOSEST + \param log : Use for the log + \param DB_index_file : File listing the path of all depletion calculations (in EvolutionData format (.dat file) ) + \param oldreadmethod : + */ XSM_CLOSEST(CLASSLogger* Log, string DB_index_file, bool oldreadmethod = false ); + //} + ~XSM_CLOSEST(); - //{ + //@} //********* Get Method *********// @@ -53,15 +83,15 @@ class XSM_CLOSEST : public XSModel \name Get Method */ //@{ - virtual EvolutionData GetCrossSections(IsotopicVector isotopicvector,double t=0) ; //!< Reason to live of this CLASS Return the closest Evolutiondata + virtual EvolutionData GetCrossSections(IsotopicVector isotopicvector,double t=0) ; //!< Reason to live of this CLASS : Return the closest Evolutiondata vector< EvolutionData > GetFuelDataBank() const { return fFuelDataBank; } //!< Return the FuelDataBank string GetDataBaseIndex() const { return fDataBaseIndex; } //!< Return the index Name string GetFuelType() const { return fFuelType; } //!< Return the fuel type of the DB - vector<double> GetFuelParameter() const { return fFuelParameter; } //!< Return the Fuel parameter of the DB - pair<double,double> GetBurnUpRange() const { return fBurnUpRange;} //!< Return the BurnUp range of the DB - bool IsDefine(IsotopicVector IV) const; //!< True the key is define, false unstead + vector<double> GetFuelParameter() const { return fFuelParameter; } //!< Return the Fuel parameters of the DB + pair<double,double> GetBurnUpRange() const { return fBurnUpRange;} //!< Return the Burnup range of the DB + bool IsDefine(IsotopicVector IV) const; //!< True if the key is define, false instead - map<double, int> GetDistancesTo(IsotopicVector isotopicvector, double t = 0); //! Return a map containing the distance of each EvolutionData in the DataBase to the set IV at the t time + map<double, int> GetDistancesTo(IsotopicVector isotopicvector, double t = 0); //! Return a map containing the distance of each EvolutionData in the DataBase to the set IV at the time t //@} //********* Set Method *********// @@ -74,19 +104,19 @@ class XSM_CLOSEST : public XSModel void SetFuelDataBank(vector< EvolutionData > mymap) { fFuelDataBank = mymap; } //!< Set the FuelDataBank map void SetDataBaseIndex(string database) { fDataBaseIndex = database;; ReadDataBase(); } //!< Set the Name of the database index - void SetOldReadMethod(bool val) { fOldReadMethod = val; ReadDataBase();} ///< use the old reading method - + void SetOldReadMethod(bool val) { fOldReadMethod = val; ReadDataBase();} //!< use the old reading method - void SetWeightedDistanceCalculation(bool val = true) { fWeightedDistance = val;} ///< Set weighted Distance calculation - void SetInventoryEvolutionInterpolation(bool val = true) { fEvolutionDataInterpolation = val;} ///< Set weighted Distance calculation - void SetDistanceParameter(IsotopicVector DistanceParameter); ///< Define mannually the weight for each ZAI in the distance calculation + void SetWeightedDistanceCalculation(bool val = true) { fWeightedDistance = val;} //!< Set weighted distance calculation + void SetInventoryEvolutionInterpolation(bool val = true) { fEvolutionDataInterpolation = val;} //!< \deprecated The 64 closest EvolutionData (ED) are used to build a new ED. The cross section from each ED are weighted according to their distance + void SetDistanceParameter(IsotopicVector DistanceParameter); //!< Define mannually the weight for each ZAI in the distance calculation + //@} //{ - /// Define the way to decide if two isotopic vectors are close. + /// Choose the way to calculate the distance between two isotopic vectors. /*! - // The different algorythm are: + // The different algorythms are: // \li 0 is for the standard norme, // \li 1 for each ZAI weighted with its XS, // \li 2 for each ZAI weighted with coefficient given by the user. @@ -99,34 +129,34 @@ class XSM_CLOSEST : public XSModel \name Other Method */ //@{ - void ReadDataBase(); ///< read the index file and fill the evolutionData map - void CalculateDistanceParameter(); ///< Calcul of the weight for each ZAI in the distance calculation from the mean XS of the FuelDataBank + void ReadDataBase(); //!< read the index file and fill the evolutionData map + void CalculateDistanceParameter(); //!< Calcul of the weight for each ZAI in the distance calculation from the mean XS of the FuelDataBank //@} private : - vector< EvolutionData > fFuelDataBank; ///< DataBanck map + vector< EvolutionData > fFuelDataBank; //!< DataBank map - string fDataBaseIndex; ///< Name of the index + string fDataBaseIndex; //!< Name of the index - bool fOldReadMethod; ///< use old DB format - bool fWeightedDistance; ///< USe XS weighted distance calculation - bool fEvolutionDataInterpolation; ///< USe XS weighted distance calculation + bool fOldReadMethod; //!< use old DB format + bool fWeightedDistance; //!< USe XS weighted distance calculation + bool fEvolutionDataInterpolation; //!< USe XS weighted distance calculation - string fFuelType; ///< Type of fuel of the FuelDataBank - pair<double,double> fBurnUpRange; ///< Range of the Burn-up range of the FuelDataBank - vector<double> fFuelParameter; ///< Parameter needed by the equivalence model + string fFuelType; //!< Type of fuel of the FuelDataBank + pair<double,double> fBurnUpRange; //!< Range of the Burn-up range of the FuelDataBank + vector<double> fFuelParameter; //!< Parameter needed by the equivalence model - int fDistanceType; ///< Set the distance calculation algorytm + int fDistanceType; //!< Set the distance calculation algorythm /// \li 0 is for the standard norm (Default = 0), /// \li 1 for each ZAI weighted with its XS, /// \li 2 for each ZAI weighted with coefficient given by the user. - IsotopicVector fDistanceParameter; ///< weight for each ZAI in the distance calculation + IsotopicVector fDistanceParameter; //!< weight for each ZAI in the distance calculation }; diff --git a/source/trunk/Model/XS/XSM_MLP.hxx b/source/trunk/Model/XS/XSM_MLP.hxx index 1c16e02f55f15e1d9ed24c74f01fc1fd6f01789f..03317a99ad8d31d4efe19a622f9488752185a393 100644 --- a/source/trunk/Model/XS/XSM_MLP.hxx +++ b/source/trunk/Model/XS/XSM_MLP.hxx @@ -24,7 +24,8 @@ using namespace std; //-----------------------------------------------------------------------------// /*! Define a XSM_MLP. - This is the class to predict cross sections with a set of MultiLayerPerceptrons + This is the class to predict cross sections with a + set of Multi Layer Perceptrons (MLP) @authors BLG @version 1.0 @@ -73,14 +74,14 @@ class XSM_MLP : public XSModel private : - void GetDataBaseInformation(); //<! Read information file and fill Reactor Type, Fuel type, HM mass, Power, time vector, and TMVA input variables names + void GetDataBaseInformation(); //!< Read information file and fill Reactor Type, Fuel type, HM mass, Power, time vector, and TMVA input variables names - void GetMLPWeightFiles(); //<! Find all .xml file in TMVA_Weight_Directory + void GetMLPWeightFiles(); //!< Find all .xml file in TMVA_Weight_Directory EvolutionData GetCrossSectionsStep(IsotopicVector IV); //!< Return calculated cross section by the MLP regression when fIsTimeStep==true EvolutionData GetCrossSectionsTime(IsotopicVector IV); //!< Return calculated cross section by the MLP regression when fIsTimeStep==false - void ReadWeightFile(string Filename, int &Z, int &A, int &I, int &Reaction) ; //<! Select the reaction according to the weight file name - void ReadWeightFileStep(string Filename, int &Z, int &A, int &I, int &Reaction, int &TimeStep);; //<! Select the reaction according to the weight file name + void ReadWeightFile(string Filename, int &Z, int &A, int &I, int &Reaction) ; //!< Select the reaction according to the weight file name + void ReadWeightFileStep(string Filename, int &Z, int &A, int &I, int &Reaction, int &TimeStep);; //!< Select the reaction according to the weight file name @@ -88,20 +89,20 @@ class XSM_MLP : public XSModel TTree* CreateTMVAInputTree(IsotopicVector isotopicvector,int TimeStep=0); //!<Create input tmva tree to be read by ExecuteTMVA - vector<double> fMLP_Time; //<! Time vector of the data base - vector<string> fWeightFiles; //<! All the weight file contains in fTMVAWeightFolder + vector<double> fMLP_Time; //!< Time vector of the data base + vector<string> fWeightFiles; //!< All the weight file contains in fTMVAWeightFolder - string fTMVAWeightFolder; //<! folder containing all the weight file - string fMLPInformationFile; //<! file containing Reactor Type, Fuel type, HM mass, Power, time vector, and TMVA input variables names (looks the manual for format details) + string fTMVAWeightFolder; //!< folder containing all the weight file + string fMLPInformationFile; //!< file containing Reactor Type, Fuel type, HM mass, Power, time vector, and TMVA input variables names (looks the manual for format details) - double fDataBasePower; //<!Power of the data base (read from fMLPInformationFile ) - double fDataBaseHMMass; //<!Heavy metal mass of the data base (read from fMLPInformationFile ) - string fDataBaseFType; //<! Reactor Type (e.g PWR, FBR-Na, ADS..) - string fDataBaseRType; //<! Fuel Type (e.g MOX, UOX, ThU, ThPu ...) + double fDataBasePower; //!< Power of the data base (read from fMLPInformationFile ) + double fDataBaseHMMass; //!< Heavy metal mass of the data base (read from fMLPInformationFile ) + string fDataBaseFType; //!< Reactor Type (e.g PWR, FBR-Na, ADS..) + string fDataBaseRType; //!< Fuel Type (e.g MOX, UOX, ThU, ThPu ...) - bool fIsStepTime; //<!true if one TMVA weihgt per step time is requiered otherwise it assumes time is part of the MLP inputs + bool fIsStepTime; //!< true if one TMVA weihgt per step time is requiered otherwise it assumes time is part of the MLP inputs - map<ZAI,string> fMapOfTMVAVariableNames;//<! List of TMVA input variable names (read from fMLPInformationFile ) , name depends on the training step + map<ZAI,string> fMapOfTMVAVariableNames;//!< List of TMVA input variable names (read from fMLPInformationFile ) , name depends on the training step };