from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice, Tuple, AU_MOINS_UN, A_VALIDATOR, PROC
from Noyau.N_VALIDATOR import Valid
-def creeLienVPVI(monMC):
- if monMC.valeur == () or monMC.valeur == None : return
- print (monMC)
+#TODO --> si UserDefined et Uranie alors UserDefined
+
+#def creeLienVPVD(monMC):
+# if monMC.valeur == () or monMC.valeur == None : return
+# print (monMC)
# a faire
class infFrereMC(Valid):
#"Triangular",
"TruncatedNormal",
"Uniform",
- #"UserDefined",
+ "UserDefined",
#"Weibull",
),
#
#
-# USERDEFINED = BLOC( condition = " Distribution in ( 'UserDefined', ) ",
-#
-# # Il faut definir une collection de couples ( x,p )
-# Values = SIMP( statut = 'o',
-# typ = 'R',
-# max = '**',
-# ),
-#
-# ), # Fin BLOC USERDEFINED
-#
+def creeUserDefined ():
+ USERDEFINED = BLOC( condition = " Distribution in ( 'UserDefined', ) ",
+
+ # Il faut definir une collection de couples ( x,p )
+ Values = SIMP( statut = 'o',
+ typ = 'R',
+ max = '**',
+ ),
+
+ ) # Fin BLOC USERDEFINED
+ return USERDEFINED
+
#
#
# WEIBULL = BLOC( condition = " Distribution in ( 'Weibull', ) ",
nomBloc = 'b_Model_Variable_' + var+'_'+nomLoi
dicoDistribution[nomBloc]=bloc
lesBlocs[nomBlocVar]= BLOC(condition=laCondition, Distribution = distribution, **dicoDistribution)
- print (lesBlocs)
return lesBlocs
homo='constant',
)
laConsigne = SIMP(statut="o", homo="information", typ="TXM", defaut=' ')
- xPathVariable = SIMP(statut='d', typ='TXM', defaut=(), max='**', min=0,)# siValide=creeLienVPVI)
+ xPathVariable = SIMP(statut='d', typ='TXM', defaut=(), max='**', min=0,)
blocs=creeDistributionsSelonVariable(monDico)
# Attention
# l ordre des motclefs en 3.7 a l air de dépendre de l ordre de creation des objets
),
),
Propagation = FACT( max=1, statut ='o',
+ UncertaintyTool = SIMP ( statut = "o", typ = "TXM", into = ['Uranie', 'OpenTurns'], defaut='Uranie',position='global'),
+ Propagation_OT = BLOC( condition = "UncertaintyTool == 'OpenTurns'",
Methode = SIMP( statut = "o", typ = "TXM", max=1, into = ('Taylor', 'MonteCarlo'), defaut='Taylor'),
BlocMonteCarlo1 = BLOC ( condition = "Methode == 'MonteCarlo'",
SimulationsNumber = SIMP ( statut = "o", typ = "I", val_min = 1,
), # Fin BlocEmpiricalQuantileSettings
),# fin Result
),# fin BlocMonteCarlo2
- ), # fin Propoagation
+ ),# fin BlocOTPropagation
+ Propagation_Uranie = BLOC( condition = "UncertaintyTool == 'Uranie'",
+ Methode = SIMP( statut = "o", typ = "TXM", max=1, into = ('SRS', 'Sobol'), defaut='Sobol'),
+ ), # fin UraniePropagation
+ ), # fin Propagation
Output = FACT (max=1, statut ='o',
VariableDeSortie = FACT ( max='**', statut ='o',
NomDeLaVariable = SIMP ( statut = "o", typ = "TXM", into = listeDesVariablesSortiePossibles, defaut='Average_mass_flux'),
),
),
Execution = FACT (max=1, statut ='o',
- UncertaintyTool = SIMP ( statut = "o", typ = "TXM", into = ['Uranie', 'OpenTurns'], defaut='Uranie'),
bloc_OT = BLOC (condition = 'UncertaintyTool == "OpenTurns"',
ExecutionMode = SIMP ( statut = "o", typ = "TXM", into = ['local', 'cluster']),
NbDeBranches = SIMP ( statut = "o", typ = "I", val_min = 0, fr='nb d evaluations simultanees'),
multiJobStudy = SIMP ( statut = "o", typ = bool, defaut=False),
),
),
+ bloc_Uranie = BLOC (condition = 'UncertaintyTool == "Uranie"',
+ DOEDimensions = SIMP ( statut = "o", typ = "I"),
+ NbDeBranches = SIMP ( statut = "o", typ = "I", val_min = 0, fr='nb d evaluations simultanees'),
+ ),
),
)
return ExpressionIncertitude
+#dictTraitementsAuChargement={'ExpressionIncertitude':creeLienVPVD()}