--- /dev/null
+source opt/MAP/map-2016.1/share/map/scripts/envMAP.sh
--- /dev/null
+# coding: utf-8\r
+import types\r
+from Accas import *\r
+import sys,os\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/components/c_pre_polymer_data_management')\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/virtual_polymer_common')\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/')\r
+import pckdb, class_data, instruction, equation_part, utils\r
+\r
+\r
+monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization'),\r
+ 'Modele_TechnicalUse' : ('cable', 'coating', 'pipes'),\r
+ }\r
+\r
+class Tuple:\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
+\r
+ def info(self):\r
+ return "Tuple de %s elements" % self.ntuple\r
+\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
+\r
+def maFunc():\r
+ return ('a1','a2','a3')\r
+ \r
+def maFuncWithArg(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct = True\r
+\r
+ editor=monMC.jdc.editor\r
+ if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')\r
+ else : monInto=('b1','b2','b3')\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
+\r
+ monMC.dsMaFunct = False\r
+\r
+def recupereDicoGenerique(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ print ('je passe dans la recuperation')\r
+ editor=monMC.jdc.editor\r
+ valeurDB=editor.getValeur('Equation','Equation_DB',())\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
+ monMC.dsMaFunct = False\r
+ return listEquation, listModele,listPostTraitement\r
+\r
+def recupereDicoEquation(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ listEquation, listModele,listePostTraitement=recupereDicoGenerique(monMC)\r
+ editor=monMC.jdc.editor\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
+ if valeurAgingType == None : monMC.dsMaFunct = False; return\r
+\r
+ listeEquationPourIhm = []\r
+ listeReprEquationPourIhm = []\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
+ else:\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.maClasseVisuEquation = classeVisuEquation(dicoListeAffiche,listEquation, listModele,listPostTraitement)\r
+ monMC.dsMaFunct = False\r
+\r
+def afficheValeurEquation(monMC):\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
+ editor.maClasseVisuEquation.valeurEquationChoisie=valeur\r
+ monMC.dsMaFunct = False\r
+ \r
+\r
+def instancieChemicalFormulation(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ if monMC.valeur == False : return\r
+\r
+ editor=monMC.jdc.editor\r
+ if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
+ editor.dsMaFunct = True\r
+\r
+ print ('ds instancie')\r
+ v=editor.maClasseVisuEquation.valeurEquationChoisie\r
+ monEquation=editor.maClasseVisuEquation.dicoListeAffiche[v]\r
+ type_react=monEquation.type_react\r
+ type_vieil=monEquation.type_vieil\r
+ print (v, type_react, type_vieil)\r
+ #editor.changeIntoMCandSet('Equation', ('b_type_show','b_modification','b_modif','ChemicalFormulation'),( v,),v )\r
+ change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Reaction_Type'),type_react )\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
+ editor.ajoutMC(monMC.etape,'OptionnelConstituant',None,('b_type_show','b_modification','b_modif',))\r
+ print (index,valeurConstituant,valeurEquation)\r
+\r
+ #OptionnelConstituant = FACT ( statut = 'f',max = '**',\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
+\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
+ change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Commentaire'),monEquation.comment )\r
+ print (monEquation.comment )\r
+ #if change :\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ monMC.dsMaFunct = False\r
+ editor.dsMaFunct = False\r
+ \r
+# TEMPORAIRE \r
+# TODO TODO TODO\r
+# PNPNPNPNPN\r
+\r
+\r
+maClasseDeModele=class_data.Modele()\r
+\r
+def recupereDicoModele(monMC):\r
+ if monMC.valeur == None: return\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ print ('je passe dans recupereDicoModele')\r
+ listEquation, listModele,listPostTraitement=recupereDicoGenerique(monMC)\r
+ editor=monMC.jdc.editor\r
+ editor.maClasseVisuEquation = classeVisuEquation({},listEquation, listModele,listPostTraitement)\r
+ monMC.dsMaFunct = False\r
+\r
+\r
+def creeListeEquation(monMC):\r
+ if monMC.valeur == None: return\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+\r
+ editor=monMC.jdc.editor\r
+# TEMPORAIRE \r
+# TODO TODO TODO\r
+ listeEquationsAAfficher=[]\r
+ listeConstantesAAfficher=[]\r
+ for index,equation in enumerate( editor.maClasseVisuEquation.listEquation):\r
+ if index in maClasseDeModele.equa:\r
+ listeEquationsAAfficher.append(equation.representation)\r
+ listeConstantesAAfficher.append(equation.const_cine_nom)\r
+\r
+ monMC.dsMaFunct = False\r
+\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
+ if monMC.valeur==False : return\r
+ editor=monMC.jdc.editor\r
+ if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
+\r
+ editor.dsMaFunct = True\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
+ print (dicoListeEquationAAfficher)\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
+ change=editor.changeIntoDefMC('Modele', ('b_type_creation','b_ajout_equation','listeEquation_stabilization'),dicoListeEquationAAfficher['stabilization'] )\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ editor.dsMaFunct = False\r
+\r
+def prepareDiffusion(monMC):\r
+ print ('je suis dans prepareDiffusion')\r
+ if monMC.valeur==False : return\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct=True\r
+ editor=monMC.jdc.editor\r
+ if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
+ editor.dsMaFunct = True\r
+ editor.dicoCoefS={}\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
+ if c[0]=='D':\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
+\r
+\r
+def ajouteDiffusion(monMC):\r
+ print ('je suis dans ajouteDiffusion')\r
+ if monMC.valeur == None : return\r
+ print (monMC.valeur)\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct=True\r
+ editor=monMC.jdc.editor\r
+ if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
+ editor.dsMaFunct = True\r
+\r
+\r
+ for v in monMC.valeur :\r
+ print (v)\r
+ mesValeurs=editor.dicoCoefS[v]\r
+ print (editor.dicoCoefS)\r
+ print (mesValeurs) \r
+ MCFils='S'+v\r
+ for e in monMC.jdc.etapes:\r
+ if e.nom == Modele :break\r
+\r
+ print (e)\r
+ editor.ajoutDefinitionMC(e,('b_type_creation','b_diffusion'),MCFils,typ='TXM',statut='o' )\r
+ print ('ggggg')\r
+ editor.ajoutMC(e,MCFils,mesValeurs,('b_type_creation','b_diffusion',))\r
+ print ('______')\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ monMC.dsMaFunct=False\r
+ editor.dsMaFunct = False\r
+\r
+JdC = JDC_CATA(code='VP',\r
+ execmodul=None,\r
+ )\r
+\r
+\r
+ \r
+#---------------------------------\r
+Equation = PROC (nom="Equation",\r
+ op=None,\r
+#---------------------------------\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
+ b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),\r
+\r
+ b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],siValide=recupereDicoEquation),\r
+ ), # Fin b_reaction_type\r
+\r
+ b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),siValide=recupereDicoEquation),\r
+ ), # Fin b_reaction_type\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
+ 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
+\r
+ OptionnelConstituant = FACT ( statut = 'f',max = '**',\r
+ Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
+ ), # fin Const_Equa\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
+ ),# fin ConstanteOptionnelle\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
+\r
+ ),# fin b_modif\r
+ \r
+ ), # fin b_modification\r
+ ), # Fin b_type_show\r
+\r
+\r
+# ---------------------------------------------------------------------------\r
+ b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Modification = FACT ( statut = 'o',\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
+ Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
+\r
+ Constituants = FACT ( statut = 'o',\r
+ ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),\r
+ b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),\r
+ ), # Fin b_pooh\r
+ ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),\r
+ b_p = BLOC(condition = " ConstituantP == 'P'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),\r
+ ), # Fin b_p\r
+ OptionnelConstituant = FACT ( statut = 'f',max = '**',\r
+ Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
+ ), # fin Const_Equa\r
+ ),# Fin Constituants\r
+\r
+ Constante = FACT ( statut = 'o',\r
+ Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),\r
+ b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,\r
+ ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
+ ),\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
+ ),# fin ConstanteOptionnelle\r
+ ), # fin constante\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
+ \r
+ ), # Fin Equation_Modification\r
+\r
+ #Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
+ #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),\r
+ #Type2 = SIMP(statut='o', typ = 'TXM'),\r
+\r
+ ), # fin b_type_creation\r
+ \r
+ \r
+) # Fin Equation\r
+\r
+#---------------------------------\r
+Modele = PROC (nom="Modele",\r
+ op=None,\r
+ Modele_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base"),siValide=recupereDicoModele ),\r
+ Modele_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show modele database", "Modele creation"),siValide=creeListeEquation),\r
+# ---------------------------------------------------------------------------\r
+ b_type_creation = BLOC(condition = " Modele_Type == 'Modele creation'",\r
+# ---------------------------------------------------------------------------\r
+ technicalUse= SIMP(statut= 'o',typ= 'TXM',into=monDico['Modele_TechnicalUse'],defaut=maClasseDeModele.technical_use ),\r
+ modeleName=SIMP(statut='o',typ='TXM',defaut=maClasseDeModele.nom,),\r
+ material=SIMP(statut='o',typ='TXM',defaut=maClasseDeModele.materiaux[0],),\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
+ # ajouter la liste des equations et le remove (il faut garder ceux qu on a enlever)\r
+ \r
+\r
+ AjoutEquation=SIMP(statut= 'o',typ= bool, defaut=False, siValide=recupereModeleEquation),\r
+ b_ajout_equation = BLOC(condition = " AjoutEquation == True",\r
+ listeEquation_initiation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),\r
+ listeEquation_propagation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),\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
+ # 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
+\r
+ Aging_Type=SIMP(statut= 'o',typ='TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'), defaut=maClasseDeModele.type_vieil),\r
+ Diffusion = SIMP(typ = bool, statut = 'o',defaut = maClasseDeModele.diffusion,siValide = prepareDiffusion),\r
+\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
+ ), # fin b_diffusion\r
+ \r
+ ), # fin b_type_creation\r
+\r
+\r
+ #AjoutEquation=Fact(statut='f',\r
+ # Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],siValide=recupereModeleEquation),\r
+ #), # fin AjoutEquation\r
+\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM'),\r
+) # Fin Modele\r
--- /dev/null
+# coding: utf-8\r
+import types\r
+from Accas import *\r
+import sys,os\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/components/c_pre_polymer_data_management')\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/mapy/virtual_polymer_common')\r
+sys.path.append('/home/A96028/opt/MAP/map-2016.1/lib/python2.7/site-packages/')\r
+import pckdb, class_data, instruction, equation_part, utils\r
+\r
+\r
+class Tuple:\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
+\r
+ def info(self):\r
+ return "Tuple de %s elements" % self.ntuple\r
+\r
+ __repr__=info\r
+ __str__=info\r
+\r
+#class ObjetUtilisateur(ASSD): pass\r
+\r
+class classeVisuEquation :\r
+ def __init__(self,dicoListeAffiche):\r
+ self.dicoListeAffiche=dicoListeAffiche\r
+ \r
+\r
+def maFunc():\r
+ return ('a1','a2','a3')\r
+ \r
+def maFuncWithArg(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct = True\r
+\r
+ editor=monMC.jdc.editor\r
+ if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')\r
+ else : monInto=('b1','b2','b3')\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
+\r
+ monMC.dsMaFunct = False\r
+\r
+def recupereDicoGenerique(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ print ('je passe dans la recuperation')\r
+ editor=monMC.jdc.editor\r
+ valeurDB=editor.getValeur('Equation','Equation_DB',())\r
+ print ('valeurDB',valeurDB)\r
+ correspond=pckdb.DBRENAME\r
+ if valeurDB != None :\r
+ listEquation, listModele,listePostTraitement=pckdb.read_pckdb(correspond[valeurDB])\r
+ print (listEquation, listModele,listePostTraitement)\r
+ monMC.dsMaFunct = False\r
+ return listEquation, listModele,listePostTraitement\r
+\r
+def recupereDicoEquation(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ listEquation, listModele,listePostTraitement=recupereDicoGenerique(monMC)\r
+ editor=monMC.jdc.editor\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
+ print ('dans reaction-type')\r
+ valeurAgingType=editor.getValeur('Equation','Equation_reaction',('b_type_show','b_aging_type',))\r
+ if valeurAgingType == None : monMC.dsMaFunct = False; return\r
+\r
+ print ('valeurType',valeurAgingType)\r
+ listeEquationPourIhm = []\r
+ listeReprEquationPourIhm = []\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
+ else:\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.maClasseVisuEquation = classeVisuEquation(dicoListeAffiche)\r
+ monMC.dsMaFunct = False\r
+\r
+def afficheValeurEquation(monMC):\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
+ print (editor.maClasseVisuEquation.dicoListeAffiche[valeur])\r
+ print(str (editor.maClasseVisuEquation.dicoListeAffiche[valeur]))\r
+ editor.maClasseVisuEquation.valeurEquationChoisie=valeur\r
+ monMC.dsMaFunct = False\r
+ \r
+\r
+def instancieChemicalFormulation(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ if monMC.valeur == False : return\r
+\r
+ editor=monMC.jdc.editor\r
+ if hasattr(editor,'dsMaFunct') and editor.dsMaFunct== True : return\r
+ editor.dsMaFunct = True\r
+\r
+ print ('ds instancie')\r
+ v=editor.maClasseVisuEquation.valeurEquationChoisie\r
+ monEquation=editor.maClasseVisuEquation.dicoListeAffiche[v]\r
+ type_react=monEquation.type_react\r
+ type_vieil=monEquation.type_vieil\r
+ print (v, type_react, type_vieil)\r
+ #editor.changeIntoMCandSet('Equation', ('b_type_show','b_modification','b_modif','ChemicalFormulation'),( v,),v )\r
+ change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Reaction_Type'),type_react )\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
+ editor.ajoutMC(monMC.etape,'OptionnelConstituant',None,('b_type_show','b_modification','b_modif',))\r
+ print (index,valeurConstituant,valeurEquation)\r
+\r
+ #OptionnelConstituant = FACT ( statut = 'f',max = '**',\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
+\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
+ change=editor.changeDefautDefMC('Equation', ('b_type_show','b_modification','b_modif','Commentaire'),monEquation.comment )\r
+ print (monEquation.comment )\r
+ #if change :\r
+ if editor.fenetreCentraleAffichee : editor.fenetreCentraleAffichee.node.affichePanneau()\r
+ monMC.dsMaFunct = False\r
+ editor.dsMaFunct = False\r
+ \r
+\r
+\r
+monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization')}\r
+\r
+JdC = JDC_CATA(code='VP',\r
+ execmodul=None,\r
+ )\r
+\r
+\r
+ \r
+#---------------------------------\r
+Equation = PROC (nom="Equation",\r
+ op=None,\r
+#---------------------------------\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
+ b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),\r
+\r
+ b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],siValide=recupereDicoEquation),\r
+ ), # Fin b_reaction_type\r
+\r
+ b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),siValide=recupereDicoEquation),\r
+ ), # Fin b_reaction_type\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
+ 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
+\r
+ OptionnelConstituant = FACT ( statut = 'f',max = '**',\r
+ Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
+ ), # fin Const_Equa\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
+ ),# fin ConstanteOptionnelle\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
+\r
+ ),# fin b_modif\r
+ \r
+ ), # fin b_modification\r
+ ), # Fin b_type_show\r
+\r
+\r
+# ---------------------------------------------------------------------------\r
+ b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Modification = FACT ( statut = 'o',\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
+ Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
+\r
+ Constituants = FACT ( statut = 'o',\r
+ ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),\r
+ b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),\r
+ ), # Fin b_pooh\r
+ ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),\r
+ b_p = BLOC(condition = " ConstituantP == 'P'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),\r
+ ), # Fin b_p\r
+ OptionnelConstituant = FACT ( statut = 'f',max = '**',\r
+ Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
+ ), # fin Const_Equa\r
+ ),# Fin Constituants\r
+\r
+ Constante = FACT ( statut = 'o',\r
+ Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),\r
+ b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,\r
+ ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
+ ),\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
+ ),# fin ConstanteOptionnelle\r
+ ), # fin constante\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),\r
+ \r
+ ), # Fin Equation_Modification\r
+\r
+ #Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
+ #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),\r
+ #Type2 = SIMP(statut='o', typ = 'TXM'),\r
+\r
+ ), # fin b_type_creation\r
+ \r
+ \r
+) # Fin Equation\r
+\r
+Modele = PROC (nom="Modele",\r
+ op=None,\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM'),\r
+) # Fin Modele\r
--- /dev/null
+# coding: utf-8\r
+import types\r
+from Accas import *\r
+\r
+\r
+class Tuple:\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
+\r
+ def info(self):\r
+ return "Tuple de %s elements" % self.ntuple\r
+\r
+ __repr__=info\r
+ __str__=info\r
+\r
+#class ObjetUtilisateur(ASSD): pass\r
+\r
+def maFunc():\r
+ return ('a1','a2','a3')\r
+ \r
+def maFuncWithArg(monMC):\r
+ if hasattr(monMC,'dsMaFunct') and monMC.dsMaFunct== True : return\r
+ monMC.dsMaFunct = True\r
+\r
+ editor=monMC.jdc.editor\r
+ if monMC.valeur == 'POOH->P' : monInto=('a1','a2','a3')\r
+ else : monInto=('b1','b2','b3')\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
+\r
+ monMC.dsMaFunct = False\r
+\r
+\r
+\r
+monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization')}\r
+\r
+JdC = JDC_CATA(code='VP',\r
+ execmodul=None,\r
+ )\r
+\r
+\r
+AGING = PROC (nom="AGING",\r
+ op=None,\r
+ \r
+#---------------------------------\r
+ Equation = FACT(statut= 'o',\r
+#---------------------------------\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
+ b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),\r
+\r
+ b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],),\r
+ ), # Fin b_reaction_type\r
+\r
+ b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",\r
+ Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),),\r
+ ), # Fin b_reaction_type\r
+\r
+ ), # Fin b_type_show\r
+\r
+# ---------------------------------------------------------------------------\r
+ b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",\r
+# ---------------------------------------------------------------------------\r
+ Equation_Modification = FACT ( statut = 'o',\r
+ Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P'),\r
+ Equation_reaction1=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),\r
+ Equation_reaction2=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),\r
+\r
+ Constituants = FACT ( statut = 'o',\r
+ ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',), defaut= 'POOH'),\r
+ b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),\r
+ ), # Fin b_pooh\r
+ ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',),defaut='P'),\r
+ b_p = BLOC(condition = " ConstituantP == 'P'" ,\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),\r
+ ), # Fin b_p\r
+ OptionnelConstituant = FACT ( statut = 'f',max = '**',\r
+ Constituant = SIMP (statut = 'o', typ = 'TXM'),\r
+ Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),\r
+ ), # fin Const_Equa\r
+ ),# Fin Constituants\r
+\r
+ Constante = FACT ( statut = 'o',\r
+ Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),\r
+ b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,\r
+ ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),\r
+ ),\r
+ ConstanteOptionnelle = 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
+ ),# fin ConstanteOptionnelle\r
+ ), # fin constante\r
+ Commentaire = SIMP (statut = 'f', typ = 'TXM'),\r
+ \r
+ ), # Fin Equation_Modification\r
+\r
+\r
+ #Chemical_Formulation = SIMP(statut= 'o',typ= 'TXM', defaut = 'POOH->P',siValide=maFuncWithArg),\r
+ #Type1 = SIMP(statut='o', typ = 'TXM', into=maFunc),\r
+ #Type2 = SIMP(statut='o', typ = 'TXM'),\r
+\r
+ ), # fin b_type_creation\r
+ \r
+ \r
+ ), # Fin Equation\r
+)\r
+\r
+TEXTE_NEW_JDC="AGING()"\r
--- /dev/null
+# -*- coding: utf-8 -*-\r
+# CONFIGURATION MANAGEMENT OF EDF VERSION\r
+# ======================================================================\r
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
+# (AT YOUR OPTION) ANY LATER VERSION.\r
+#\r
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
+#\r
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
+#\r
+#\r
+# ======================================================================\r
+"""\r
+ Ce module sert pour charger les paramètres de configuration d'EFICAS\r
+"""\r
+# Modules Python\r
+from InterfaceQT4 import configuration\r
+import os\r
+\r
+\r
+class CONFIG(configuration.CONFIG_BASE):\r
+\r
+ #-----------------------------------\r
+ def __init__(self,appli,repIni):\r
+ #-----------------------------------\r
+\r
+ self.labels_user=['catalogues','lang']\r
+ self.labels_eficas=['lang','rep_cata','catalogues']\r
+\r
+ configuration.CONFIG_BASE.__init__(self,appli,repIni)\r
+\r
+\r
+def make_config(appli,rep):\r
+ return CONFIG(appli,rep)\r
+\r
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+
+def INCLUDE(self,FileName,**args):
+ """
+ Fonction sd_prod pour la macro INCLUDE
+ """
+ if hasattr(self,'change_fichier'):
+ delattr(self,'change_fichier')
+ delattr(self,'fichier_ini')
+
+ self.make_include2(fichier=FileName)
+
+def INCLUDE_context(self,d):
+ """
+ Fonction op_init pour macro INCLUDE
+ """
+ for k,v in self.g_context.items():
+ d[k]=v
+
+
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+code="VP"
+import sys, os
+if os.path.dirname(os.path.abspath(__file__)) not in sys.path :
+ sys.path.insert(0,os.path.dirname(os.path.abspath(__file__)))
--- /dev/null
+# -*- coding: utf-8 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='fr'
+
+# Codage des strings qui accepte les accents (en remplacement de 'ascii')
+encoding='iso-8859-1'
+
+#
+catalogues=(
+ ('VP','V1',os.path.join(repIni,'VP_Cata_V1.py'),'python','python'),
+)
+nombreDeBoutonParLigne=2
+closeFrameRechercheCommande = True
+closeEntete = True
+#closeArbre = True
+afficheOptionnelVide=False
+
--- /dev/null
+#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR
+# RESPONSABLE D6BHHHH J-P.LEFEBVRE
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+# ======================================================================
+# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR
+# DE LA VERSION DU CODE_ASTER ASSOCIE
+#----------------------------------------------------------------------
+version = "1.2"
+date = "25/05/2010"
+exploit = False
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""
+ Ce module sert a lancer EFICAS configure pour MAP
+"""
+# Modules Python
+# Modules Eficas
+import prefs
+name='prefs_'+prefs.code
+__import__(name)
+
+import sys
+reload(sys)
+sys.setdefaultencoding('latin1')
+
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+
+import prefs
+from InterfaceQT4 import eficas_go
+eficas_go.lance_eficas(code=prefs.code)
--- /dev/null
+def model_saved(listeparam) :
+ editor=listeparam[0]
+ print (editor)
+ print (editor.process_VP())
+
+# le dictionnaire des commandes a la structure suivante :
+# la clef est la commande qui va proposer l action
+# puis un tuple qui contient
+# - la fonction a appeler
+# - le label dans le menu du clic droit
+# - un tuple contenant les parametres attendus par la fonction
+# - appelable depuis Salome uniquement -)
+# - appelable depuis un item valide uniquement
+# - toolTip
+dict_commandes={
+ 'Equation':((model_saved,"model_saved",('editor','self'),False,True,""),),
+ }