# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013 EDF R&D
+# Copyright (C) 2007-2021 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
print "ListeVariablesOut= %s", ListeVariablesOut
#print "DictLois=", DictLois
self.texteSTD = defaultSTD
- self.OpenTURNS_path = appli.CONFIGURATION.OpenTURNS_path
+ self.OpenTURNS_path = appli.maConfiguration.OpenTURNS_path
# Ce dictionnaire fait la correspondance entre le mot lu dans le dictionnaire des mots-clefs et la methode a appeler
self.traitement = {
if ( self.DictMCVal.has_key( 'Type' ) ):
TypeAnalyse = self.DictMCVal[ 'Type' ]
- Traitement = None
+ traitement = None
subDict = {}
if ( self.traitement.has_key( TypeAnalyse ) ):
- (Traitement, subDict) = self.traitement[ TypeAnalyse ]
+ (traitement, subDict) = self.traitement[ TypeAnalyse ]
- if ( Traitement is not None ):
- self.texteSTD = apply( STDGenerateur.__dict__[ Traitement ], (self, subDict) )
+ if ( traitement is not None ):
+ self.texteSTD = apply( STDGenerateur.__dict__[ traitement ], (self, subDict) )
return self.texteSTD
if ( self.DictMCVal.has_key( 'Method' ) ):
Methode = self.DictMCVal[ 'Method' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( Methode ) ):
- Traitement = subDict[ Methode ]
+ traitement = subDict[ Methode ]
- if ( Traitement is not None ):
- txt += apply( STDGenerateur.__dict__[ Traitement ], (self,) )
+ if ( traitement is not None ):
+ txt += apply( STDGenerateur.__dict__[ traitement ], (self,) )
txt += self.MinMaxResult()
dictVariables = {}
for variable in self.ListeVariablesIn:
- nomVar = variable['ModelVariable'].get_name()
+ nomVar = variable['ModelVariable'].getName()
dictVariables[ nomVar ] = variable['Distribution']
i = 0
marginale = "%s_%d" % (self.variable["marginal"], i)
txt += "# Definit la loi marginale de la composante %d\n" % i
txt += "%s = %s\n" % (marginale, apply( STDGenerateur.__dict__[ loi[ 'Kind' ] ], (self, loi) ))
- txt += "%s.setName( '%s' )\n" % (marginale, conceptloi.get_name())
+ txt += "%s.setName( '%s' )\n" % (marginale, conceptloi.getName())
txt += "%s[ %d ] = '%s'\n" % (self.variable["description"], i, variable)
txt += "%s[ %d ] = Distribution( %s )\n" % (self.variable["collection"], i, marginale)
txt += "\n"
'''
nomVar = "output"
for variable in self.ListeVariablesOut:
- nomVar = variable['ModelVariable'].get_name()
+ nomVar = variable['ModelVariable'].getName()
txt = "# Definit le vecteur aleatoire de sortie\n"
txt += "%s = RandomVector( %s, %s )\n" % (self.variable["outputRandomVector"], self.variable["model"], self.variable["inputRandomVector"])
if ( self.DictMCVal.has_key( 'Method' ) ):
Methode = self.DictMCVal[ 'Method' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( Methode ) ):
- Traitement = subDict[ Methode ]
+ traitement = subDict[ Methode ]
- if ( Traitement is not None ):
+ if ( traitement is not None ):
txt += "# Etude 'Central Uncertainty'\n"
- txt += apply( STDGenerateur.__dict__[ Traitement ], (self,) )
+ txt += apply( STDGenerateur.__dict__[ traitement ], (self,) )
txt += self.Footer()
return txt
if ( self.DictMCVal.has_key( 'Method' ) ):
Methode = self.DictMCVal[ 'Method' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( Methode ) ):
- Traitement = subDict[ Methode ]
+ traitement = subDict[ Methode ]
- if ( Traitement is not None ):
- txt += apply( STDGenerateur.__dict__[ Traitement ], (self, subDict) )
+ if ( traitement is not None ):
+ txt += apply( STDGenerateur.__dict__[ traitement ], (self, subDict) )
txt += self.Footer()
return txt
if ( self.DictMCVal.has_key( 'Algorithm' ) ):
Algorithme = self.DictMCVal[ 'Algorithm' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( Algorithme ) ):
- Traitement = subDict[ Algorithme ]
+ traitement = subDict[ Algorithme ]
- if ( Traitement is not None ):
- txt = apply( STDGenerateur.__dict__[ Traitement ], (self,) )
+ if ( traitement is not None ):
+ txt = apply( STDGenerateur.__dict__[ traitement ], (self,) )
maxOuterSampling = None
if ( self.DictMCVal.has_key( 'MaximumOuterSampling' ) ):
if ( self.DictMCVal.has_key( 'OptimizationAlgorithm' ) ):
OptimizationAlgo = self.DictMCVal[ 'OptimizationAlgorithm' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( OptimizationAlgo ) ):
- Traitement = subDict[ OptimizationAlgo ]
+ traitement = subDict[ OptimizationAlgo ]
- if ( Traitement is not None ):
- txt += apply( STDGenerateur.__dict__[ Traitement ], (self,) )
+ if ( traitement is not None ):
+ txt += apply( STDGenerateur.__dict__[ traitement ], (self,) )
txt += self.OptimizerSettings()
txt += self.PhysicalStartingPoint()
if ( self.DictMCVal.has_key( 'Approximation' ) ):
Approximation = self.DictMCVal[ 'Approximation' ]
- Traitement = None
+ traitement = None
if ( subDict.has_key( Approximation ) ):
- Traitement = subDict[ Approximation ]
+ traitement = subDict[ Approximation ]
- if ( Traitement is not None ):
- txt += apply( STDGenerateur.__dict__[ Traitement ], (self,) )
+ if ( traitement is not None ):
+ txt += apply( STDGenerateur.__dict__[ traitement ], (self,) )
txt += self.RunAlgorithm()
txt += self.AnalyticalResult()