}\r
\r
class Tuple:\r
- def __init__(self,ntuple):\r
- self.ntuple=ntuple\r
+ def __init__(self,ntuple):\r
+ self.ntuple=ntuple\r
\r
- def __convert__(self,valeur):\r
- if type(valeur) == types.StringType: return None\r
- if len(valeur) != self.ntuple: return None\r
- return valeur\r
+ def __convert__(self,valeur):\r
+ if type(valeur) == types.StringType: return None\r
+ if len(valeur) != self.ntuple: return None\r
+ return valeur\r
\r
- def info(self):\r
- return "Tuple de %s elements" % self.ntuple\r
+ def info(self):\r
+ return "Tuple de %s elements" % self.ntuple\r
\r
- __repr__=info\r
- __str__=info\r
+ __repr__=info\r
+ __str__=info\r
\r
#class ObjetUtilisateur(ASSD): pass\r
\r
class classeVisuEquation :\r
- def __init__(self,dicoListeAffiche, listEquation, listModele,listPostTraitement):\r
- self.dicoListeAffiche=dicoListeAffiche\r
- self.listEquation=listEquation\r
- self.listModele=listModele\r
- self.listPostTraitement=listPostTraitement\r
- \r
+ def __init__(self,dicoListeAffiche, listEquation, listModele,listPostTraitement):\r
+ self.dicoListeAffiche=dicoListeAffiche\r
+ self.listEquation=listEquation\r
+ self.listModele=listModele\r
+ self.listPostTraitement=listPostTraitement\r
+\r
\r
def maFunc():\r
return ('a1','a2','a3')\r
- \r
+\r
def maFuncWithArg(monMC):\r
if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
monMC.dsMaFunct = True\r
\r
change=editor.changeIntoDefMC('AGING', ('Equation', 'b_approved','b_type_creation','Equation_Modification','Type2'), monInto )\r
if change :\r
- print ('j ai change le into')\r
- editor.reCalculeValiditeMCApresChgtInto('AGING', 'Type2', ('Equation', 'b_approved','b_type_creation','Equation_Modification')) \r
- if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ print ('j ai change le into')\r
+ editor.reCalculeValiditeMCApresChgtInto('AGING', 'Type2', ('Equation', 'b_approved','b_type_creation','Equation_Modification'))\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
\r
monMC.dsMaFunct = False\r
\r
if valeurDB == None : valeurDB=editor.getValeur('Modele','Modele_DB',())\r
correspond=pckdb.DBRENAME\r
if valeurDB != None :\r
- listEquation, listModele,listPostTraitement=pckdb.read_pckdb(correspond[valeurDB])\r
+ listEquation, listModele,listPostTraitement=pckdb.read_pckdb(correspond[valeurDB])\r
monMC.dsMaFunct = False\r
return listEquation, listModele,listPostTraitement\r
\r
valeurEquationListe=editor.getValeur('Equation','Equation_Liste',('b_type_show',))\r
valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_reaction_type',))\r
if valeurAgingType == None :\r
- valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_aging_type',))\r
+ valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_aging_type',))\r
if valeurAgingType == None : monMC.dsMaFunct = False; return\r
\r
listeEquationPourIhm = []\r
dicoListeAffiche={}\r
for equation in listEquation :\r
if valeurEquationListe == 'aging_type' :\r
- if equation.type_vieil == valeurAgingType : \r
- listeEquationPourIhm.append(equation)\r
- listeReprEquationPourIhm.append(equation.representation)\r
- dicoListeAffiche[equation.representation]=equation\r
+ if equation.type_vieil == valeurAgingType :\r
+ listeEquationPourIhm.append(equation)\r
+ listeReprEquationPourIhm.append(equation.representation)\r
+ dicoListeAffiche[equation.representation]=equation\r
else:\r
- if equation.type_react == valeurAgingType : \r
- listeEquationPourIhm.append(equation)\r
- listeReprEquationPourIhm.append(equation.representation)\r
- dicoListeAffiche[equation.representation]=equation\r
+ if equation.type_react == valeurAgingType :\r
+ listeEquationPourIhm.append(equation)\r
+ listeReprEquationPourIhm.append(equation.representation)\r
+ dicoListeAffiche[equation.representation]=equation\r
change=editor.changeIntoDefMC('Equation', ('b_type_show','ListeEquation'), listeReprEquationPourIhm )\r
if change :\r
- editor.reCalculeValiditeMCApresChgtInto('Equation', 'listeEquation', ('b_type_show',)) \r
- if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ editor.reCalculeValiditeMCApresChgtInto('Equation', 'listeEquation', ('b_type_show',))\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
editor.maClasseVisuEquation = classeVisuEquation(dicoListeAffiche,listEquation, listModele,listPostTraitement)\r
monMC.dsMaFunct = False\r
\r
if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
editor=monMC.jdc.editor\r
valeur=monMC.valeur\r
- if valeur == None : \r
- monMC.dsMaFunct = False\r
- return\r
+ if valeur == None :\r
+ monMC.dsMaFunct = False\r
+ return\r
editor.maClasseVisuEquation.valeurEquationChoisie=valeur\r
monMC.dsMaFunct = False\r
- \r
+\r
\r
def instancieChemicalFormulation(monMC):\r
if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Aging_Type'), type_vieil )\r
\r
for index,valeurConstituant in enumerate(monEquation.constituants):\r
- valeurEquation=monEquation.equation[index] \r
+ valeurEquation=monEquation.equation[index]\r
editor.ajoutMC(monMC.etape,'OptionnelConstituant',None,('b_type_show','b_modification','b_modif',))\r
print (index,valeurConstituant,valeurEquation)\r
\r
# Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
# Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
for index,valeurConstituant in enumerate(monEquation.const_cine_nom):\r
- valeurArrhe=monEquation.arrhenius[index] \r
- if valeurArrhe : valeurConstanteType='Arrhenius type'\r
- else : valeurConstanteType='non Arrhenius type'\r
+ valeurArrhe=monEquation.arrhenius[index]\r
+ if valeurArrhe : valeurConstanteType='Arrhenius type'\r
+ else : valeurConstanteType='non Arrhenius type'\r
\r
- print (index,valeurConstituant,valeurConstanteType)\r
+ print (index,valeurConstituant,valeurConstanteType)\r
#OptionnelleConstante = FACT (statut = 'f', max = '**',\r
# ConstanteName= SIMP (statut = 'o', typ = 'TXM',),\r
# ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
monMC.dsMaFunct = False\r
editor.dsMaFunct = False\r
- \r
-# TEMPORAIRE \r
+\r
+# TEMPORAIRE\r
# TODO TODO TODO\r
# PNPNPNPNPN\r
\r
if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
\r
editor=monMC.jdc.editor\r
-# TEMPORAIRE \r
+# TEMPORAIRE\r
# TODO TODO TODO\r
listeEquationsAAfficher=[]\r
listeConstantesAAfficher=[]\r
\r
monMC.dsMaFunct = False\r
\r
- # listeEquation_stabilization=SIMP(statut='o', homo='SansOrdreNiDoublon', max='**', min=0 ),\r
+ # listeEquation_stabilization=SIMP(statut='o', homo='SansOrdreNiDoublon', max='**', min=0 ),\r
\r
def recupereModeleEquation(monMC):\r
if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
dicoListeEquationAAfficher={}\r
\r
for valeurReactionType in monDico['Equation_Liste']:\r
- dicoListeEquationAAfficher[valeurReactionType] = [] \r
- for index,equation in enumerate( editor.maClasseVisuEquation.listEquation):\r
- if equation.type_react==valeurReactionType : \r
- dicoListeEquationAAfficher[valeurReactionType].append(equation.representation)\r
+ dicoListeEquationAAfficher[valeurReactionType] = []\r
+ for index,equation in enumerate( editor.maClasseVisuEquation.listEquation):\r
+ if equation.type_react==valeurReactionType :\r
+ dicoListeEquationAAfficher[valeurReactionType].append(equation.representation)\r
print (dicoListeEquationAAfficher)\r
- \r
+\r
change=editor.changeIntoDefMC('Modele', ('b_type_creation','b_ajout_equation','listeEquation_initiation'),dicoListeEquationAAfficher['initiation'] )\r
change=editor.changeIntoDefMC('Modele', ('b_type_creation','b_ajout_equation','listeEquation_propagation'),dicoListeEquationAAfficher['propagation'] )\r
change=editor.changeIntoDefMC('Modele', ('b_type_creation','b_ajout_equation','listeEquation_termination'),dicoListeEquationAAfficher['termination'] )\r
editor.dicoCoefD={}\r
for c in maClasseDeModele.coef[0].keys() :\r
if c[0]=='S':\r
- clef=c[1:]\r
- valeur= maClasseDeModele.coef[0][c]\r
- editor.dicoCoefS[clef]=valeur\r
+ clef=c[1:]\r
+ valeur= maClasseDeModele.coef[0][c]\r
+ editor.dicoCoefS[clef]=valeur\r
if c[0]=='D':\r
- clef=c[1:]\r
- valeur= maClasseDeModele.coef[0][c]\r
- editor.dicoCoefD[clef]=valeur\r
+ clef=c[1:]\r
+ valeur= maClasseDeModele.coef[0][c]\r
+ editor.dicoCoefD[clef]=valeur\r
print (editor.dicoCoefS,editor.dicoCoefD)\r
monMC.dsMaFunct=False\r
editor.dsMaFunct = False\r
print (v)\r
mesValeurs=editor.dicoCoefS[v]\r
print (editor.dicoCoefS)\r
- print (mesValeurs) \r
+ print (mesValeurs)\r
MCFils='S'+v\r
for e in monMC.jdc.etapes:\r
if e.nom == Modele :break\r
)\r
\r
\r
- \r
+\r
#---------------------------------\r
Equation = PROC (nom="Equation",\r
op=None,\r
Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),\r
Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),\r
\r
- \r
+\r
# ---------------------------------------------------------------------------\r
b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
# ---------------------------------------------------------------------------\r
ListeEquation = SIMP(statut='o', typ='TXM', homo='SansOrdreNiDoublon',siValide=afficheValeurEquation),\r
b_modification = BLOC(condition = " ListeEquation != None ",\r
modification = SIMP(typ = bool, statut = 'o',defaut = False, fr='toto', ang='toto en anglais', siValide=instancieChemicalFormulation),\r
- \r
+\r
b_modif = BLOC(condition = "modification == True",\r
Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
\r
),# fin b_modif\r
- \r
+\r
), # fin b_modification\r
), # Fin b_type_show\r
\r
b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
# ---------------------------------------------------------------------------\r
Equation_Modification = FACT ( statut = 'o',\r
- \r
+\r
ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),\r
\r
Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
),# fin ConstanteOptionnelle\r
), # fin constante\r
Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
- \r
+\r
), # Fin Equation_Modification\r
\r
#Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
#Type2 = SIMP(statut='o', typ = 'TXM'),\r
\r
), # fin b_type_creation\r
- \r
- \r
+\r
+\r
) # Fin Equation\r
\r
#---------------------------------\r
stabilizer = SIMP(typ = bool, statut = 'o',defaut = maClasseDeModele.stabilise),\r
model_developed_by_for_EDF = SIMP(typ = bool, statut = 'o',defaut = maClasseDeModele.dvt_EDF[0]),\r
documentation=SIMP(statut='o',typ='TXM',defaut=maClasseDeModele.reference,),\r
- \r
+\r
# ajouter la liste des equations et le remove (il faut garder ceux qu on a enlever)\r
- \r
+\r
\r
AjoutEquation=SIMP(statut= 'o',typ= bool, defaut=False, siValide=recupereModeleEquation),\r
b_ajout_equation = BLOC(condition = " AjoutEquation == True",\r
listeEquation_termination=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),\r
listeEquation_stabilization=SIMP(statut='o',typ='TXM', homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),\r
),# fin b_ajout_equation\r
- \r
+\r
# coefficients maClasseDeModele.coef = liste de dictionnaire mais il faut prendre que le 0\r
# on enleve ceux qui commence par D, S et B(casse imprtante)\r
# la clef est le coef, puis les valeurs\r
b_diffusion = BLOC(condition = " Diffusion == True",\r
#coefficients maClasseDeModele.coef = liste de dictionnaire mais il faut prendre que le 0\r
# on met ceux qui commence par D, S et pas les B ni les aitres( casse imprtante)\r
- listeProduitPourLaDiffusion=SIMP(statut='o', typ='TXM', max='**', min=1,homo='SansOrdreNiDoublon', into = maClasseDeModele.param_ini.keys(),siValide=ajouteDiffusion), \r
+ listeProduitPourLaDiffusion=SIMP(statut='o', typ='TXM', max='**', min=1,homo='SansOrdreNiDoublon', into = maClasseDeModele.param_ini.keys(),siValide=ajouteDiffusion),\r
), # fin b_diffusion\r
- \r
+\r
), # fin b_type_creation\r
\r
\r