#
#
-# 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', ) ",
return lesBlocs
+def creeOutput(monDicoVarSortie):
+ intoVariable=list(monDicoVarSortie.keys())
+ if len(intoVariable) == 1 :
+ listeDesVariablesSortiePossibles = monDicoVarSortie[list(monDicoVarSortie.keys())[0]]
+ output = FACT (max=1, statut ='o',
+ VariableDeSortie = FACT ( max='**', statut ='o',
+ Physique = SIMP (statut = "o", typ = "TXM",into = intoVariable,defaut=intoVariable[0]),
+ NomDeLaVariable = SIMP ( statut = "o", typ = "TXM", into = listeDesVariablesSortiePossibles),
+ FonctionDAggregation = SIMP(statut = 'o', typ= 'TXM', into = ('Max', 'Min', 'Med', 'Moy', 'Sum'),defaut=('Max'), max='**', homo='SansOrdreNiDoublon'),
+ Unit = SIMP ( statut = "f", typ = "TXM", fr = "Unite", ang = "Unit",),
+ Format = SIMP ( statut = "f", typ = "TXM", fr = "Format de sortie", ang = "format", into =['med', 'csv']),
+ ),
+ )
+ return output
+ else :
+ lesBlocs={}
+ Physique = SIMP (statut = "o", typ = "TXM",into = intoVariable,defaut=intoVariable[0])
+ for phys in intoVariable :
+ laCondition ="Physique == '" + phys + "'"
+ NomDeLaVariable = SIMP ( statut = "o", typ = "TXM", into = monDicoVarSortie[phys], )
+ nomBloc = 'b_physique_' + phys
+ lesBlocs[nomBloc] = BLOC (condition=laCondition, NomDeLaVariable = NomDeLaVariable)
+ FonctionDAggregation = SIMP(statut = 'o', typ= 'TXM', into = ('Max', 'Min', 'Med', 'Moy', 'Sum'),defaut=('Max'), max='**', homo='SansOrdreNiDoublon')
+ Unit = SIMP ( statut = "f", typ = "TXM", fr = "Unite", ang = "Unit",)
+ Format = SIMP ( statut = "f", typ = "TXM", fr = "Format de sortie", ang = "format", into =['med', 'csv'])
+ VariableDeSortie = FACT ( max='**', statut ='o', Physique=Physique, **lesBlocs, FonctionDAggregation=FonctionDAggregation, Unit=Unit,Format=Format)
+ output = FACT (max=1, statut ='o', VariableDeSortie=VariableDeSortie)
+ return output
-
-
-
-def creeOperExpressionIncertitude(monDico, maListe):
- listeDesVariablesPossibles = list(monDico.keys())
- listeDesVariablesSortiePossibles = maListe
+def creeOperExpressionIncertitude(monDicoVarDeter, monDicoVarSortie):
+ listeDesVariablesPossibles = list(monDicoVarDeter.keys())
+ monOutput = creeOutput(monDicoVarSortie)
modelVariable = SIMP ( statut = "o",
typ = ( 'TXM'),
fr = "Variable d'entrée du modèle",
), # Fin BlocEmpiricalQuantileSettings
),# fin Result
),# fin BlocMonteCarlo2
- ), # fin Propoagation
- Output = FACT (max=1, statut ='o',
- VariableDeSortie = FACT ( max='**', statut ='o',
- NomDeLaVariable = SIMP ( statut = "o", typ = "TXM", into = listeDesVariablesSortiePossibles, defaut='Average_mass_flux'),
- Physique = SIMP (statut = "o", typ = "TXM",into = ('Neutronics', 'ThermoHydraulics'),defaut='Neutronics'),
- FonctionDAggregation = SIMP(statut = 'o', typ= 'TXM', into = ('Max', 'Min', 'Med', 'Moy', 'Sum'),defaut=('Max'), max='**', homo='SansOrdreNiDoublon'),
- Unit = SIMP ( statut = "f", typ = "TXM", fr = "Unite", ang = "Unit",),
- Format = SIMP ( statut = "f", typ = "TXM", fr = "Format de sortie", ang = "format", into =['med', 'csv']),
- ),
- ),
+ ),# 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=monOutput,
Execution = FACT (max=1, statut ='o',
+ UncertaintyTool = SIMP ( statut = "o", typ = "TXM", into = ['Uranie', 'OpenTurns'], defaut='OpenTurns'),
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'),
- JobName = SIMP ( statut = 'o', typ ="TXM", defaut='idefix_job'),
+ ExecutionMode = SIMP ( statut = "o", typ = "TXM", into = ['desktop', 'cluster']),
NbOfProcs = SIMP ( statut = 'o', typ ="I" , defaut = 1, val_min = 1),
- bloc_OT_local = BLOC (condition = 'ExecutionMode == "local"',
+ NbDeBranches = SIMP ( statut = "o", typ = "I", val_min = 0, fr='nb d evaluations simultanees'),
+ JobName = SIMP ( statut = 'o', typ ="TXM", defaut='idefix_rn_job'),
+ bloc_OT_local = BLOC (condition = 'ExecutionMode == "desktop"',
+ ResourceName = SIMP ( statut = 'o', typ ="TXM", defaut ='localhost'),
+ Login = SIMP ( statut = 'o', typ ="TXM", defaut ='C65845'), #TODO
+ # WorkDirectory = SIMP ( statut = 'o', typ='Repertoire' , defaut='/tmp/C65845_workingdir_uncertainty'), #TODO: Login + NonExistent
+ WorkDirectory = SIMP ( statut = 'o', typ='TXM' , defaut='/tmp/C65845_workingdir_uncertainty'), #TODO: Login + NonExistent
+ # ResultDirectory = SIMP ( statut = 'o', typ='Repertoire' , defaut='/tmp/idefix_rn_job'), #TODO: JobName
+ ResultDirectory = SIMP ( statut = 'o', typ='TXM' , defaut='/tmp/idefix_rn_job'), #TODO: JobName
),
bloc_OT_cluster = BLOC (condition = 'ExecutionMode == "cluster"',
- resourceName = SIMP ( statut = 'o', typ ="TXM", defaut ='gaia'),
- multiJobStudy = SIMP ( statut = "o", typ = bool, defaut=False),
+ ResourceName = SIMP ( statut = 'o', typ ="TXM", defaut ='gaia'),
+ Login = SIMP( statut = 'o', typ ="TXM", defaut ='C65845'),
+ WorkDirectory = SIMP ( statut = 'o', typ='TXM' , defaut='/scratch/C65845/workingdir/persalys_light'), #TODO: Login
+ # WorkDirectory = SIMP ( statut = 'o', typ='Repertoire' , defaut='/scratch/C65845/workingdir/persalys_light'), #TODO: Login
+ ResultDirectory = SIMP ( statut = 'o', typ='TXM' , defaut='/tmp/idefix_rn_job'), #TODO: JobName
+ # ResultDirectory = SIMP ( statut = 'o', typ='Repertoire' , defaut='/tmp/idefix_rn_job'), #TODO: JobName
+ 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'),
),
),
)