+def choisitModele(monMC):\r
+ # Equation b_modification modification\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ valeur=monMC.valeur\r
+ if valeur == None : return\r
+ modele=maClasseDelistesDB.dicoModeleFiltre[monMC.valeur]\r
+ maClasseDelistesDB.monModele=modele\r
+ monMC.dsMaFunct = False\r
+\r
+def choisitActionModele(monMC):\r
+ if monMC.valeur == 'display' : afficheModele(monMC)\r
+ if monMC.valeur == 'modify' : changeValeurDefautModele(monMC)\r
+\r
+def afficheModele(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ valeur=monMC.valeur\r
+ aAfficher=str(maClasseDelistesDB.monModele)\r
+ editor=monMC.jdc.editor\r
+ editor._viewText(aAfficher, "Id",largeur=700,hauteur=500)\r
+\r
+ monMC.dsMaFunct = False\r
+\r
+def changeValeurDefautModele(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct = True\r
+ editor=monMC.jdc.editor\r
+ change=editor.changeIntoMCandSet('Modele', ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID','modeleName'),(maClasseDelistesDB.monModele.nom,),maClasseDelistesDB.monModele.nom, )\r
+ editor.setValeur('Modele','technicalUse',maClasseDelistesDB.monModele.technical_use, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+\r
+ editor.setValeur('Modele','material',maClasseDelistesDB.monModele.materiaux, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+ editor.setValeur('Modele','agingType',maClasseDelistesDB.monModele.type_vieil, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+\r
+ if maClasseDelistesDB.monModele.stabilise == 'True' : monBool = True\r
+ else : monBool = False\r
+ editor.setValeur('Modele','stabilizer',monBool, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+ editor.setValeur('Modele','material_thickness',maClasseDelistesDB.monModele.thickness, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+\r
+ if maClasseDelistesDB.monModele.dvt_EDF == 'True' : monBool = True\r
+ else : monBool = False\r
+ editor.setValeur('Modele','model_developed_by_for_EDF',monBool, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+ editor.setValeur('Modele','documentation',maClasseDelistesDB.monModele.reference, ('b_type_modification','b_technicalUse','b_modele','b_type_modify','ID'))\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ monMC.dsMaFunct = False\r
+\r
+\r
+\r
+def creeCoefAModifier(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ if monMC.valeur == None : return\r
+ monMC.dsMaFunct = True\r
+ editor=monMC.jdc.editor\r
+ dicoArr={}\r
+ dicoNonArr={}\r
+ for coef in maClasseDelistesDB.monModele.coef[0] :\r
+ if len (maClasseDelistesDB.monModele.coef[0][coef]) == 1 :\r
+ dicoNonArr[coef]=maClasseDelistesDB.monModele.coef[0][coef][0]\r
+ else :\r
+ dicoArr[coef]=maClasseDelistesDB.monModele.coef[0][coef]\r
+ if coef[0] == 'D' : maClasseDelistesDB.listeDiffusion.append(coef[1:])\r
+ print (dicoNonArr)\r
+ print (dicoArr)\r
+ if 'ri' in dicoNonArr :\r
+ print ('ajoutDefinitionMC debitOfDose')\r
+ editor.ajoutDefinitionMC('Modele', ('b_type_modification','b_technicalUse','b_modele','b_type_use2','Aging_Factor'), 'debitOfDose',typ='R',statut='o' )\r
+\r
+ for coef in dicoNonArr :\r
+ print (coef)\r
+ # attention, notation scientifique\r
+ editor.ajoutDefinitionMC('Modele',('b_type_modification','b_technicalUse','b_modele','b_type_use',),coef, 'R', statut='o',defaut=dicoNonArr[coef])\r
+ # a faire marcher\r
+ # pour les Arr il faut un tuple(2)\r
+\r
+ # il fait creer un fact Boundary_Conditions_Param pour chacque espece de listeDiffusion\r
+\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+\r
+ monMC.dsMaFunct = False\r
+\r
+\r
+def remplirAgingFactor(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ if monMC.valeur == None : return\r
+ monMC.dsMaFunct = True\r
+ editor=monMC.jdc.editor\r
+ if monMC.valeur in dicoAgingFactor:\r
+ print (monMC.valeur, 'trouve')\r
+ for MC in dicoAgingFactor[monMC.valeur]:\r
+ print (MC)\r
+ print (dicoAgingFactor[monMC.valeur][MC]),\r
+ editor.setValeur('Modele',MC,dicoAgingFactor[monMC.valeur][MC],('b_type_modification','b_technicalUse','b_modele','b_type_use2','Aging_Factor'))\r
+ monMC.dsMaFunct = False\r
+\r
+\r
+def creeInitialParameter(monMC):\r
+ print ('je passe dans creeInitialParameter')\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ if monMC.valeur == None : return\r
+ monMC.dsMaFunct = True\r
+ editor=monMC.jdc.editor\r
+ for coef in maClasseDelistesDB.monModele.param_ini:\r
+ editor.ajoutDefinitionMC('Modele',('b_type_modification','b_technicalUse','b_modele','b_type_use2','Initial_Parameter'),coef, 'R', statut='o',defaut=maClasseDelistesDB.monModele.param_ini[coef][0])\r
+ monMC.dsMaFunct = False\r
+ # creer nbdenode = monMC.valeur Initial_Parameter\r