7 def __init__(self,ntuple):
\r
10 def __convert__(self,valeur):
\r
11 if type(valeur) == types.StringType: return None
\r
12 if len(valeur) != self.ntuple: return None
\r
16 return "Tuple de %s elements" % self.ntuple
\r
21 #class ObjetUtilisateur(ASSD): pass
\r
24 return ('a1','a2','a3')
\r
26 def maFuncWithArg(monMC):
\r
27 if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return
\r
28 monMC.dsMaFunct = True
\r
30 editor=monMC.jdc.editor
\r
31 if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')
\r
32 else : monInto=('b1','b2','b3')
\r
34 change=editor.changeIntoDefMC('AGING', ('Equation', 'b_approved','b_type_creation','Equation_Modification','Type2'), monInto )
\r
36 print ('j ai change le into')
\r
37 editor.reCalculeValiditeMCApresChgtInto('AGING', 'Type2', ('Equation', 'b_approved','b_type_creation','Equation_Modification'))
\r
38 if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()
\r
40 monMC.dsMaFunct = False
\r
44 monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization')}
\r
46 JdC = JDC_CATA(code='VP',
\r
51 AGING = PROC (nom="AGING",
\r
54 #---------------------------------
\r
55 Equation = FACT(statut= 'o',
\r
56 #---------------------------------
\r
57 Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),
\r
58 Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),
\r
60 # ---------------------------------------------------------------------------
\r
61 b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",
\r
62 # ---------------------------------------------------------------------------
\r
63 Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),
\r
65 b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",
\r
66 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],),
\r
67 ), # Fin b_reaction_type
\r
69 b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",
\r
70 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),),
\r
71 ), # Fin b_reaction_type
\r
73 ), # Fin b_type_show
\r
75 # ---------------------------------------------------------------------------
\r
76 b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",
\r
77 # ---------------------------------------------------------------------------
\r
78 Equation_Modification = FACT ( statut = 'o',
\r
79 Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P'),
\r
80 Equation_reaction1=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),
\r
81 Equation_reaction2=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),
\r
83 Constituants = FACT ( statut = 'o',
\r
84 ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),
\r
85 b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,
\r
86 Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),
\r
88 ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),
\r
89 b_p = BLOC(condition = " ConstituantP == 'P'" ,
\r
90 Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),
\r
92 OptionnelConstituant = FACT ( statut = 'f',max = '**',
\r
93 Constituant = SIMP (statut = 'o', typ = 'TXM'),
\r
94 Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),
\r
96 ),# Fin Constituants
\r
98 Constante = FACT ( statut = 'o',
\r
99 Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),
\r
100 b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,
\r
101 ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
103 ConstanteOptionnelle = FACT (statut = 'f', max = '**',
\r
104 ConstanteName= SIMP (statut = 'o', typ = 'TXM',),
\r
105 ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
106 ),# fin ConstanteOptionnelle
\r
108 Commentaire = SIMP (statut = 'f', typ = 'TXM'),
\r
110 ), # Fin Equation_Modification
\r
113 #Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),
\r
114 #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),
\r
115 #Type2 = SIMP(statut='o', typ = 'TXM'),
\r
117 ), # fin b_type_creation
\r
123 TEXTE_NEW_JDC="AGING()"
\r