Salome HOME
Fusion manuelle de quelques modifications de la branche CECAM
authorEric F <eric.fayolle.77@gmail.com>
Wed, 31 Mar 2021 10:10:39 +0000 (12:10 +0200)
committerEric F <eric.fayolle.77@gmail.com>
Wed, 31 Mar 2021 10:10:39 +0000 (12:10 +0200)
14 files changed:
Ihm/I_MCSIMP.py
InterfaceQT4/eficas_go.py
InterfaceQT4/monChoixCommande.py
Noyau/N_BLOC.py
Noyau/N_UserASSD.py
Noyau/N_UserASSDMultiple.py
Poc/cataPoc.py
Poc/cataPocRN.py
Poc/raw/__init__.py [deleted file]
Poc/raw/cataPoc_driver.py [deleted file]
Poc/readExemple.py
Vimmp/GNUmakefile
config/GNUmakefile.env
config/test_driver_subst.py

index a380c1aa10b3dc68c9f5c32515b415e7198805d7..8169bd25ee8c5c9a39d97e38c86cf7075e16e2d5 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2021   EDF R&D
+# Copyright (C) 2007-2017   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
@@ -54,809 +54,810 @@ from .I_VALIDATOR import ValError,listProto
 class MCSIMP(I_OBJECT.OBJECT):
 
 
-    def isValid(self,cr='non'):
-        if self.state == 'unchanged':
-            return self.valid
-        for type_permis in self.definition.type:
-            if hasattr(type_permis, "__class__") and type_permis.__class__.__name__ == 'Matrice':
-                self.monType=type_permis
-                return self.valideMatrice(cr=cr)
-        validite=Validation.V_MCSIMP.MCSIMP.isValid(self,cr=cr)
+  def isValid(self,cr='non'):
+      if self.state == 'unchanged':
+        return self.valid
+      for type_permis in self.definition.type:
+          if hasattr(type_permis, "__class__") and type_permis.__class__.__name__ == 'Matrice':
+             self.monType=type_permis
+             return self.valideMatrice(cr=cr)
+      validite=Validation.V_MCSIMP.MCSIMP.isValid(self,cr=cr)
 
-        if self.definition.siValide != None and validite:
+      if self.definition.siValide != None and validite:
             self.definition.siValide(self)
-        return validite
+      return validite 
 
 
-    def getNomConcept(self):
-        p=self
-        while p.parent :
+  def getNomConcept(self):
+      p=self
+      while p.parent :
+         try :
+            nomconcept=p.getSdname()
+            return nomconcept
+         except:
             try :
-                nomconcept=p.getSdname()
-                return nomconcept
-            except:
-                try :
-                    nomconcept= p.object.getSdname()
-                    return nomconcept
-                except :
-                    pass
-            p=p.parent
-        return ""
-
-    def getText(self):
-        """
-            Retourne le texte a afficher dans l'arbre representant la valeur de l'objet
-            pointe par self
-        """
-
-        if self.valeur == None :
-            return None
-        elif type(self.valeur) == float :
-            # traitement d'un flottant isole
-            txt = str(self.valeur)
-            clefobj=self.getNomConcept()
-            if clefobj in self.jdc.appliEficas.dict_reels :
-                if self.valeur in self.jdc.appliEficas.dict_reels[clefobj]:
-                    txt=self.jdc.appliEficas.dict_reels[clefobj][self.valeur]
-        elif type(self.valeur) in (list,tuple) :
-            if self.valeur==[] or self.valeur == (): return str(self.valeur)
-            # traitement des listes
-            txt='('
-            sep=''
-            for val in self.valeur:
-                if type(val) == float :
-                    clefobj=self.getNomConcept()
-                    if clefobj in self.jdc.appliEficas.dict_reels:
-                        if val in self.jdc.appliEficas.dict_reels[clefobj]:
-                            txt=txt + sep +self.jdc.appliEficas.dict_reels[clefobj][val]
-                        else :
-                            txt=txt + sep + str(val)
-                    else :
-                        txt=txt + sep + str(val)
-                else:
-                    if isinstance(val,tuple):
-                        texteVal='('
-                        for i in val :
-                            if isinstance(i, bytes) : texteVal = texteVal +"'"+str(i)+"',"
-                            else : texteVal = texteVal + str(i)+','
-                        texteVal=texteVal[:-1]+')'
-                    else :
-                        if isinstance(val,bytes): texteVal="'"+str(val)+"'"
-                        else :texteVal=str(val)
-                    txt = txt + sep+ texteVal
+               nomconcept= p.object.getSdname()
+               return nomconcept
+            except :
+               pass
+         p=p.parent
+      return ""
+
+  def getText(self):
+    """
+        Retourne le texte a afficher dans l'arbre representant la valeur de l'objet
+        pointe par self
+    """
+
+    if self.valeur == None : 
+      return None
+    elif type(self.valeur) == float : 
+      # traitement d'un flottant isole
+      txt = str(self.valeur)
+      clefobj=self.getNomConcept()
+      if clefobj in self.jdc.appliEficas.dict_reels :
+        if self.valeur in self.jdc.appliEficas.dict_reels[clefobj]:
+           txt=self.jdc.appliEficas.dict_reels[clefobj][self.valeur]
+    elif type(self.valeur) in (list,tuple) :
+      if self.valeur==[] or self.valeur == (): return str(self.valeur)
+      # traitement des listes
+      txt='('
+      sep=''
+      for val in self.valeur:
+        if type(val) == float : 
+           clefobj=self.getNomConcept()
+           if clefobj in self.jdc.appliEficas.dict_reels:
+              if val in self.jdc.appliEficas.dict_reels[clefobj]:
+                 txt=txt + sep +self.jdc.appliEficas.dict_reels[clefobj][val]
+              else :
+                 txt=txt + sep + str(val)
+           else :
+              txt=txt + sep + str(val)
+        else: 
+           if isinstance(val,tuple):
+              texteVal='('
+              for i in val :
+                  if isinstance(i, bytes) : texteVal = texteVal +"'"+str(i)+"'," 
+                  else : texteVal = texteVal + str(i)+','
+              texteVal=texteVal[:-1]+')'
+           else : 
+              if isinstance(val,bytes): texteVal="'"+str(val)+"'"
+              else :texteVal=str(val)
+           txt = txt + sep+ texteVal 
 
 ##        if len(txt) > 200:
 ##            #ligne trop longue, on tronque
 ##            txt=txt+" ..."
 ##            break
-                sep=','
-            # cas des listes de tuples de longueur 1
-            if isinstance(val,tuple) and len(self.valeur) == 1 : txt=txt+','
-            txt=txt+')'
-        else:
-            # traitement des autres cas
-            txt = str(self.valeur)
-
-        # txt peut etre une longue chaine sur plusieurs lignes.
-        # Il est possible de tronquer cette chaine au premier \n et
-        # de limiter la longueur de la chaine a 30 caracteres. Cependant
-        # ceci provoque une perte d'information pour l'utilisateur
-        # Pour le moment on retourne la chaine telle que
-        return txt
-
-    def getVal(self):
-        """
-           Retourne une chaine de caractere representant la valeur de self
-        """
-        val=self.valeur
-        if type(val) == float :
-            clefobj=self.getNomConcept()
-            if clefobj in self.jdc.appliEficas.dict_reels :
-                if val in self.jdc.appliEficas.appliEficas.dict_reels[clefobj] :
-                    return self.jdc.appliEficas.dict_reels[clefobj][val]
-        if type(val) != tuple :
-            try:
-                return val.getName()
-            except:
-                return val
-        else :
-            if val ==() or val == [] : return val
-            s='( '
-            for item in val :
-                try :
-                    s=s+item.getName()+','
-                except:
-                    s=s+repr(item)+','
-            s=s+' )'
-            return s
-
-    def waitBool(self):
-        for typ in self.definition.type:
-            try :
-                if typ == bool: return True
-            except :
-                pass
-        return False
-
-    def waitCo(self):
-        """
-            Methode booleenne qui retourne 1 si l'objet attend un objet ASSD
-            qui n'existe pas encore (type CO()), 0 sinon
-        """
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if issubclass(typ,CO) :
-                    return 1
-        return 0
-
-    def waitAssd(self):
-        """
-            Methode booleenne qui retourne 1 si le MCS attend un objet de type ASSD ou UserASSD
-            ou derive, 0 sinon
-        """
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if issubclass(typ,ASSD) and not issubclass(typ,GEOM) :
-                    return 1
-        return 0
-
-    def waitUserAssd(self):
-        """
-            Methode booleenne qui retourne 1 si le MCS attend un objet de type ASSD
-            ou derive, 0 sinon
-        """
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if issubclass(typ,UserASSD) :
-                    return 1
-        return 0
-
-    def waitUserAssdMultiple(self):
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if issubclass(typ,UserASSDMultiple) :
-                    return 1
-        return 0
-
-    def waitUserAssdOrAssdMultipleEnCreation(self):
-        for typ in self.definition.type:
-            if typ == 'createObject' :
-                return 1
-        return 0
-
-
-    def waitAssdOrGeom(self):
-        """
-             Retourne 1 si le mot-cle simple attend un objet de type
-             assd, ASSD, geom ou GEOM
-             Retourne 0 dans le cas contraire
-        """
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if typ.__name__ in ("GEOM","ASSD","geom","assd") or issubclass(typ,GEOM) :
-                    return 1
-        return 0
-
-    def waitGeom(self):
-        """
-             Retourne 1 si le mot-cle simple attend un objet de type GEOM
-             Retourne 0 dans le cas contraire
-        """
-        for typ in self.definition.type:
-            if type(typ) == type or isinstance(typ,type):
-                if issubclass(typ,GEOM) : return 1
-        return 0
-
-
-    def waitTxm(self):
-        """
-             Retourne 1 si le mot-cle simple attend un objet de type TXM
-             Retourne 0 dans le cas contraire
-        """
-        for typ in self.definition.type:
-            if typ == 'TXM' :return 1
-        return 0
-
-    def waitTuple(self):
-        for ss_type in self.definition.type:
-            if repr(ss_type).find('Tuple') != -1 :
-                return 1
-        return 0
-
-
-    def getListeValeurs(self):
-        """
-        """
-        if self.valeur == None:
-            return []
-        elif type(self.valeur) == tuple:
-            return list(self.valeur)
-        elif type(self.valeur) == list:
-            return self.valeur
-        else:
-            return [self.valeur]
-
-    def isOblig(self):
-        return self.definition.statut=='o'
-
-    def isImmuable(self):
-        return self.definition.homo=='constant'
-
-    def isInformation(self):
-        return self.definition.homo=='information'
-
-
-
-    def validVal(self,valeur):
-        """
-          Verifie que la valeur passee en argument (valeur) est valide
-          sans modifier la valeur courante
-        """
-        lval=listProto.adapt(valeur)
-        if lval is None:
-            valid=0
-            mess=tr("None n'est pas une valeur autorisee")
-        else:
-            try:
-                for val in lval:
-                    self.typeProto.adapt(val)
-                    self.intoProto.adapt(val)
-                self.cardProto.adapt(lval)
-                if self.definition.validators:
-                    self.definition.validators.convert(lval)
-                valid,mess=1,""
-            except ValError as e:
-                mess=str(e)
-                valid=0
-        return valid,mess
-
-    def validValeur(self,new_valeur):
-        """
-          Verifie que la valeur passee en argument (new_valeur) est valide
-          sans modifier la valeur courante (evite d'utiliser setValeur et est plus performant)
-        """
-        validite,mess=self.validVal(new_valeur)
-        return validite
-
-    def validValeurPartielle(self,new_valeur):
-        """
-          Verifie que la valeur passee en argument (new_valeur) est une liste partiellement valide
-          sans modifier la valeur courante du mot cle
-        """
-        validite=1
-        try:
-            for val in new_valeur:
+        sep=','
+      # cas des listes de tuples de longueur 1
+      if isinstance(val,tuple) and len(self.valeur) == 1 : txt=txt+','
+      txt=txt+')'
+    else:
+      # traitement des autres cas
+      txt = str(self.valeur)
+
+    # txt peut etre une longue chaine sur plusieurs lignes.
+    # Il est possible de tronquer cette chaine au premier \n et 
+    # de limiter la longueur de la chaine a 30 caracteres. Cependant
+    # ceci provoque une perte d'information pour l'utilisateur
+    # Pour le moment on retourne la chaine telle que
+    return txt
+
+  def getVal(self):
+    """ 
+       Retourne une chaine de caractere representant la valeur de self 
+    """
+    val=self.valeur
+    if type(val) == float : 
+      clefobj=self.getNomConcept()
+      if clefobj in self.jdc.appliEficas.dict_reels :
+        if val in self.jdc.appliEficas.appliEficas.dict_reels[clefobj] :
+           return self.jdc.appliEficas.dict_reels[clefobj][val]
+    if type(val) != tuple :
+      try:
+        return val.getName()
+      except:
+        return val
+    else :
+      if val ==() or val == [] : return val
+      s='( '
+      for item in val :
+        try :
+          s=s+item.getName()+','
+        except:
+          s=s+repr(item)+','
+      s=s+' )'
+      return s
+
+  def waitBool(self):
+      for typ in self.definition.type:
+          try :
+            if typ == bool: return True
+          except :
+            pass
+      return False
+
+  def waitCo(self):
+    """
+        Methode booleenne qui retourne 1 si l'objet attend un objet ASSD 
+        qui n'existe pas encore (type CO()), 0 sinon
+    """
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if issubclass(typ,CO) :
+           return 1
+    return 0
+
+  def waitAssd(self):
+    """ 
+        Methode booleenne qui retourne 1 si le MCS attend un objet de type ASSD ou UserASSD
+        ou derive, 0 sinon
+    """
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if issubclass(typ,ASSD) and not issubclass(typ,GEOM) :
+          return 1
+    return 0
+
+  def waitUserAssd(self):
+    """ 
+        Methode booleenne qui retourne 1 si le MCS attend un objet de type ASSD 
+        ou derive, 0 sinon
+    """
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if issubclass(typ,UserASSD) :
+          return 1
+    return 0
+
+  def waitUserAssdMultiple(self):
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if issubclass(typ,UserASSDMultiple) :
+          return 1
+    return 0
+
+  def waitUserAssdOrAssdMultipleEnCreation(self):
+    for typ in self.definition.type:
+      if typ == 'createObject' :
+          return 1
+    return 0
+
+
+  def waitAssdOrGeom(self):
+    """ 
+         Retourne 1 si le mot-cle simple attend un objet de type
+         assd, ASSD, geom ou GEOM
+         Retourne 0 dans le cas contraire
+    """
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if typ.__name__ in ("GEOM","ASSD","geom","assd") or issubclass(typ,GEOM) :
+          return 1
+    return 0
+
+  def waitGeom(self):
+    """ 
+         Retourne 1 si le mot-cle simple attend un objet de type GEOM
+         Retourne 0 dans le cas contraire
+    """
+    for typ in self.definition.type:
+      if type(typ) == type or isinstance(typ,type):
+        if issubclass(typ,GEOM) : return 1
+    return 0
+
+
+  def waitTxm(self):
+    """ 
+         Retourne 1 si le mot-cle simple attend un objet de type TXM
+         Retourne 0 dans le cas contraire
+    """
+    for typ in self.definition.type:
+      if typ == 'TXM' :return 1
+    return 0
+
+  def waitTuple(self):
+    for ss_type in self.definition.type:
+        if repr(ss_type).find('Tuple') != -1 :
+          return 1
+    return 0
+
+
+  def getListeValeurs(self):
+    """
+    """
+    if self.valeur == None:
+      return []
+    elif type(self.valeur) == tuple:
+      return list(self.valeur)
+    elif type(self.valeur) == list:
+      return self.valeur
+    else:
+      return [self.valeur]
+
+  def isOblig(self):
+    return self.definition.statut=='o'
+
+  def isImmuable(self):
+    return self.definition.homo=='constant'
+
+  def isInformation(self):
+    return self.definition.homo=='information'
+
+
+
+  def validVal(self,valeur):
+      """
+        Verifie que la valeur passee en argument (valeur) est valide
+        sans modifier la valeur courante 
+      """
+      lval=listProto.adapt(valeur)
+      if lval is None:
+         valid=0
+         mess=tr("None n'est pas une valeur autorisee")
+      else:
+         try:
+            for val in lval:
                 self.typeProto.adapt(val)
                 self.intoProto.adapt(val)
-                #on ne verifie pas la cardinalite
-                if self.definition.validators:
-                    validite=self.definition.validators.valideListePartielle(new_valeur)
-        except ValError as e:
-            validite=0
-
-        return validite
-
-    def updateConditionBloc(self):
-        """ Met a jour les blocs conditionnels dependant du mot cle simple self
-        """
-        if self.definition.position == 'global' :
-            self.etape.deepUpdateConditionBloc()
-        elif self.definition.position == 'reCalculeEtape' :
-            self.etape.deepUpdateConditionBloc()
-            self.etape.demandeRedessine()
-        elif self.definition.position == 'global_jdc' :
-            self.jdc.deepUpdateConditionBloc(self)
-            self.etape.demandeRedessine()
-        elif self.definition.position == 'inGetAttribut' :
-            self.jdc.deepUpdateConditionBloc(self)
-        else:
-            self.parent.updateConditionBloc()
-
-    def setValeur(self,new_valeur,evaluation='oui'):
-        self.initModif()
-        self.valeur = new_valeur
-        self.val = new_valeur
-        if self.valeur and self.waitUserAssd() and not(self.waitUserAssdOrAssdMultipleEnCreation()) :
-            if type(self.valeur)  in (list,tuple):
-                for v in self.valeur : v.ajoutUtilisePar(self)
-            else : self.valeur.ajoutUtilisePar(self)
-        if  self.isValid() and hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(new_valeur)
-        self.updateConditionBloc()
-        if self.definition.metAJour != None : self.updateAutresMotsClefs()
-        self.etape.modified()
-        self.finModif()
-        return 1
-
-    def evalValeur(self,new_valeur):
-        """
-            Essaie d'evaluer new_valeur comme une SD, une declaration Python
-            ou un EVAL: Retourne la valeur evaluee (ou None) et le test de reussite (1 ou 0)
-        """
-        sd = self.jdc.getSdAvantEtape(new_valeur,self.etape)
-        #sd = self.jdc.getContexteAvant(self.etape).get(new_valeur,None)
-        if sd is not None:
-            return sd,1
-        lsd = self.jdc.chercheListAvant(self.etape,new_valeur)
-        if lsd :
-            return lsd,1
-        else:
-            d={}
-            # On veut EVAL avec tous ses comportements. On utilise Accas. Perfs ??
-            d['EVAL']=Accas.EVAL
-            try :
-                objet = eval(new_valeur,d)
-                return objet,1
-            except Exception:
-                itparam=self.chercheItemParametre(new_valeur)
-                if itparam:
-                    return itparam,1
-                try :
-                    object=eval(new_valeur.valeur,d)
-                except :
-                    pass
-                if CONTEXT.debug : traceback.print_exc()
-                return None,0
-
-    def evalVal(self,new_valeur):
-        """
-           Tente d'evaluer new_valeur comme un objet du jdc (par appel a evalValItem)
-           ou comme une liste de ces memes objets
-           Si new_valeur contient au moins un separateur (,), tente l'evaluation sur
-           la chaine splittee
-        """
-        if new_valeur in ('True','False') and 'TXM' in self.definition.type  :
-            valeur=self.evalValItem(str(new_valeur))
-            return new_valeur
-        if type(new_valeur) in (list,tuple):
-            valeurretour=[]
-            for item in new_valeur :
-                valeurretour.append(self.evalValItem(item))
-            return valeurretour
-        else:
-            valeur=self.evalValItem(new_valeur)
-            return valeur
-
-    def evalValItem(self,new_valeur):
-        """
-           Tente d'evaluer new_valeur comme un concept, un parametre, un objet Python ou un UserASSD
-           Si c'est impossible retourne new_valeur inchange
-           argument new_valeur : string (nom de concept, de parametre, expression ou simple chaine)
-        """
-
-        if new_valeur in list(self.jdc.sdsDict.keys()) and self.waitUserAssd():
-            valeur=self.jdc.sdsDict[new_valeur]
-            return valeur
-        elif self.etape and self.etape.parent:
-            valeur=self.etape.parent.evalInContext(new_valeur,self.etape)
-            return valeur
-        else:
-            try :
-                valeur = eval(val)
-                return valeur
-            except:
-                #traceback.print_exc()
-                return new_valeur
-                pass
-
-    def chercheItemParametre (self,new_valeur):
+            self.cardProto.adapt(lval)
+            if self.definition.validators:
+                self.definition.validators.convert(lval)
+            valid,mess=1,""
+         except ValError as e:
+            mess=str(e)
+            valid=0
+      return valid,mess
+
+  def validValeur(self,new_valeur):
+      """
+        Verifie que la valeur passee en argument (new_valeur) est valide
+        sans modifier la valeur courante (evite d'utiliser setValeur et est plus performant)
+      """
+      validite,mess=self.validVal(new_valeur)
+      return validite
+
+  def validValeurPartielle(self,new_valeur):
+      """
+        Verifie que la valeur passee en argument (new_valeur) est une liste partiellement valide
+        sans modifier la valeur courante du mot cle
+      """
+      validite=1
+      try:
+          for val in new_valeur:
+              self.typeProto.adapt(val)
+              self.intoProto.adapt(val)
+              #on ne verifie pas la cardinalite
+              if self.definition.validators:
+                  validite=self.definition.validators.valideListePartielle(new_valeur)
+      except ValError as e:
+          validite=0
+
+      return validite
+
+  def updateConditionBloc(self):
+      """ Met a jour les blocs conditionnels dependant du mot cle simple self
+      """
+      if self.definition.position == 'global' : 
+         self.etape.deepUpdateConditionBloc()
+      elif self.definition.position == 'reCalculeEtape' :
+         self.etape.deepUpdateConditionBloc()
+         self.etape.demandeRedessine()
+      elif self.definition.position == 'global_jdc' :
+         self.jdc.deepUpdateConditionBloc(self)
+         self.etape.demandeRedessine()
+      elif self.definition.position == 'inGetAttribut' :
+         self.jdc.deepUpdateConditionBloc(self)
+      else:
+         self.parent.updateConditionBloc()
+
+  def setValeur(self,new_valeur,evaluation='oui'):
+      self.initModif()
+      self.valeur = new_valeur
+      self.val = new_valeur
+      if self.valeur and self.waitUserAssd() and not(self.waitUserAssdOrAssdMultipleEnCreation()) : 
+         if type(self.valeur)  in (list,tuple):
+            for v in self.valeur : v.ajoutUtilisePar(self)
+         else : self.valeur.ajoutUtilisePar(self)
+      if  self.isValid() and hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(new_valeur)
+      self.updateConditionBloc()
+      if self.definition.metAJour != None : self.updateAutresMotsClefs()
+      self.etape.modified()
+      self.finModif()
+      return 1
+
+  def evalValeur(self,new_valeur):
+    """
+        Essaie d'evaluer new_valeur comme une SD, une declaration Python 
+        ou un EVAL: Retourne la valeur evaluee (ou None) et le test de reussite (1 ou 0)
+    """
+    sd = self.jdc.getSdAvantEtape(new_valeur,self.etape)
+    #sd = self.jdc.getContexteAvant(self.etape).get(new_valeur,None)
+    if sd is not None:
+      return sd,1
+    lsd = self.jdc.chercheListAvant(self.etape,new_valeur) 
+    if lsd :
+      return lsd,1
+    else:
+      d={}
+      # On veut EVAL avec tous ses comportements. On utilise Accas. Perfs ??
+      d['EVAL']=Accas.EVAL
+      try :
+        objet = eval(new_valeur,d)
+        return objet,1
+      except Exception:
+        itparam=self.chercheItemParametre(new_valeur)
+        if itparam:
+             return itparam,1
+        try :
+             object=eval(new_valeur.valeur,d)
+        except :
+             pass
+        if CONTEXT.debug : traceback.print_exc()
+        return None,0
+
+  def evalVal(self,new_valeur):
+    """
+       Tente d'evaluer new_valeur comme un objet du jdc (par appel a evalValItem)
+       ou comme une liste de ces memes objets
+       Si new_valeur contient au moins un separateur (,), tente l'evaluation sur
+       la chaine splittee
+    """
+    if new_valeur in ('True','False') and 'TXM' in self.definition.type  :
+       valeur=self.evalValItem(str(new_valeur))
+       return new_valeur
+    if type(new_valeur) in (list,tuple):
+       valeurretour=[]
+       for item in new_valeur :
+          valeurretour.append(self.evalValItem(item))
+       return valeurretour
+    else:
+       valeur=self.evalValItem(new_valeur)
+       return valeur
+
+  def evalValItem(self,new_valeur):
+    """
+       Tente d'evaluer new_valeur comme un concept, un parametre, un objet Python ou un UserASSD
+       Si c'est impossible retourne new_valeur inchange
+       argument new_valeur : string (nom de concept, de parametre, expression ou simple chaine)
+    """
+
+    if new_valeur in list(self.jdc.sdsDict.keys()) and self.waitUserAssd():
+       valeur=self.jdc.sdsDict[new_valeur]
+       return valeur
+    elif self.etape and self.etape.parent:
+       valeur=self.etape.parent.evalInContext(new_valeur,self.etape)
+       return valeur
+    else:
+       try :
+           valeur = eval(val)
+           return valeur
+       except:
+           #traceback.print_exc()
+           return new_valeur
+           pass
+
+  def chercheItemParametre (self,new_valeur):
         try:
-            nomparam=new_valeur[0:new_valeur.find("[")]
-            indice=new_valeur[new_valeur.find(u"[")+1:new_valeur.find(u"]")]
-            for p in self.jdc.params:
-                if p.nom == nomparam :
-                    if int(indice) < len(p.getValeurs()):
-                        itparam=parametre.ITEM_PARAMETRE(p,int(indice))
-                        return itparam
-            return None
+          nomparam=new_valeur[0:new_valeur.find("[")]
+          indice=new_valeur[new_valeur.find(u"[")+1:new_valeur.find(u"]")]
+          for p in self.jdc.params:
+             if p.nom == nomparam :
+                if int(indice) < len(p.getValeurs()):
+                   itparam=parametre.ITEM_PARAMETRE(p,int(indice))
+                   return itparam
+          return None
         except:
-            return None
-
-    def updateConcept(self,sd):
-        if not self.waitAssd() : return
-        if type(self.valeur) in (list,tuple) :
-            if sd in self.valeur:
-                newVal=[]
-                for v in self.valeur : newVal.append(v.nom)
-                self.initModif()
-                if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(newVal)
-                self.finModif()
-        else:
-            if sd == self.valeur:
-                self.initModif()
-                if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(sd.nom)
-                self.finModif()
-
-    def deleteConcept(self,sd):
-        """
-            Inputs :
-               - sd=concept detruit
-            Fonction :
-            Met a jour la valeur du mot cle simple suite a la disparition
-            du concept sd
-            Attention aux matrices
-        """
+          return None
+
+  def updateConcept(self,sd):
+    if not self.waitAssd() : return
+    if type(self.valeur) in (list,tuple) :
+       if sd in self.valeur:
+         newVal=[]
+         for v in self.valeur : newVal.append(v.nom)
+         self.initModif()
+         if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(newVal)
+         self.finModif()
+    else:
+       if sd == self.valeur:
+         self.initModif()
+         if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb(sd.nom)
+         self.finModif()
+
+  def deleteConcept(self,sd):
+    """ 
+        Inputs :
+           - sd=concept detruit
+        Fonction :
+        Met a jour la valeur du mot cle simple suite a la disparition 
+        du concept sd
+        Attention aux matrices
+    """
 ##PNPNPN a tester
-        if type(self.valeur) == tuple :
-            if sd in self.valeur:
-                self.initModif()
-                self.valeur=list(self.valeur)
-                while sd in self.valeur : self.valeur.remove(sd)
-                if hasattr(self, 'objPyxb') and self.objPyxb :
-                    newVal=[]
-                    for v in self.valeur : newVal.append(v.nom)
-                    if newVal == [] : self.delObjPyxb()
-                    else : self.setValeurObjPyxb(sd.nom)
-                self.finModif()
-        elif type(self.valeur) == list:
-            if sd in self.valeur:
-                self.initModif()
-                while sd in self.valeur : self.valeur.remove(sd)
-                self.finModif()
-        else:
-            if self.valeur == sd:
-                self.initModif()
-                self.valeur=None
-                self.val=None
-                if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb()
-                self.finModif()
-        # Glut Horrible pour les matrices OT ???
-        #if sd.__class__.__name__== "variable":
-        #   for type_permis in self.definition.type:
-                #if type(type_permis) == types.InstanceType:
-                # a voir en python 3
-        #           if type_permis.__class__.__name__ == 'Matrice' :
-        #               self.state="changed"
-        #               self.isValid()
-
-
-    def replaceConcept(self,old_sd,sd):
-        """
-            Inputs :
-               - old_sd=concept remplace
-               - sd=nouveau concept
-            Fonction :
-            Met a jour la valeur du mot cle simple suite au remplacement
-            du concept old_sd
-        """
-        #print ("replaceConcept",old_sd,sd)
-        if type(self.valeur) == tuple :
-            if old_sd in self.valeur:
-                self.initModif()
-                self.valeur=list(self.valeur)
-                i=self.valeur.index(old_sd)
-                self.valeur[i]=sd
-                self.finModif()
-        elif type(self.valeur) == list:
-            if old_sd in self.valeur:
-                self.initModif()
-                i=self.valeur.index(old_sd)
-                self.valeur[i]=sd
-                self.finModif()
-        else:
-            if self.valeur == old_sd:
-                self.initModif()
-                self.valeur=sd
-                self.val=sd
-                self.finModif()
-
-    def setValeurCo(self,nomCO):
-        """
-            Affecte a self l'objet de type CO et de nom nomCO
-        """
-        step=self.etape.parent
-        if nomCO == None or nomCO == '':
-            new_objet=None
-        else:
-            # Avant de creer un concept il faut s'assurer du contexte : step
-            # courant
-            sd= step.getSdAutourEtape(nomCO,self.etape,avec='oui')
-            if sd:
-                # Si un concept du meme nom existe deja dans la portee de l'etape
-                # on ne cree pas le concept
-                return 0,tr("un concept de meme nom existe deja")
-            # Il n'existe pas de concept de meme nom. On peut donc le creer
-            # Il faut neanmoins que la methode NommerSdProd de step gere les
-            # contextes en mode editeur
-            # Normalement la methode  du Noyau doit etre surchargee
-            # On declare l'etape du mot cle comme etape courante pour nommerSDProd
-            cs= CONTEXT.getCurrentStep()
-            CONTEXT.unsetCurrentStep()
-            CONTEXT.setCurrentStep(step)
-            step.setEtapeContext(self.etape)
-            new_objet = Accas.CO(nomCO)
-            CONTEXT.unsetCurrentStep()
-            CONTEXT.setCurrentStep(cs)
+    if type(self.valeur) == tuple :
+      if sd in self.valeur:
         self.initModif()
-        self.valeur = new_objet
-        self.val = new_objet
-        # On force l'enregistrement de new_objet en tant que concept produit
-        # de la macro en appelant getType_produit avec force=1
-        self.etape.getType_produit(force=1)
+        self.valeur=list(self.valeur)
+        while sd in self.valeur : self.valeur.remove(sd)
+        if hasattr(self, 'objPyxb') and self.objPyxb :
+           newVal=[]
+           for v in self.valeur : newVal.append(v.nom)
+           if newVal == [] : self.delObjPyxb()
+           else : self.setValeurObjPyxb(sd.nom) 
+        self.finModif()
+    elif type(self.valeur) == list:
+      if sd in self.valeur:
+        self.initModif()
+        while sd in self.valeur : self.valeur.remove(sd)
+        self.finModif()
+    else:
+      if self.valeur == sd:
+        self.initModif()
+        self.valeur=None
+        self.val=None
+        if hasattr(self, 'objPyxb') and self.objPyxb : self.setValeurObjPyxb()
+        self.finModif()
+    # Glut Horrible pour les matrices OT ???
+    #if sd.__class__.__name__== "variable":
+    #   for type_permis in self.definition.type:
+            #if type(type_permis) == types.InstanceType:
+            # a voir en python 3
+    #           if type_permis.__class__.__name__ == 'Matrice' :
+    #               self.state="changed"
+    #               self.isValid()
+                  
+
+  def replaceConcept(self,old_sd,sd):
+    """
+        Inputs :
+           - old_sd=concept remplace
+           - sd=nouveau concept
+        Fonction :
+        Met a jour la valeur du mot cle simple suite au remplacement 
+        du concept old_sd
+    """
+    #print ("replaceConcept",old_sd,sd)
+    if type(self.valeur) == tuple :
+      if old_sd in self.valeur:
+        self.initModif()
+        self.valeur=list(self.valeur)
+        i=self.valeur.index(old_sd)
+        self.valeur[i]=sd
+        self.finModif()
+    elif type(self.valeur) == list:
+      if old_sd in self.valeur:
+        self.initModif()
+        i=self.valeur.index(old_sd)
+        self.valeur[i]=sd
+        self.finModif()
+    else:
+      if self.valeur == old_sd:
+        self.initModif()
+        self.valeur=sd
+        self.val=sd
         self.finModif()
-        step.resetContext()
-        #print "setValeurCo",new_objet
-        return 1,tr("Concept cree")
-
-    def verifExistenceSd(self):
-        """
-           Verifie que les structures de donnees utilisees dans self existent bien dans le contexte
-           avant etape, sinon enleve la referea ces concepts
-        """
-        #print "verifExistenceSd"
-        # Attention : possible probleme avec include
-        # A priori il n'y a pas de raison de retirer les concepts non existants
-        # avant etape. En fait il s'agit uniquement eventuellement de ceux crees par une macro
-        l_sd_avant_etape = list(self.jdc.getContexteAvant(self.etape).values())
-        if type(self.valeur) in (tuple,list) :
-            l=[]
-            for sd in self.valeur:
-                if isinstance(sd,ASSD) :
-                    if sd in l_sd_avant_etape or self.etape.getSdprods(sd.nom) is sd:
-                        l.append(sd)
-                else:
-                    l.append(sd)
-            if len(l) < len(self.valeur):
-                self.initModif()
-                self.valeur=tuple(l)
-                self.finModif()
-        else:
-            if isinstance(self.valeur,ASSD) :
-                if self.valeur not in l_sd_avant_etape and self.etape.getSdprods(self.valeur.nom) is None:
-                    self.initModif()
-                    self.valeur = None
-                    self.finModif()
-
-    def renommeSdCree(self,nouveauNom):
-        if nouveauNom in self.jdc.sdsDict : return (0, 'concept deja existant')
-        if self.valeur == None : return (0, 'pb sur la valeur')
-        else :   self.valeur.renomme(nouveauNom)
-        return (1, 'concept renomme')
-
-    def renommeSdCreeDsListe(self,objASSD, nouveauNom):
-        #print ( 'dans renommeSdCree', self.jdc.sdsDict, self.valeur, nouveauNom)
-        if nouveauNom in self.jdc.sdsDict : return (0, 'concept deja existant')
-        objASSD.renomme(nouveauNom)
-        return (1, 'concept renomme')
-
-
-
-    def getMinMax(self):
-        """
-        Retourne les valeurs min et max admissibles pour la valeur de self
-        """
-        return self.definition.min,self.definition.max
-
-
-    def getType(self):
-        """
-        Retourne le type attendu par le mot-cle simple
-        """
-        return self.definition.type
-
-    def deleteMcGlobal(self):
-        """ Retire self des declarations globales
-        """
-   # on est oblige de verifier si le nom est dans etape
-   # car parfois l ordre des creations/destruction n est pas clair
-   # quand on a des blocs freres qui contiennent le meme mc global
-   # cas de NumericalMethod dans VIMMP
-        if self.definition.position == 'global' :
-            etape = self.getEtape()
-            if etape and self.nom in etape.mc_globaux:
-                if etape.mc_globaux[self.nom] == self :
-                    del etape.mc_globaux[self.nom]
-        elif self.definition.position == 'reCalculeEtape' :
-            etape = self.getEtape()
-            if etape  :
-                if self.nom in etape.mc_globaux:
-                    if etape.mc_globaux[self.nom] == self :
-                        del etape.mc_globaux[self.nom]
-                        self.etape.doitEtreRecalculee = True
-                    #print ('deleteMcGlobal je mets doitEtreRecalculee = True avec', self.nom ,' pour ', etape.nom)
-        elif self.definition.position == 'global_jdc' :
-            if self.nom in self.jdc.mc_globaux:
-                try : del self.jdc.mc_globaux[self.nom]
-                except : print ('!!!!!!!! Souci delete mc_globaux')
-
-    def updateMcGlobal(self):
-        """
-           Met a jour les mots cles globaux enregistres dans l'etape parente
-           et dans le jdc parent.
-           Un mot cle simple peut etre global.
-        """
-        if self.definition.position == 'global' :
-            etape = self.getEtape()
-            if etape :
-                etape.mc_globaux[self.nom]=self
-        elif self.definition.position == 'reCalculeEtape' :
-            etape = self.getEtape()
-            if etape :
-                etape.mc_globaux[self.nom]=self
-                etape.doitEtreRecalculee=True
-                print ('je mets doitEtreRecalculee = True avec', self.nom ,' pour ', etape.nom)
-                print ('j ajoute au mc_globaux')
-        elif self.definition.position == 'global_jdc' :
-            if self.jdc:
-                self.jdc.mc_globaux[self.nom]=self
-
-    def nbrColonnes(self):
-        genea = self.getGenealogie()
-        if "VALE_C" in genea and "DEFI_FONCTION" in genea : return 3
-        if "VALE" in genea and "DEFI_FONCTION" in genea : return 2
-        return 0
-
-    def valideItem(self,item):
-        """Valide un item isole. Cet item est candidata l'ajout a la liste existante"""
-        valid=1
-        try:
-                #on verifie le type
-            self.typeProto.adapt(item)
-            #on verifie les choix possibles
-            self.intoProto.adapt(item)
-            #on ne verifie pas la cardinalite
-            if self.definition.validators:
-                valid=self.definition.validators.verifItem(item)
-        except ValError as e:
-            #traceback.print_exc()
-            valid=0
-        return valid
 
-    def verifType(self,item):
-        """Verifie le type d'un item de liste"""
-        try:
-            #on verifie le type
-            self.typeProto.adapt(item)
-            #on verifie les choix possibles
-            self.intoProto.adapt(item)
-            #on ne verifie pas la cardinalite mais on verifie les validateurs
-            if self.definition.validators:
-                valid=self.definition.validators.verifItem(item)
-            comment=""
-            valid=1
-        except ValError as e:
-            #traceback.print_exc()
-            comment=tr(e.__str__())
-            valid=0
-        return valid,comment
-
-    def valideMatrice(self,cr):
-        ok=1
-        if self.valeur == None :
-            self.setValid(0)
-            return 0
-        if self.monType.methodeCalculTaille != None :
-            MCSIMP.__dict__[self.monType.methodeCalculTaille](*(self,))
-        if len(self.valeur) == self.monType.nbLigs :
-            for i in range(len(self.valeur)):
-                if len(self.valeur[i]) != self.monType.nbCols: ok=0
-        if not ok :
-            self.setValid(0)
-            if cr == 'oui' :
-                self.cr.fatal(tr("La matrice n'est pas une matrice %(n_lign)d sur %(n_col)d", \
-                {'n_lign': self.monType.nbLigs, 'n_col': self.monType.nbCols}))
-            return 0
-        for i in range(self.monType.nbLigs):
-            for j in range(self.monType.nbCols):
-                val=self.valeur[i][j]
-                if self.monType.typElt == 'R' :
-                    try    : val=float(str(val))
-                    except : ok=0
-                if self.monType.typElt == 'TXM' :
-                    if self.monType.typEltInto != None and val not in self.monType.typEltInto : ok=0
-        if not ok :
-            self.setValid(0)
-            if cr == 'oui' :
-                self.cr.fatal(tr("Les elements de la matrice ne sont pas d un bon type"))
-            return 0
-        self.setValid(1)
-        return 1
-
-
-
-    def valideMatriceOT(self,cr):
-            #Attention, la matrice contient comme dernier tuple l ordre des variables
-        if self.valideEnteteMatrice()==False :
-            self.setValid(0)
-            if cr == "oui" : self.cr.fatal(tr("La matrice n'a pas le bon entete"))
-            return 0
-        if self.monType.methodeCalculTaille != None :
-            MCSIMP.__dict__[self.monType.methodeCalculTaille](*(self,))
-        try :
-        #if 1 :
-            ok=0
-            if len(self.valeur) == self.monType.nbLigs +1:
-                ok=1
-                for i in range(len(self.valeur) -1):
-                    if len(self.valeur[i])!= self.monType.nbCols:
-                        ok=0
-            if ok:
-                self.setValid(1)
-                return 1
-        except :
-        #else :
+  def setValeurCo(self,nomCO):
+      """
+          Affecte a self l'objet de type CO et de nom nomCO
+      """
+      step=self.etape.parent
+      if nomCO == None or nomCO == '':
+         new_objet=None
+      else:
+         # Avant de creer un concept il faut s'assurer du contexte : step 
+         # courant
+         sd= step.getSdAutourEtape(nomCO,self.etape,avec='oui')
+         if sd:
+            # Si un concept du meme nom existe deja dans la portee de l'etape
+            # on ne cree pas le concept
+            return 0,tr("un concept de meme nom existe deja")
+         # Il n'existe pas de concept de meme nom. On peut donc le creer 
+         # Il faut neanmoins que la methode NommerSdProd de step gere les 
+         # contextes en mode editeur
+         # Normalement la methode  du Noyau doit etre surchargee
+         # On declare l'etape du mot cle comme etape courante pour nommerSDProd
+         cs= CONTEXT.getCurrentStep()
+         CONTEXT.unsetCurrentStep()
+         CONTEXT.setCurrentStep(step)
+         step.setEtapeContext(self.etape)
+         new_objet = Accas.CO(nomCO)
+         CONTEXT.unsetCurrentStep()
+         CONTEXT.setCurrentStep(cs)
+      self.initModif()
+      self.valeur = new_objet
+      self.val = new_objet
+      # On force l'enregistrement de new_objet en tant que concept produit 
+      # de la macro en appelant getType_produit avec force=1
+      self.etape.getType_produit(force=1)
+      self.finModif()
+      step.resetContext()
+      #print "setValeurCo",new_objet
+      return 1,tr("Concept cree")
+        
+  def verifExistenceSd(self):
+     """
+        Verifie que les structures de donnees utilisees dans self existent bien dans le contexte
+        avant etape, sinon enleve la referea ces concepts
+     """
+     #print "verifExistenceSd"
+     # Attention : possible probleme avec include
+     # A priori il n'y a pas de raison de retirer les concepts non existants
+     # avant etape. En fait il s'agit uniquement eventuellement de ceux crees par une macro
+     l_sd_avant_etape = list(self.jdc.getContexteAvant(self.etape).values())  
+     if type(self.valeur) in (tuple,list) :
+       l=[]
+       for sd in self.valeur:
+         if isinstance(sd,ASSD) :
+            if sd in l_sd_avant_etape or self.etape.getSdprods(sd.nom) is sd:
+               l.append(sd)
+         else:
+            l.append(sd)
+       if len(l) < len(self.valeur):
+          self.initModif()
+          self.valeur=tuple(l)
+          self.finModif()
+     else:
+       if isinstance(self.valeur,ASSD) :
+          if self.valeur not in l_sd_avant_etape and self.etape.getSdprods(self.valeur.nom) is None:
+             self.initModif()
+             self.valeur = None
+             self.finModif()
+  def renommeSdCree(self,nouveauNom):
+      if nouveauNom in self.jdc.sdsDict : return (0, 'concept deja existant')
+      if self.valeur == None : return (0, 'pb sur la valeur')
+      else :   self.valeur.renomme(nouveauNom)
+      return (1, 'concept renomme')
+      
+  def renommeSdCreeDsListe(self,objASSD, nouveauNom):
+      #print ( 'dans renommeSdCree', self.jdc.sdsDict, self.valeur, nouveauNom)
+      if nouveauNom in self.jdc.sdsDict : return (0, 'concept deja existant')
+      objASSD.renomme(nouveauNom)
+      return (1, 'concept renomme')
+      
+
+
+  def getMinMax(self):
+     """
+     Retourne les valeurs min et max admissibles pour la valeur de self
+     """
+     return self.definition.min,self.definition.max
+
+
+  def getType(self):
+     """
+     Retourne le type attendu par le mot-cle simple
+     """
+     return self.definition.type
+
+  def deleteMcGlobal(self):
+      """ Retire self des declarations globales
+      """
+ # on est oblige de verifier si le nom est dans etape
+ # car parfois l ordre des creations/destruction n est pas clair
+ # quand on a des blocs freres qui contiennent le meme mc global
+ # cas de NumericalMethod dans VIMMP
+      if self.definition.position == 'global' : 
+         etape = self.getEtape()
+         if etape and self.nom in etape.mc_globaux:
+            if etape.mc_globaux[self.nom] == self :
+               del etape.mc_globaux[self.nom]
+      elif self.definition.position == 'reCalculeEtape' :
+         etape = self.getEtape()
+         if etape  :
+            if self.nom in etape.mc_globaux:
+               if etape.mc_globaux[self.nom] == self :
+                  del etape.mc_globaux[self.nom]
+                  self.etape.doitEtreRecalculee = True
+               #print ('deleteMcGlobal je mets doitEtreRecalculee = True avec', self.nom ,' pour ', etape.nom)
+      elif self.definition.position == 'global_jdc' :
+         if self.nom in self.jdc.mc_globaux:
+            try : del self.jdc.mc_globaux[self.nom]
+            except : print ('!!!!!!!! Souci delete mc_globaux')
+
+  def updateMcGlobal(self):
+     """
+        Met a jour les mots cles globaux enregistres dans l'etape parente
+        et dans le jdc parent.
+        Un mot cle simple peut etre global. 
+     """
+     if self.definition.position == 'global' :
+        etape = self.getEtape()
+        if etape :
+           etape.mc_globaux[self.nom]=self
+     elif self.definition.position == 'reCalculeEtape' :
+        etape = self.getEtape()
+        if etape :
+           etape.mc_globaux[self.nom]=self
+           etape.doitEtreRecalculee=True
+           print ('je mets doitEtreRecalculee = True avec', self.nom ,' pour ', etape.nom)
+           print ('j ajoute au mc_globaux')
+     elif self.definition.position == 'global_jdc' :
+        if self.jdc:
+           self.jdc.mc_globaux[self.nom]=self
+
+  def nbrColonnes(self):
+     genea = self.getGenealogie()
+     if "VALE_C" in genea and "DEFI_FONCTION" in genea : return 3
+     if "VALE" in genea and "DEFI_FONCTION" in genea : return 2
+     return 0
+
+  def valideItem(self,item):
+      """Valide un item isole. Cet item est candidata l'ajout a la liste existante"""
+      valid=1
+      try:
+          #on verifie le type
+          self.typeProto.adapt(item)
+          #on verifie les choix possibles
+          self.intoProto.adapt(item)
+          #on ne verifie pas la cardinalite
+          if self.definition.validators:
+              valid=self.definition.validators.verifItem(item)
+      except ValError as e:
+          #traceback.print_exc()
+          valid=0
+      return valid
+
+  def verifType(self,item):
+      """Verifie le type d'un item de liste"""
+      try:
+          #on verifie le type
+          self.typeProto.adapt(item)
+          #on verifie les choix possibles
+          self.intoProto.adapt(item)
+          #on ne verifie pas la cardinalite mais on verifie les validateurs
+          if self.definition.validators:
+              valid=self.definition.validators.verifItem(item)
+          comment=""
+          valid=1
+      except ValError as e:
+          #traceback.print_exc()
+          comment=tr(e.__str__())
+          valid=0
+      return valid,comment
+
+  def valideMatrice(self,cr):
+      ok=1
+      if self.valeur == None : 
+         self.setValid(0)
+         return 0
+      if self.monType.methodeCalculTaille != None :
+           MCSIMP.__dict__[self.monType.methodeCalculTaille](*(self,))
+      if len(self.valeur) == self.monType.nbLigs :
+         for i in range(len(self.valeur)):
+             if len(self.valeur[i]) != self.monType.nbCols: ok=0
+      if not ok : 
+         self.setValid(0)
+         if cr == 'oui' :
+             self.cr.fatal(tr("La matrice n'est pas une matrice %(n_lign)d sur %(n_col)d", \
+             {'n_lign': self.monType.nbLigs, 'n_col': self.monType.nbCols}))
+         return 0
+      for i in range(self.monType.nbLigs):
+          for j in range(self.monType.nbCols):
+              val=self.valeur[i][j]
+              if self.monType.typElt == 'R' :
+                  try    : val=float(str(val))
+                  except : ok=0
+              if self.monType.typElt == 'TXM' :
+                 if self.monType.typEltInto != None and val not in self.monType.typEltInto : ok=0
+      if not ok : 
+         self.setValid(0)
+         if cr == 'oui' :
+             self.cr.fatal(tr("Les elements de la matrice ne sont pas d un bon type")) 
+         return 0
+      self.setValid(1)
+      return 1
+
+
+
+  def valideMatriceOT(self,cr):
+       #Attention, la matrice contient comme dernier tuple l ordre des variables
+       if self.valideEnteteMatrice()==False :
+           self.setValid(0)
+           if cr == "oui" : self.cr.fatal(tr("La matrice n'a pas le bon entete"))
+           return 0
+       if self.monType.methodeCalculTaille != None :
+           MCSIMP.__dict__[self.monType.methodeCalculTaille](*(self,))
+       try :
+       #if 1 :
+           ok=0
+           if len(self.valeur) == self.monType.nbLigs +1:
+              ok=1
+              for i in range(len(self.valeur) -1):
+                  if len(self.valeur[i])!= self.monType.nbCols:
+                     ok=0
+           if ok: 
+              self.setValid(1)
+              return 1 
+       except :
+       #else :
             pass
-        if cr == 'oui' :
-            self.cr.fatal(tr("La matrice n'est pas une matrice %(n_lign)d sur %(n_col)d", \
-            {'n_lign': self.monType.nbLigs, 'n_col': self.monType.nbCols}))
-        self.setValid(0)
-        return 0
-
-
-    def nbDeVariables(self):
-        listeVariables=self.jdc.getVariables(self.etape)
-        self.monType.nbLigs=len(listeVariables)
-        self.monType.nbCols=len(listeVariables)
-
-    def valideEnteteMatrice(self):
-        if self.jdc.getDistributions(self.etape) == () or self.valeur == None : return 0
-        if self.jdc.getDistributions(self.etape) != self.valeur[0] : return 0
-        return 1
-
-    def changeEnteteMatrice(self):
-        a=[self.jdc.getDistributions(self.etape),]
-        for t in self.valeur[1:]:
-            a.append(t)
-        self.valeur=a
-
-
-    def nbDeDistributions(self):
-        listeVariables=self.jdc.getDistributions(self.etape)
-        self.monType.nbLigs=len(listeVariables)
-        self.monType.nbCols=len(listeVariables)
-
-    def getNomDsXML(self):
-        nomDsXML=self.parent.getNomDsXML()+"."+self.nom
-        return nomDsXML
-
-
-    def verifTypeIhm(self,val,cr='non'):
-        try :
-            val.eval()
-            return 1
+       if cr == 'oui' :
+             self.cr.fatal(tr("La matrice n'est pas une matrice %(n_lign)d sur %(n_col)d", \
+             {'n_lign': self.monType.nbLigs, 'n_col': self.monType.nbCols}))
+       self.setValid(0)
+       return 0
+
+
+  def nbDeVariables(self):
+       listeVariables=self.jdc.getVariables(self.etape)
+       self.monType.nbLigs=len(listeVariables)
+       self.monType.nbCols=len(listeVariables)
+      
+  def valideEnteteMatrice(self):
+      if self.jdc.getDistributions(self.etape) == () or self.valeur == None : return 0
+      if self.jdc.getDistributions(self.etape) != self.valeur[0] : return 0
+      return 1
+     
+  def changeEnteteMatrice(self):
+      a=[self.jdc.getDistributions(self.etape),]
+      for t in self.valeur[1:]:
+         a.append(t)
+      self.valeur=a
+
+
+  def nbDeDistributions(self):
+       listeVariables=self.jdc.getDistributions(self.etape)
+       self.monType.nbLigs=len(listeVariables)
+       self.monType.nbCols=len(listeVariables)
+      
+  def getNomDsXML(self):
+      nomDsXML=self.parent.getNomDsXML()+"."+self.nom
+      return nomDsXML
+
+
+  def verifTypeIhm(self,val,cr='non'):
+      try :
+         val.eval()
+         return 1
+      except :
+         traceback.print_exc()
+         pass
+      return self.verifType(val,cr)
+
+  def verifTypeliste(self,val,cr='non') :
+      verif=0
+      for v in val :
+        verif=verif+self.verifTypeIhm(v,cr)
+      return verif
+
+  def initModifUp(self):
+    Validation.V_MCSIMP.MCSIMP.initModifUp(self)
+    CONNECTOR.Emit(self,"valid")
+
+  def deleteRef(self):
+    if self.valeur == None or self.valeur == [] : return
+    if not type(self.valeur) in (list, tuple): lesValeurs=(self.valeur,)
+    else : lesValeurs=self.valeur
+    for val in lesValeurs:
+      if self.definition.creeDesObjets :
+         val.deleteReference(self) 
+      else :
+         if (hasattr (val, 'enleveUtilisePar')) : val.enleveUtilisePar(self) 
+
+  def updateAutresMotsClefs(self):
+      print ('updateAutresMotsClefs')
+      for (nomMC, Xpath) in self.definition.metAJour :
+        exp=Xpath+'.getChild("'+nomMC+'")'
+        try : 
+          lesMotsClefs = eval(exp)
         except :
-            traceback.print_exc()
-            pass
-        return self.verifType(val,cr)
-
-    def verifTypeliste(self,val,cr='non') :
-        verif=0
-        for v in val :
-            verif=verif+self.verifTypeIhm(v,cr)
-        return verif
-
-    def initModifUp(self):
-        Validation.V_MCSIMP.MCSIMP.initModifUp(self)
-        CONNECTOR.Emit(self,"valid")
-
-    def deleteRef(self):
-        if self.valeur == None or self.valeur == [] : return
-        if not type(self.valeur) in (list, tuple): lesValeurs=(self.valeur,)
-        else : lesValeurs=self.valeur
-        for val in lesValeurs:
-            if self.definition.creeDesObjets :
-                val.deleteReference(self)
-            else :
-                if (hasattr (val, 'enleveUtilisePar')) : val.enleveUtilisePar(self)
-
-    def updateAutresMotsClefs(self):
-        print ('updateAutresMotsClefs')
-        for (nomMC, Xpath) in self.definition.metAJour :
-            exp=Xpath+'.getChild("'+nomMC+'")'
-            try :
-                lesMotsClefs = eval(exp)
-            except :
-                lesMotsClefs = []
-            if not type(lesMotsClefs) in (list, tuple): lesMotsClefs=(lesMotsClefs,)
-            if isinstance (lesMotsClefs, MCSIMP): lesMotsClefs=(lesMotsClefs,)
-            listeEtapesDejaRedessinees=[]
-            listeMotsClefsAppel=[]
-            for leMotCle in lesMotsClefs:
-                leMotCle.state='changed'
-                if not leMotCle.isValid() : leMotCle.val=None
-                if leMotCle.etape not in listeEtapesDejaRedessinees :
-                    listeEtapesDejaRedessinees.append(leMotCle.etape)
-                    listeMotsClefsAppel.append(leMotCle)
-            for leMotCle in listeMotsClefsAppel:
-                leMotCle.demandeRedessine()
-
-        print ('fin updateAutresMotsClefs')
+          lesMotsClefs = []
+        if not type(lesMotsClefs) in (list, tuple): lesMotsClefs=(lesMotsClefs,)
+        if isinstance (lesMotsClefs, MCSIMP): lesMotsClefs=(lesMotsClefs,)
+        listeEtapesDejaRedessinees=[]
+        listeMotsClefsAppel=[]
+        for leMotCle in lesMotsClefs: 
+           leMotCle.state='changed'
+           if not leMotCle.isValid() : leMotCle.val=None
+           if leMotCle.etape not in listeEtapesDejaRedessinees :
+              listeEtapesDejaRedessinees.append(leMotCle.etape)
+              listeMotsClefsAppel.append(leMotCle)
+        for leMotCle in listeMotsClefsAppel: 
+           leMotCle.demandeRedessine()
+              
+      print ('fin updateAutresMotsClefs')
+
index 4b49693331714e1c78e6c6131fe2429eb9a0e6ea..62b6442653a889522d501778b3642ec4dd475f94 100755 (executable)
@@ -36,6 +36,9 @@ ihmDir     = os.path.join(repIni,"InterfaceQT4")
 if ihmDir     not in sys.path : sys.path.append(ihmDir)
 if ihmQTDir   not in sys.path : sys.path.append(ihmQTDir)
 if editeurDir not in sys.path : sys.path.append(editeurDir)
+if sys.version_info[0] < 3:
+    print("Must be using Python 3")
+    sys.exit()
 
 if sys.version_info[0] < 3:
     print("Must be using Python 3")
index d5cfa2f0e1443b77f066162a8825c99429f8436c..0abe9fb9fb347ce8d56325bf06ac4ccff8acda8a 100644 (file)
@@ -36,6 +36,7 @@ import os
 # Import des panels
 
 class MonChoixCommande(Ui_ChoixCommandes,QWidget):
+<<<<<<< Updated upstream
     """
     """
     def __init__(self,node, jdc_item, editor):
@@ -306,6 +307,276 @@ class MonChoixCommande(Ui_ChoixCommandes,QWidget):
             rbcmd.setGeometry(QRect(40, 20, 211, 71))
             rbcmd.setMaximumSize(QSize(250, 81))
             rbcmd.setStyleSheet("background-color : rgb(66, 165, 238);\n"
+=======
+  """
+  """
+  def __init__(self,node, jdc_item, editor):
+      QWidget.__init__(self,parent=None)
+      self.setupUi(self)
+
+      self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'..','Editeur','icons')
+      iconeFile=os.path.join(self.repIcon,'lettreRblanc30.png')
+      icon = QIcon(iconeFile)
+      self.RBRegle.setIcon(icon)
+      self.RBRegle.setIconSize(QSize(21, 31))
+
+      self.item = jdc_item
+      self.node = node
+      self.editor = editor
+      self.simpleClic=self.editor.maConfiguration.simpleClic
+      self.jdc  = self.item.object.getJdcRoot()
+      debutTitre=self.editor.titre
+      self.listeWidget=[]
+      self.dicoCmd={}
+      if self.editor.fichier != None : 
+          nouveauTitre=debutTitre+" "+os.path.basename(self.editor.fichier)
+      else :
+          nouveauTitre=debutTitre
+      self.editor.appliEficas.setWindowTitle(nouveauTitre)
+
+
+      self.RBalpha.clicked.connect(self.afficheAlpha)
+      self.RBGroupe.clicked.connect(self.afficheGroupe)
+      self.RBOrdre.clicked.connect(self.afficheOrdre)
+      self.RBClear.clicked.connect(self.clearFiltre)
+      self.RBCasse.toggled.connect(self.ajouteRadioButtons)
+      self.LEFiltre.returnPressed.connect(self.ajouteRadioButtons)
+      self.LEFiltre.textChanged.connect(self.ajouteRadioButtons)
+
+      if self.node.tree.item.getRegles() == () :
+         self.RBRegle.close()
+         self.labelRegle.close()
+      else : 
+        self.RBRegle.clicked.connect(self.afficheRegle)
+
+      if self.editor.readercata.Ordre_Des_Commandes == None : self.RBOrdre.close()
+
+       
+      #self.editor.labelCommentaire.setText("")
+      if self.editor.widgetOptionnel!= None : 
+         self.editor.fermeOptionnel()
+         self.editor.widgetOptionnel=None
+      self.name=None
+
+      self.boolAlpha=0
+      self.boolGroupe=0
+      self.boolOrdre=0
+      if self.editor.maConfiguration.affiche=="alpha"  : 
+         self.boolAlpha==1;  
+         self.RBalpha.setChecked(True);
+         self.afficheAlpha()
+      elif self.editor.maConfiguration.affiche=="groupe" : 
+         self.boolGroupe==1; 
+         self.RBGroupe.setChecked(True); 
+         self.afficheGroupe()
+      elif self.editor.maConfiguration.affiche=="ordre"  : 
+         self.boolOrdre==1;  
+         self.RBOrdre.setChecked(True);  
+         self.afficheOrdre()
+      if self.editor.maConfiguration.closeFrameRechercheCommandeSurPageDesCommandes == True : self.frameAffichage.close()
+
+      if self.editor.widgetTree != None : self.editor.restoreSplitterSizes(2) 
+      else: self.editor.restoreSplitterSizes(3)
+
+  def afficheRegle(self):
+      self.node.tree.appellebuildLBRegles()
+
+  def afficheAlpha(self):
+      self.boolAlpha=1
+      self.boolGroupe=0
+      self.boolOrdre=0
+      self.ajouteRadioButtons()
+
+  def afficheGroupe(self):
+      self.boolAlpha=0
+      self.boolGroupe=1
+      self.boolOrdre=0
+      self.ajouteRadioButtons()
+
+  def afficheOrdre(self):
+      self.boolAlpha=0
+      self.boolGroupe=0
+      self.boolOrdre=1
+      self.ajouteRadioButtons()
+
+  def insereNoeudApresClick(self,event):
+      #print self.editor.Classement_Commandes_Ds_Arbre
+      #if self.editor.Classement_Commandes_Ds_Arbre!= () : self.chercheOu()
+      #print ('dans insereNoeudApresClick')
+      nodeCourrant=self.node.tree.currentItem()
+      if nodeCourrant==None: nodeCourrant=self.node.tree.racine
+      if self.name != None :
+         plier=self.editor.maConfiguration.afficheCommandesPliees
+         if nodeCourrant==self.node : nouveau=self.node.appendChild(self.name,'first',plier)
+         else : nouveau=nodeCourrant.appendBrother(self.name,plier=plier)
+      else :
+         nouveau = 0
+      if nouveau == 0 : return # on n a pas insere le noeud
+      nouveau.setDeplie()
+      #if self.editor.afficheApresInsert==True : nouveau.plieToutEtReaffiche()
+      if self.editor.afficheApresInsert == True :
+           #if self.editor.affichePlie==True:  nouveau.plieToutEtReaffiche()
+           if self.editor.maConfiguration.afficheCommandesPliees ==True:  nouveau.plieToutEtReaffiche()
+           else : nouveau.deplieToutEtReaffiche()
+           nouveau.fenetre.donnePremier()
+           #nouveau.deplieToutEtReaffiche()
+      else :
+           self.node.setSelected(False)
+           nouveau.setSelected(True)
+           self.node.tree.setCurrentItem(nouveau)
+      if event != None : event.accept()
+      
+         
+
+  def creeListeCommande(self,filtre):
+      listeGroupes,dictGroupes=self.jdc.getGroups()
+      sensibleALaCasse=self.RBCasse.isChecked()
+      if "CACHE" in dictGroupes: aExclure=list(dictGroupes["CACHE"])
+      else: aExclure=[]
+      listeACreer=[]
+      listeEtapesDejaPresentes=[]
+      if self.editor.maConfiguration.rendVisiblesLesCaches :
+         for e in self.jdc.etapes:
+            listeEtapesDejaPresentes.append(e.nom)
+         for c in aExclure :
+             if c not in listeEtapesDejaPresentes : aExclure.remove(c)
+      for e in self.jdc.etapes:
+          #print (e.nom)
+          #print (e.definition.repetable)
+          if e.definition.repetable == 'n' : aExclure.append(e.nom)
+      for l in self.jdc.getListeCmd():
+         if l not in aExclure : 
+            if sensibleALaCasse and (filtre != None and not filtre in l) : continue
+            if (not sensibleALaCasse) and filtre != None and (not filtre in l) and (not filtre.upper() in l) : continue
+            listeACreer.append(l)
+      return listeACreer
+
+  def ajouteRadioButtons(self):
+      if self.editor.maConfiguration.nombreDeBoutonParLigne != 0 :
+         self.ajoutePushButtons()
+         return
+      filtre=str(self.LEFiltre.text())
+      if filtre==str("") : filtre=None
+      if hasattr(self,'buttonGroup') :
+         for b in self.buttonGroup.buttons():
+             self.buttonGroup.removeButton(b)
+             b.setParent(None)
+             b.close()
+      else :
+         self.buttonGroup = QButtonGroup()
+      for w in self.listeWidget :
+         w.setParent(None)
+         w.close()
+      self.listeWidget=[]
+      if self.boolAlpha==1 :
+         liste=self.creeListeCommande(filtre)
+         for cmd in liste :
+           self.dicoCmd[tr(cmd)]=cmd
+           rbcmd=(QRadioButton(tr(cmd)))
+           self.buttonGroup.addButton(rbcmd)
+           self.commandesLayout.addWidget(rbcmd)
+           #if self.simpleClic :  rbcmd.mouseReleaseEvent=self.insereNoeudApresClick
+           #else : rbcmd.mouseDoubleClickEvent=self.insereNoeudApresClick
+           #self.buttonGroup.buttonClicked.connect(self.rbClique) 
+           if not(self.simpleClic ):  rbcmd.mouseDoubleClickEvent=self.insereNoeudApresClick
+         if self.simpleClic :  
+            self.buttonGroup.buttonClicked.connect(self.rbCliqueEtInsere) 
+         else :
+            self.buttonGroup.buttonClicked.connect(self.rbClique) 
+      elif  self.boolGroupe==1 :
+         listeGroupes,dictGroupes=self.jdc.getGroups()
+         for grp in listeGroupes:
+           if grp == "CACHE" : continue
+           label=QLabel(self)
+           text=tr('<html><head/><body><p><span style=\" font-weight:600;\">Groupe : '+tr(grp)+'</span></p></body></html>')
+           label.setText(text)
+           self.listeWidget.append(label)
+           aAjouter=1
+           sensibleALaCasse=self.RBCasse.isChecked()
+           for cmd in  dictGroupes[grp]:
+              if sensibleALaCasse and (filtre != None and not filtre in cmd) : continue
+              if (not sensibleALaCasse) and filtre != None and (not filtre in cmd) and (not filtre.upper() in cmd) : continue
+              if aAjouter == 1 :
+                 self.commandesLayout.addWidget(label)
+                 aAjouter=0
+              self.dicoCmd[tr(cmd)]=cmd
+              rbcmd=(QRadioButton(tr(cmd)))
+              self.buttonGroup.addButton(rbcmd)
+              self.commandesLayout.addWidget(rbcmd)
+              if not(self.simpleClic ):  rbcmd.mouseDoubleClickEvent=self.insereNoeudApresClick
+           if self.simpleClic :  
+             self.buttonGroup.buttonClicked.connect(self.rbCliqueEtInsere) 
+           else :
+             self.buttonGroup.buttonClicked.connect(self.rbClique) 
+           label2=QLabel(self)
+           label2.setText(" ")
+           self.listeWidget.append(label2)
+           self.commandesLayout.addWidget(label2)
+      elif  self.boolOrdre==1 :
+         listeFiltre=self.creeListeCommande(filtre)
+         liste=[]
+         if self.editor.readercata.Ordre_Des_Commandes == None : Ordre_Des_Commandes=listeFiltre
+         else : Ordre_Des_Commandes=self.editor.readercata.Ordre_Des_Commandes
+         for cmd in Ordre_Des_Commandes :
+            if cmd in listeFiltre :
+                 liste.append(cmd)
+         for cmd in liste :
+           self.dicoCmd[tr(cmd)]=cmd
+           rbcmd=(QRadioButton(tr(cmd)))
+           self.buttonGroup.addButton(rbcmd)
+           self.commandesLayout.addWidget(rbcmd)
+           if not(self.simpleClic ):  rbcmd.mouseDoubleClickEvent=self.insereNoeudApresClick
+         if self.simpleClic :  
+            self.buttonGroup.buttonClicked.connect(self.rbCliqueEtInsere) 
+         else :
+            self.buttonGroup.buttonClicked.connect(self.rbClique) 
+
+     
+
+  def ajoutePushButtons(self):
+      if hasattr(self,'buttonGroup') :
+         for b in self.buttonGroup.buttons():
+             self.buttonGroup.removeButton(b)
+             b.setParent(None)
+             b.close()
+      else :
+         self.buttonGroup = QButtonGroup()
+         self.buttonGroup.buttonClicked.connect(self.rbCliqueEtInsere) 
+      for w in self.listeWidget :
+         w.setParent(None)
+         w.close()
+      self.listeWidget=[]
+
+      if not hasattr(self,'maGrilleBouton') :
+         #self.commandesLayout.close()
+         self.maGrilleBouton=QGridLayout()
+         self.maGrilleBouton.setSpacing(20)
+         self.verticalLayout.addLayout(self.maGrilleBouton)
+      col=-1
+      ligne = 0
+
+      if self.boolAlpha==1 :
+         liste=self.creeListeCommande(None)
+      elif  self.boolOrdre:
+         liste=self.creeListeCommande(None)
+         listeFiltre=self.creeListeCommande(None)
+         liste=[]
+         if self.editor.readercata.Ordre_Des_Commandes == None : Ordre_Des_Commandes=listeFiltre
+         else : Ordre_Des_Commandes=self.editor.readercata.Ordre_Des_Commandes
+         for cmd in Ordre_Des_Commandes :
+            if cmd in listeFiltre :
+                 liste.append(cmd)
+      for cmd in liste :
+           col=col+1
+           if col == self.editor.maConfiguration.nombreDeBoutonParLigne :
+              col=0
+              ligne=ligne+1
+           self.dicoCmd[tr(cmd)]=cmd
+           rbcmd=QPushButton(tr(cmd))
+           rbcmd.setGeometry(QRect(40, 20, 211, 71))
+           rbcmd.setMaximumSize(QSize(250, 81))
+           rbcmd.setStyleSheet("background-color : rgb(66, 165, 238);\n"
+>>>>>>> Stashed changes
 "/*border-style : outset;*/\n"
 "border-radius : 20px;\n"
 "border-width : 30 px;\n"
index 0eef50d4838d6db566bdde9cadd663967c2f7415..aa565492e4476c474a5a520fec7f335d6e4040ec 100644 (file)
@@ -141,7 +141,6 @@ class BLOC(N_ENTITE.ENTITE):
                     "Catalogue entite : ", self.nom, ", de pere : ", self.pere.nom,
                     '\n', "Erreur dans la condition : ", self.condition, ''.join(l))
             except:
-                print (self.nom)
                 l = traceback.format_exception(
                     sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])
                 raise AsException(
index fbc25960734c7fa75f75da6008ab4b05e4b3fc22..57109ad2fbff95cb729dd1276ce6b40a3de53530 100644 (file)
@@ -1,5 +1,5 @@
 # coding=utf-8
-# Copyright (C) 2007-2021   EDF R&D
+# Copyright (C) 2007-2017   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
@@ -24,7 +24,7 @@
 from __future__ import absolute_import
 from __future__ import print_function
 try :
-    from builtins import object
+  from builtins import object
 except : pass
 import traceback
 import sys
@@ -34,7 +34,7 @@ from Ihm import CONNECTOR
 
 class UserASSD(ASSD):
     """
-       Classe de base pour definir des types de structures de donnees definie par
+       Classe de base pour definir des types de structures de donnees definie par 
        l utilisateur
        equivalent d un concept ASSD pour un SIMP ou un FACT
        Attention : le parent est a None au debut  et non le MC createur que l on ne connait pas
@@ -45,81 +45,81 @@ class UserASSD(ASSD):
     """
 
     def __init__(self,nom='sansNom'):
-        #print ('dans init de UserASSD pour ', nom, type(nom))
-        self.nom = nom
-        self.jdc = CONTEXT.getCurrentJdC()
-        self.parent = None
-        self.initialiseValeur()
-        self.utilisePar = set()
-        if self.nom  != 'sansNom' : self.id = self.jdc.regSD(self)
-        if self.nom  != 'sansNom' : self.initialiseNom(nom)
-        else : self.id = None
-        self.ptr_sdj   = None
+       #print ('dans init de UserASSD pour ', nom, type(nom))
+       self.nom = nom
+       self.jdc = CONTEXT.getCurrentJdC()
+       self.parent = None 
+       self.initialiseValeur()
+       self.utilisePar = set()
+       if self.nom  != 'sansNom' : self.id = self.jdc.regSD(self)
+       if self.nom  != 'sansNom' : self.initialiseNom(nom)
+       else : self.id = None
+       self.ptr_sdj   = None
 
 
     def initialiseParent(self, parent):
     # attention parent.parent peut être un bloc
-        #print ('je passe initialiseParent pour : ', self, parent.nom)
-        self.parent = parent
-        self.etape = self.parent.getEtape()
-        self.etape.userASSDCrees.append(self)
-        if self.parent.parent != self.etape :
-            if self.parent.parent.estIdentifiePar != None :
-                print ('il y a un souci dans l initialisation de l identifiant pour', self.parent.parent.nom)
-                print (self.parent.nom)
-                print (self.nom)
-            self.parent.parent.estIdentifiePar = self
+       #print ('je passe initialiseParent pour : ', self, parent.nom)
+       self.parent = parent
+       self.etape = self.parent.getEtape()
+       self.etape.userASSDCrees.append(self)
+       if self.parent.parent != self.etape :
+          if self.parent.parent.estIdentifiePar != None :
+             print ('il y a un souci dans l initialisation de l identifiant pour', self.parent.parent.nom)
+             print (self.parent.nom) 
+             print (self.nom) 
+          self.parent.parent.estIdentifiePar = self
 
     def initialiseNom(self,nom):
-        #print ('je passe initialiseNom pour : ', self, nom, type(nom))
-        for (i,j)  in list(self.jdc.sdsDict.items()) :
-            if j == self :
-                del(self.jdc.sdsDict[i])
-        self.jdc.sdsDict[nom]=self
-        self.nom=nom
-        if self.nom != 'sansNom' and self.id ==None : self.id = self.jdc.regSD(self)
+       #print ('je passe initialiseNom pour : ', self, nom, type(nom))
+       for (i,j)  in list(self.jdc.sdsDict.items()) :
+          if j == self : 
+             del(self.jdc.sdsDict[i])
+       self.jdc.sdsDict[nom]=self
+       self.nom=nom
+       if self.nom != 'sansNom' and self.id ==None : self.id = self.jdc.regSD(self)
 
     def initialiseValeur(self,valeur=None):
-        self.valeur=valeur
+       self.valeur=valeur
 
     def ajoutUtilisePar(self,mc):
-        #print ('je passe ajoutUtilisePar pour : ', self.nom)
-        self.utilisePar.add(mc)
+       #print ('je passe ajoutUtilisePar pour : ', self.nom)
+       self.utilisePar.add(mc)
 
     def enleveUtilisePar(self,mc):
-        try : self.utilisePar.remove(mc)
-        except : pass
+       try : self.utilisePar.remove(mc)
+       except : pass
 
     def renomme(self,nouveauNom):
-        print ('je passe dans renomme')
-        self.jdc.delConcept(self.nom)
-        self.jdc.sdsDict[nouveauNom] = self
-        self.setName(nouveauNom)
-        for mc in (self.utilisePar):
-            mc.demandeRedessine()
+       print ('je passe dans renomme')
+       self.jdc.delConcept(self.nom)
+       self.jdc.sdsDict[nouveauNom] = self
+       self.setName(nouveauNom)
+       for mc in (self.utilisePar):
+           mc.demandeRedessine()
 
     def transfere (self,obj):
-    # uniquement utise pour les lectures XML
+    # uniquement utise pour les lectures XML  
         self.utilisePar=obj.utilisePar
         self.id=obj.id
         for mc in self.utilisePar: mc.valeur=self
 
     def deleteReference(self, mcCreateur=None):
-        print ('je passe dans supprime de N_UserASSDMultiple')
+       print ('je passe dans supprime de N_UserASSDMultiple')
     # meme signature que UserASSDMultiple
-        for MC in self.utilisePar :
-            try :
-                if type(MC.valeur) in (list,tuple):
-                    MC.valeur=list(MC.valeur)
-                    while self in MC.valeur: MC.valeur.remove(self)
-                    if MC.valeur == [] : MC.Valeur = None
-                else : MC.valeur=None
-                MC.state='changed'
-                MC.isValid()
-                CONNECTOR.Emit(MC,"valid")
-            except : pass
-            # on peut avoir des listes qui contiennent plusieurs fois la meme valeur
-        self.jdc.delConcept(self.nom)
+       for MC in self.utilisePar : 
+          try :
+             if type(MC.valeur) in (list,tuple): 
+                MC.valeur=list(MC.valeur)
+                while self in MC.valeur: MC.valeur.remove(self)
+                if MC.valeur == [] : MC.Valeur = None
+             else : MC.valeur=None
+             MC.state='changed'
+             MC.isValid()
+             CONNECTOR.Emit(MC,"valid")
+          except : pass
+          # on peut avoir des listes qui contiennent plusieurs fois la meme valeur
+       self.jdc.delConcept(self.nom)
 
     def executeExpression(self, condition, dico) :
         #print ('je suis dans executeExpression ', self.nom, ' ', condition)
@@ -137,20 +137,21 @@ class UserASSD(ASSD):
             print ('executeExpression ', self.nom, ' ', condition , 'exception')
             test = 0
         return test
-
     def getEficasAttribut(self, attribut):
-        print ('je suis dans getEficasAttr', attribut)
-        if self.parent == None : return None
-        # parent est le SIMP donc c est bien parent.parent
-        try :
-            valeur = self.parent.parent.getMocle(attribut)
-        except :
-            valeur = None
-        #print (valeur)
-        return valeur
-
-
+       print ('je suis dans getEficasAttr', attribut)
+       if self.parent == None : return None
+       #print ('apres if')
+       # parent est le SIMP donc c est bien parent.parent
+       try : 
+          valeur = self.parent.parent.getMocle(attribut)
+       except :
+          valeur = None
+       #print (valeur)
+       return valeur
+       
+        
     def supprime(self, mcCreateur=None):
     # mcCreateur utile pour N_UserASSDMultiple
-        print ('je passe dans supprime de N_UserASSDMultiple')
-        self.deleteReference(mcCreateur)
+       print ('je passe dans supprime de N_UserASSDMultiple')
+       self.deleteReference(mcCreateur)
+
index d2dc56039ef5a40abe3e431fbe16251e6c44ba24..dd6e3bf4609f897b83a22186633303e5a977d53e 100644 (file)
@@ -1,5 +1,5 @@
 # coding=utf-8
-# Copyright (C) 2007-2021   EDF R&D
+# Copyright (C) 2007-2017   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
@@ -24,7 +24,7 @@
 from __future__ import absolute_import
 from __future__ import print_function
 try :
-    from builtins import object
+  from builtins import object
 except : pass
 import traceback
 import sys
@@ -32,10 +32,10 @@ import sys
 from .N_UserASSD import UserASSD
 from .N_ASSD import ASSD
 
-from collections import UserList
+from collections import UserList 
 class UserASSDMultiple(UserASSD):
     """
-       Classe de base pour definir des types de structures de donnees definie par
+       Classe de base pour definir des types de structures de donnees definie par 
        l utilisateur
        equivalent d un concept ASSD pour un SIMP ou un FACT
        mais pouvant referencer 2 objets par exemple les groupes de mailles qui peuvent porter
@@ -53,72 +53,73 @@ class UserASSDMultiple(UserASSD):
         if self not in etape.userASSDCrees : etape.userASSDCrees.append(self)
 
     def renomme(self,nouveauNom):
-        print ('je passe dans renomme')
-        #import traceback
-        #traceback.print_stack()
-        self.jdc.delConcept(self.nom)
-        self.jdc.sdsDict[nouveauNom] = self
-        self.setName(nouveauNom)
-        for mc in (self.utilisePar):
-            mc.demandeRedessine()
-
-
+       print ('je passe dans renomme')
+       #import traceback
+       #traceback.print_stack()
+       self.jdc.delConcept(self.nom)
+       self.jdc.sdsDict[nouveauNom] = self
+       self.setName(nouveauNom)
+       for mc in (self.utilisePar):
+           mc.demandeRedessine()
+        
+     
     def initialiseParent(self, pere):
         # surcharge N_UserASSD  parent ici n a pas de sens
         pass
-
+        
     def deleteReference(self,mcCreateur):
-        print ('je passe dans deleteReference', mcCreateur.nom)
-        if not(mcCreateur in self.peres) : return
-        self.peres.pop(self.peres.index(mcCreateur))
-        if len(self.peres)==0 :
-            UserASSD.deleteReference(self)
+       if not(mcCreateur in self.peres) : return
+       self.peres.pop(self.peres.index(mcCreateur))
+       if len(self.peres)==0 : 
+          UserASSD.deleteReference(self)
 
 
     def getParentsWithId(self):
-        #print ('je suis dans getParentsWithId ')
-        listeRetour= listUserASSD()
-        for pere in self.peres :
-            pereWithId = pere.parent
-            monEtape = pere.getEtape()
-            while (pereWithId) :
-                if pereWithId==monEtape :
-                    listeRetour.append(pereWithId)
-                    break
-                if pereWithId.estIdentifiePar != None :
-                    listeRetour.append(pereWithId)
-                    break
-                pereWithId=pereWithId.parent
-        return listeRetour
+       #print ('je suis dans getParentsWithId ')
+       listeRetour= listUserASSD()
+       for pere in self.peres :
+           pereWithId = pere.parent
+           monEtape = pere.getEtape()
+           while (pereWithId) :
+             if pereWithId==monEtape : 
+                listeRetour.append(pereWithId) 
+                break
+             if pereWithId.estIdentifiePar != None :
+                listeRetour.append(pereWithId) 
+                break
+             pereWithId=pereWithId.parent 
+       return listeRetour
 
     def getEtapes(self):
-        listeRetour= listUserASSD()
-        for pere in self.peres :
-            if pere.etape not in listeRetour : listeRetour.append(pere.etape)
-        return listeRetour
+       listeRetour= listUserASSD()
+       for pere in self.peres :
+           if pere.etape not in listeRetour : listeRetour.append(pere.etape)
+       return listeRetour
 
 
 class listUserASSD(UserList):
 
-    def getListeMotsCles(self,nomMc):
-        if self.data == None : return []
-        listeRetour=[]
-        for concept in self.data:
-            listeRetour.append(concept.getChild(nomMc).val)
-        return listeRetour
-
-    def getListeNomsUserASSD(self,nomMc):
-        if self.data == None : return []
-        listeRetour=[]
-        for concept in self.data:
-            listeRetour.append(concept.getChild(nomMc).val.nom)
-        return listeRetour
-
-    def getListeUserASSD(self,nomMc):
-        if self.data == None : return []
-        listeRetour=[]
-        for concept in self.data:
-            if concept.getChild(nomMc) :
-                if concept.getChild(nomMc).val :
-                    listeRetour.append(concept.getChild(nomMc).val)
-        return listeRetour
+     def getListeMotsCles(self,nomMc):
+         if self.data == None : return []
+         listeRetour=[]
+         for concept in self.data:
+             listeRetour.append(concept.getChild(nomMc).val)
+         return listeRetour
+
+     def getListeNomsUserASSD(self,nomMc):
+         if self.data == None : return []
+         listeRetour=[]
+         for concept in self.data:
+             listeRetour.append(concept.getChild(nomMc).val.nom)
+         return listeRetour
+
+     def getListeUserASSD(self,nomMc):
+         if self.data == None : return []
+         listeRetour=[]
+         for concept in self.data:
+             if concept.getChild(nomMc) :
+               if concept.getChild(nomMc).val :
+                listeRetour.append(concept.getChild(nomMc).val)
+         return listeRetour
+
+         
index ad05d26f8f39f612f897c23e1bd515943a467dad..423bd31a0e75f7dbc64559880238c6d2474543c2 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-import os, re
-import Accas
+import os
 from Accas import *
-monFichier=os.path.abspath(__file__)
+monFichier = os.path.abspath(__file__)
 
-JdC = JDC_CATA (
+JdC = JDC_CATA(
     code='Essai'
-    )
-VERSION_CATALOGUE='V_0'
-
-step_unit_input = ["inserted_steps", "extracted_steps", ]
-
-
-RodsWorthSetting = PROC ( nom = 'RodsWorthSetting',
-        fr = "Définition des options d'un calcul de poids de grappe",
-        version = SIMP (statut='o', typ = 'TXM', defaut ="1.0.0"),
-        virtual_groups = FACT( max='**', statut='o',
-                group_name = SIMP(statut='o', typ='TXM'),
-                value_def  = SIMP(statut='o', typ ='TXM',max='**' ),
-        ),
-        xenon_feedback = SIMP (statut='o',  typ ='TXM', 
-            into=["locked", "equilibrium", ]),
-        cb = SIMP (statut='o',  typ ='TXM', 
-            fr="Traitement de la CB pour les calculs d'efficacité",
-            into=["upstream_state", "critical", "critical_from_previous_state"]),
-    
-        states = SIMP(statut='o', typ = 'TXM', max='**',
-                   fr="Choix des états d'entrée du calcul"),
-       calcul_type = SIMP (statut='o',  typ ='TXM', 
-                fr="Choix du type de calcul de poids de grappe à réaliser",
-               into = [ "differential_worth", "combination", "integral_worth", ]),
-
-        BIntegral_O=BLOC ( condition = 'calcul_type == "integral_worth"',
-            Integral_O=SIMP(statut='o', typ= 'TXM', defaut = 'pas compris'),
-            ),
-       Integral = FACT(
-       #classe IntegralSituationsSetting
-            fr= "Définition de configurations intégrales de poids de grappes",
-            step_unit = SIMP (statut='o',  typ='TXM' , into = step_unit_input,
-                      fr="Unité retenue pour les insertions de grappes"),
-            config = FACT( max='**', statut='o',
-                key_config = SIMP(statut='o', typ='TXM'),
-                value_def  = SIMP(statut='o', typ ='R', val_min=0, ),
-                fr="Definition des configurations de grappes",
-             ),
-        ),
-        
 )
+VERSION_CATALOGUE = 'V_0'
+
+class Tuple:
+    def __init__(self,ntuple):
+        self.ntuple=ntuple
+        
+    def __convert__(self,valeur):
+        if type(valeur) == types.StringType:
+            return None 
+        if len(valeur) != self.ntuple:
+            return None
+        return valeur
+
+    def info(self):
+        return "Tuple de %s elements" % self.ntuple
+
+class Matrice:
+    def __init__(self, nbLigs=None, nbCols=None, methodeCalculTaille=None, formatSortie="ligne", valSup=None, valMin=None, structure=None, typElt='R', typEltInto=None, listeHeaders=None):
+        self.nbLigs = nbLigs
+        self.nbCols = nbCols
+        self.methodeCalculTaille = methodeCalculTaille
+        self.formatSortie = formatSortie
+        self.valSup = valSup
+        self.valMin = valMin
+        self.structure = structure
+        self.typElt = typElt
+        self.listeHeaders = listeHeaders
+        self.typEltInto = typEltInto
+
+    def __convert__(self, valeur):
+        # Attention ne verifie pas grand chose
+        # if not isinstance(valeur, types.ListType):
+        #     return None
+        return valeur
+
+    def info(self):
+        return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
+
+    __repr__ = info
+    __str__ = info
+
+
+class assembly(ASSD): pass
+
+class techno_data(ASSD): pass
+
+class rod(ASSD): pass
+
+
+Assembly = OPER(nom='Assembly', sd_prod=assemblage,
+                typeAssembly=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")))
+
+Rod = OPER(nom="Rod", sd_prod=rod,
+           step_height=SIMP(statut='o', typ='R'),
+           nsteps=SIMP(statut='o', typ='I'))
+
+Techno_Data = OPER(nom='Techno_Data', sd_prod=techno_data,
+                   Radial_Description=FACT(statut='o',
+                                           assembly_width=SIMP(statut='o', typ='R'),
+                                           nb_assembly=SIMP(statut='o', typ='R'),
+                                           assembly_list=SIMP(statut='o', typ=assembly, max="**"),
+                                           assembly_map=SIMP(statut="o",
+                                                             typ=Matrice(nbLigs=8,
+                                                                         nbCols=8,
+                                                                         valSup=1,
+                                                                         valMin=-1,
+                                                                         typElt='TXM', # ici c'est le nom de l'assemblage
+                                                                         listeHeaders=None))
+
+                                           ),  # Radial_Description
+                   # road_map = SIMP ( statut = "o",
+                   #    typ = Matrice(nbLigs=8,
+                   #                  nbCols=8,
+                   #                  valSup=1,
+                   #                  valMin=-1,
+                   #                  ),),
+
+                   Rod_Description=FACT(statut='o',
+                                        rod_map=SIMP(statut='o',
+                                            typ=Matrice(nbLigs=8,
+                                                nbCols=8,
+                                                valSup=1,
+                                                valMin=-1,
+                                                typElt='TXM', # ici c'est le nom du rod
+                                                listeHeaders=None))
+                                        ),  # Rod_Description
+                   Axial_Description=FACT(statut='o',
+                                          lower_refl_size=SIMP(
+                                              statut='o', typ='R'),
+                                          fuel_size=SIMP(statut='o', typ='R'),
+                                          upper_ref=SIMP(statut='o', typ='R'),
+                                          ),
+                   Grids=FACT(statut='o',
+                              mixing=FACT(statut='o',
+                                          positions=SIMP(statut='o', typ='R', max="**"),
+                                          size=SIMP(statut='o', typ='R'),
+                                          ),
+                              non_mixing=FACT(statut='o',
+                                              positions=SIMP(
+                                                  statut='o', typ='R', max='**'),
+                                              size=SIMP(statut='o', typ='R'),
+                                              ),
+                              ),
+                   Nominal_Power=SIMP(statut='o', typ='R'),
+                   )  # Techno data
+
+Model_data = OPER(nom='Model_data', sd_prod=model_data,
+                  physics=SIMP(statut='o', typ='TXM', into=('Neutronics', 'Thermalhydraulics')),
+                  radial_meshing=BLOC(condition="physics=='Neutronics'",
+                      flux_solver=SIMP(statut='o', typ='I'),
+                      feedback_solver=SIMP(status='o', typ='I')),
+                  radial_meshing=BLOC(condition="physics=='Thermalhydraulics'",
+                      fluid=SIMP(statut='o', typ='I'),
+                      pellet=SIMP(statut='o', typ='I'),
+                      clad=SIMP(statut='o', typ='I')),
+                  axial_meshing=FACT(statut='o',
+                      lower_refl=SIMP(statut='o', typ='I'),
+                      fuel=SIMP(statut='o', typ='I'),
+                      upper_refl=SIMP(statut='o', typ='I')))
 
 
index 4b739b5772eb10de7d6a6d6a42f6ac237fb0e7a6..df1a9efd72d8cd34dbe1530ab0cb1f83cac7b9a3 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-import os, re
-import Accas
-from Accas import *
-monFichier=os.path.abspath(__file__)
+import os
+from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA
+import types
+monFichier = os.path.abspath(__file__)
 
-JdC = JDC_CATA (
+JdC = JDC_CATA(
     code='Essai'
-    )
-VERSION_CATALOGUE='V_0'
+)
+VERSION_CATALOGUE = 'V_0'
+
+
+class Tuple:
+    def __init__(self, ntuple):
+        self.ntuple = ntuple
+
+    def __convert__(self, valeur):
+        if isinstance(valeur, types.StringType):
+            return None
+        if len(valeur) != self.ntuple:
+            return None
+        return valeur
+
+    def info(self):
+        return "Tuple de %s elements" % self.ntuple
 
 
 class Matrice:
-  def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None,typElt='R',typEltInto=None, listeHeaders=None):
-      self.nbLigs=nbLigs
-      self.nbCols=nbCols
-      self.methodeCalculTaille=methodeCalculTaille
-      self.formatSortie=formatSortie
-      self.valSup=valSup
-      self.valMin=valMin
-      self.structure=structure
-      self.typElt=typElt
-      self.listeHeaders=listeHeaders
-      self.typEltInto=typEltInto
-
-  def __convert__(self,valeur):
-    # Attention ne verifie pas grand chose
-    if type(valeur) != types.ListType :
-      return None
-    return valeur
-
-  def info(self):
-      return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
-
-      __repr__=info
-      __str__=info
-
-
-
-Techno_Data = PROC( nom = 'Techno_Data',
-    Radial_Description = FACT (statut ='o',
-        assembly_width = SIMP (statut='o', typ = 'R'),
-        assembly_map = SIMP ( statut = "o",
-            typ = Matrice(nbLigs=8,
-                          nbCols=8,
-                          valSup=1,
-                          valMin=-1,
-                          typElt='TXM',
-                          typEltInto=('U1','R1'),
-                          listeHeaders=None),
-          defaut=(['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'],
-                 ['U1','U1','U1','U1','U1','U1','U1','U1'])
-                          ),
-
-    ), # Radial_Description
-        #road_map = SIMP ( statut = "o",
-        #    typ = Matrice(nbLigs=8,
-        #                  nbCols=8,
-        #                  valSup=1,
-        #                  valMin=-1,
-        #                  ),),
-        
-    Rod_Description = FACT (statut ='o',
-        RB=FACT( statut ='o',
-           step_height =  SIMP (statut='o', typ = 'R'),
-           nsteps = SIMP (statut='o', typ = 'I',),
-         ),
-    ), # Rod_Description
-   Axial_Description = FACT(statut ='o',
-       lower_refl_size =  SIMP (statut='o', typ = 'R'),
-       fuel_size =  SIMP (statut='o', typ = 'R'),
-       upper_ref =  SIMP (statut='o', typ = 'R'),
-    ),
-   Grids = FACT (statut ='o',
-       mixing = FACT(statut ='o',
-         positions =  SIMP (statut='o', typ = 'R'),
-         size =  SIMP (statut='o', typ = 'R'),
-       ),
-       non_mixing = FACT( statut ='o',
-         positions =  SIMP (statut='o', typ = 'R'),
-         size =  SIMP (statut='o', typ = 'R'),
-       ),
-    ),
-    Nominal_Power =  SIMP (statut='o', typ = 'R'),
-    
-    
-) # Techno data
+    def __init__(self, nbLigs=None, nbCols=None,
+                 methodeCalculTaille=None, formatSortie="ligne",
+                 valSup=None, valMin=None, structure=None, typElt='R',
+                 typEltInto=None, listeHeaders=None):
+        self.nbLigs = nbLigs
+        self.nbCols = nbCols
+        self.methodeCalculTaille = methodeCalculTaille
+        self.formatSortie = formatSortie
+        self.valSup = valSup
+        self.valMin = valMin
+        self.structure = structure
+        self.typElt = typElt
+        self.listeHeaders = listeHeaders
+        self.typEltInto = typEltInto
+
+    def __convert__(self, valeur):
+        # Attention ne verifie pas grand chose
+        if not isinstance(valeur, types.ListType):
+            return None
+        return valeur
+
+    def info(self):
+        return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
+
+    __repr__ = info
+    __str__ = info
+
+
+class myAssembly(ASSD):
+    pass
+
+
+class myTechnoData(ASSD):
+    pass
+
+
+class myRodCluster(ASSD):
+    pass
+
+
+class myModelData(ASSD):
+    pass
+
+
+Assembly = OPER(nom='Assembly', sd_prod=myAssembly,
+                nomAssembly=SIMP(statut='o', typ='TXM'),
+                typeAssembly=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")),
+                description=BLOC(condition='typeAssembly != "REF"',
+                                 assembly_width=SIMP(statut='o', typ='R'),
+                                 radial_description=FACT(statut='o',
+                                                         clad_outer_radius=SIMP(statut='o', typ='R'),
+                                                         guide_tube_outer_radius=SIMP(statut='o', typ='R'),
+                                                         fuel_rod_pitch=SIMP(statut='o', typ='R'),
+                                                         nfuel_rods=SIMP(statut='o', typ='I')),
+                                 axial_description=FACT(statut='o',
+                                                        active_length=SIMP(statut='o', typ='R')),
+                                 grids=FACT(statut='o',
+                                            mixing=FACT(statut='o',
+                                                        positions=SIMP(
+                                                            statut='o', typ='R', max="**"),
+                                                        size=SIMP(statut='o', typ='R')),
+                                            non_mixing=FACT(statut='o',
+                                                            positions=SIMP(
+                                                                statut='o', typ='R', max='**'),
+                                                            size=SIMP(statut='o', typ='R')),
+                                            )
+                                 )
+                )
+
+
+RodCluster = OPER(nom="RodCluster", sd_prod=myRodCluster,
+                  nomRodCluster=SIMP(statut='o', typ='TXM'),
+                  step_height=SIMP(statut='o', typ='R'),
+                  nsteps=SIMP(statut='o', typ='I'))
+
+
+Techno_data = OPER(nom='Techno_data', sd_prod=myTechnoData,
+                   assembly_list=SIMP(statut='o', typ=myAssembly, min=1, max="**"),  # à resorber quand on mettra dans la Matrice
+                   rodcluster_list=SIMP(statut='o', typ=myRodCluster, min=0, max="**"),  # idem
+                   Radial_Description=FACT(statut='o',
+                                           nb_assembly=SIMP(statut='o', typ='I'),
+                                           assembly_map=SIMP(statut="o",
+                                                             typ=Matrice(nbLigs=8,
+                                                                         nbCols=8,
+                                                                         valSup=1,
+                                                                         valMin=-1,
+                                                                         typElt='TXM',  # ici c'est le nom de l'assemblage
+                                                                         listeHeaders=None),
+                                                             defaut=[['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                                     ['.', '.', '.', '.', '.', '.', '.', '.']])
+
+                                           ),  # Radial_Description
 
+                   Rod_Description=FACT(statut='o',
+                                        rod_map=SIMP(statut='o',
+                                                     typ=Matrice(nbLigs=8,
+                                                                 nbCols=8,
+                                                                 valSup=1,
+                                                                 valMin=-1,
+                                                                 typElt='TXM',  # ici c'est le nom du rod
+                                                                 listeHeaders=None),
+                                                     defaut=[['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.'],
+                                                             ['.', '.', '.', '.', '.', '.', '.', '.']])
+                                        ),  # Rod_Description
+                   Axial_Description=FACT(statut='o',
+                                          lower_refl_size=SIMP(statut='o', typ='R'),
+                                          upper_refl_size=SIMP(statut='o', typ='R'),
+                                          ),
+                   Nominal_Power=SIMP(statut='o', typ='R'),
+                   )  # Techno data
 
+Model_data = OPER(nom='Model_data', sd_prod=myModelData,
+                  physics=SIMP(statut='o', typ='TXM', into=(
+                      'Neutronics', 'Thermalhydraulics')),
+                  scale=SIMP(statut='o', typ='TXM', into=(
+                      'system', 'component', 'local')),
+                  neutro_compo=BLOC(condition='physics=="Neutronics" and scale=="component"',
+                                    code=SIMP(statut='o', typ='TXM', into=('COCAGNE',)),
+                                    radial_meshing=FACT(statut='o',
+                                                        flux_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')),
+                                                        flux_solver_subdivision=BLOC(condition='flux_solver=="subdivision"',
+                                                                                     flux_subdivision=SIMP(statut='o', typ='I')),
+                                                        feedback_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')),
+                                                        feedback_solver_subdivision=BLOC(condition='feedback_solver=="subdivision"',
+                                                                                         feedback_subdivision=SIMP(statut='o', typ='I')))),
+                  thermo_compo=BLOC(condition='physics=="Thermalhydraulics" and scale=="component"',
+                                    code=SIMP(statut='o', typ='TXM', into=('THYC', 'CATHARE3')),
+                                    radial_meshing=FACT(statut='o',
+                                                        fluid=SIMP(statut='o', typ='TXM', into=('subdivision', 'subchannel')),
+                                                        fluid_subdivision=BLOC(condition='fluid=="subdivision"',
+                                                                               fluid_subdivision=SIMP(statut='o', typ='I')),
+                                                        pellet=SIMP(statut='o', typ='I'),
+                                                        clad=SIMP(statut='o', typ='I'))),
+                  scale_compo=BLOC(condition='scale=="component"',
+                                   axial_meshing=FACT(statut='o',
+                                                      lower_refl=SIMP(statut='o', typ='I'),
+                                                      fuel=SIMP(statut='o', typ='I'),
+                                                      upper_refl=SIMP(statut='o', typ='I'))),
+                  )
diff --git a/Poc/raw/__init__.py b/Poc/raw/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/Poc/raw/cataPoc_driver.py b/Poc/raw/cataPoc_driver.py
deleted file mode 100644 (file)
index 2af3ae8..0000000
+++ /dev/null
@@ -1,789 +0,0 @@
-# ./raw/cataPoc_driver.py
-# -*- coding: utf-8 -*-
-# PyXB bindings for NM:9c3bd166183fcfc95687f415bcc4a066eb33ac79
-# Generated 2020-11-18 10:41:40.865410 by PyXB version 1.2.5 using Python 3.4.2.final.0
-# Namespace http://chercheurs.edf.com/logiciels/Essai
-
-from __future__ import unicode_literals
-import pyxb
-import pyxb.binding
-import pyxb.binding.saxer
-import io
-import pyxb.utils.utility
-import pyxb.utils.domutils
-import sys
-import pyxb.utils.six as _six
-# Unique identifier for bindings created at the same time
-_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:42cf5b5e-2982-11eb-b63e-cc3d82d871d8')
-
-# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.5'
-# Generated bindings are not compatible across PyXB versions
-if pyxb.__version__ != _PyXBVersion:
-    raise pyxb.PyXBVersionError(_PyXBVersion)
-
-# A holder for module-level binding classes so we can access them from
-# inside class definitions where property names may conflict.
-_module_typeBindings = pyxb.utils.utility.Object()
-
-# Import bindings for namespaces imported into schema
-import pyxb.binding.datatypes
-
-# NOTE: All namespace declarations are reserved within the binding
-Namespace = pyxb.namespace.NamespaceForURI('http://chercheurs.edf.com/logiciels/Essai', create_if_missing=True)
-Namespace.configureCategories(['typeBinding', 'elementBinding'])
-
-def CreateFromDocument (xml_text, default_namespace=None, location_base=None):
-    """Parse the given XML and use the document element to create a
-    Python instance.
-
-    @param xml_text An XML document.  This should be data (Python 2
-    str or Python 3 bytes), or a text (Python 2 unicode or Python 3
-    str) in the L{pyxb._InputEncoding} encoding.
-
-    @keyword default_namespace The L{pyxb.Namespace} instance to use as the
-    default namespace where there is no default namespace in scope.
-    If unspecified or C{None}, the namespace of the module containing
-    this function will be used.
-
-    @keyword location_base: An object to be recorded as the base of all
-    L{pyxb.utils.utility.Location} instances associated with events and
-    objects handled by the parser.  You might pass the URI from which
-    the document was obtained.
-    """
-
-    if pyxb.XMLStyle_saxer != pyxb._XMLStyle:
-        dom = pyxb.utils.domutils.StringToDOM(xml_text)
-        return CreateFromDOM(dom.documentElement, default_namespace=default_namespace)
-    if default_namespace is None:
-        default_namespace = Namespace.fallbackNamespace()
-    saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base)
-    handler = saxer.getContentHandler()
-    xmld = xml_text
-    if isinstance(xmld, _six.text_type):
-        xmld = xmld.encode(pyxb._InputEncoding)
-    saxer.parse(io.BytesIO(xmld))
-    instance = handler.rootObject()
-    return instance
-
-def CreateFromDOM (node, default_namespace=None):
-    """Create a Python instance from the given DOM node.
-    The node tag must correspond to an element declaration in this module.
-
-    @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}."""
-    if default_namespace is None:
-        default_namespace = Namespace.fallbackNamespace()
-    return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace)
-
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_version
-class T_version (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_version')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 7, 1)
-    _Documentation = None
-T_version._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_version', T_version)
-_module_typeBindings.T_version = T_version
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_group_name
-class T_group_name (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_group_name')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 11, 1)
-    _Documentation = None
-T_group_name._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_group_name', T_group_name)
-_module_typeBindings.T_group_name = T_group_name
-
-# Atomic simple type: [anonymous]
-class STD_ANON (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 19, 5)
-    _Documentation = None
-STD_ANON._InitializeFacetMap()
-_module_typeBindings.STD_ANON = STD_ANON
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_xenon_feedback
-class T_xenon_feedback (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_xenon_feedback')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 27, 1)
-    _Documentation = None
-T_xenon_feedback._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_xenon_feedback, enum_prefix=None)
-T_xenon_feedback.locked = T_xenon_feedback._CF_enumeration.addEnumeration(unicode_value='locked', tag='locked')
-T_xenon_feedback.equilibrium = T_xenon_feedback._CF_enumeration.addEnumeration(unicode_value='equilibrium', tag='equilibrium')
-T_xenon_feedback._InitializeFacetMap(T_xenon_feedback._CF_enumeration)
-Namespace.addCategoryObject('typeBinding', 'T_xenon_feedback', T_xenon_feedback)
-_module_typeBindings.T_xenon_feedback = T_xenon_feedback
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_cb
-class T_cb (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_cb')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 33, 1)
-    _Documentation = None
-T_cb._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_cb, enum_prefix=None)
-T_cb.upstream_state = T_cb._CF_enumeration.addEnumeration(unicode_value='upstream_state', tag='upstream_state')
-T_cb.critical = T_cb._CF_enumeration.addEnumeration(unicode_value='critical', tag='critical')
-T_cb.critical_from_previous_state = T_cb._CF_enumeration.addEnumeration(unicode_value='critical_from_previous_state', tag='critical_from_previous_state')
-T_cb._InitializeFacetMap(T_cb._CF_enumeration)
-Namespace.addCategoryObject('typeBinding', 'T_cb', T_cb)
-_module_typeBindings.T_cb = T_cb
-
-# Atomic simple type: [anonymous]
-class STD_ANON_ (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 44, 5)
-    _Documentation = None
-STD_ANON_._InitializeFacetMap()
-_module_typeBindings.STD_ANON_ = STD_ANON_
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_calcul_type
-class T_calcul_type (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_calcul_type')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 52, 1)
-    _Documentation = None
-T_calcul_type._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_calcul_type, enum_prefix=None)
-T_calcul_type.differential_worth = T_calcul_type._CF_enumeration.addEnumeration(unicode_value='differential_worth', tag='differential_worth')
-T_calcul_type.combination = T_calcul_type._CF_enumeration.addEnumeration(unicode_value='combination', tag='combination')
-T_calcul_type.integral_worth = T_calcul_type._CF_enumeration.addEnumeration(unicode_value='integral_worth', tag='integral_worth')
-T_calcul_type._InitializeFacetMap(T_calcul_type._CF_enumeration)
-Namespace.addCategoryObject('typeBinding', 'T_calcul_type', T_calcul_type)
-_module_typeBindings.T_calcul_type = T_calcul_type
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_Integral_O
-class T_Integral_O (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Integral_O')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 59, 1)
-    _Documentation = None
-T_Integral_O._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_Integral_O', T_Integral_O)
-_module_typeBindings.T_Integral_O = T_Integral_O
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_step_unit
-class T_step_unit (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_unit')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 63, 1)
-    _Documentation = None
-T_step_unit._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=T_step_unit, enum_prefix=None)
-T_step_unit.inserted_steps = T_step_unit._CF_enumeration.addEnumeration(unicode_value='inserted_steps', tag='inserted_steps')
-T_step_unit.extracted_steps = T_step_unit._CF_enumeration.addEnumeration(unicode_value='extracted_steps', tag='extracted_steps')
-T_step_unit._InitializeFacetMap(T_step_unit._CF_enumeration)
-Namespace.addCategoryObject('typeBinding', 'T_step_unit', T_step_unit)
-_module_typeBindings.T_step_unit = T_step_unit
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_key_config
-class T_key_config (pyxb.binding.datatypes.string):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_key_config')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 69, 1)
-    _Documentation = None
-T_key_config._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_key_config', T_key_config)
-_module_typeBindings.T_key_config = T_key_config
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}T_value_def_1
-class T_value_def_1 (pyxb.binding.datatypes.float):
-
-    """An atomic simple type."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_value_def_1')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 73, 1)
-    _Documentation = None
-T_value_def_1._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=T_value_def_1, value=pyxb.binding.datatypes.float(0.0))
-T_value_def_1._InitializeFacetMap(T_value_def_1._CF_minInclusive)
-Namespace.addCategoryObject('typeBinding', 'T_value_def_1', T_value_def_1)
-_module_typeBindings.T_value_def_1 = T_value_def_1
-
-# Atomic simple type: {http://chercheurs.edf.com/logiciels/Essai}PNEFdico_Essai
-class PNEFdico_Essai (pyxb.binding.datatypes.string):
-
-    """{'T_value_def': {'_value_def_config_Integral_RodsWorthSetting': 'T_value_def_1'}}
-               """
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'PNEFdico_Essai')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 126, 1)
-    _Documentation = "{'T_value_def': {'_value_def_config_Integral_RodsWorthSetting': 'T_value_def_1'}}\n\t\t"
-PNEFdico_Essai._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'PNEFdico_Essai', PNEFdico_Essai)
-_module_typeBindings.PNEFdico_Essai = PNEFdico_Essai
-
-# List simple type: [anonymous]
-# superclasses pyxb.binding.datatypes.anySimpleType
-class STD_ANON_2 (pyxb.binding.basis.STD_list):
-
-    """Simple type that is a list of STD_ANON."""
-
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 17, 3)
-    _Documentation = None
-
-    _ItemType = STD_ANON
-STD_ANON_2._InitializeFacetMap()
-_module_typeBindings.STD_ANON_2 = STD_ANON_2
-
-# List simple type: [anonymous]
-# superclasses pyxb.binding.datatypes.anySimpleType
-class STD_ANON_3 (pyxb.binding.basis.STD_list):
-
-    """Simple type that is a list of STD_ANON_."""
-
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 42, 3)
-    _Documentation = None
-
-    _ItemType = STD_ANON_
-STD_ANON_3._InitializeFacetMap()
-_module_typeBindings.STD_ANON_3 = STD_ANON_3
-
-# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_value_def
-# superclasses STD_ANON_2
-class T_value_def (pyxb.binding.basis.STD_list):
-
-    """Simple type that is a list of STD_ANON."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_value_def')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 15, 1)
-    _Documentation = None
-
-    _ItemType = STD_ANON
-T_value_def._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_value_def', T_value_def)
-_module_typeBindings.T_value_def = T_value_def
-
-# List simple type: {http://chercheurs.edf.com/logiciels/Essai}T_states
-# superclasses STD_ANON_3
-class T_states (pyxb.binding.basis.STD_list):
-
-    """Simple type that is a list of STD_ANON_."""
-
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_states')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 40, 1)
-    _Documentation = None
-
-    _ItemType = STD_ANON_
-T_states._InitializeFacetMap()
-Namespace.addCategoryObject('typeBinding', 'T_states', T_states)
-_module_typeBindings.T_states = T_states
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_virtual_groups with content type ELEMENT_ONLY
-class T_virtual_groups (pyxb.binding.basis.complexTypeDefinition):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_virtual_groups with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_virtual_groups')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 78, 1)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}group_name uses Python identifier group_name
-    __group_name = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'group_name'), 'group_name', '__httpchercheurs_edf_comlogicielsEssai_T_virtual_groups_httpchercheurs_edf_comlogicielsEssaigroup_name', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 80, 3), )
-
-    
-    group_name = property(__group_name.value, __group_name.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}value_def uses Python identifier value_def
-    __value_def = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'value_def'), 'value_def', '__httpchercheurs_edf_comlogicielsEssai_T_virtual_groups_httpchercheurs_edf_comlogicielsEssaivalue_def', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 81, 3), )
-
-    
-    value_def = property(__value_def.value, __value_def.set, None, None)
-
-    _ElementMap.update({
-        __group_name.name() : __group_name,
-        __value_def.name() : __value_def
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_virtual_groups = T_virtual_groups
-Namespace.addCategoryObject('typeBinding', 'T_virtual_groups', T_virtual_groups)
-
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_config with content type ELEMENT_ONLY
-class T_config (pyxb.binding.basis.complexTypeDefinition):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_config with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_config')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 89, 1)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}key_config uses Python identifier key_config
-    __key_config = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'key_config'), 'key_config', '__httpchercheurs_edf_comlogicielsEssai_T_config_httpchercheurs_edf_comlogicielsEssaikey_config', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 91, 3), )
-
-    
-    key_config = property(__key_config.value, __key_config.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}value_def uses Python identifier value_def
-    __value_def = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'value_def'), 'value_def', '__httpchercheurs_edf_comlogicielsEssai_T_config_httpchercheurs_edf_comlogicielsEssaivalue_def', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 92, 3), )
-
-    
-    value_def = property(__value_def.value, __value_def.set, None, None)
-
-    _ElementMap.update({
-        __key_config.name() : __key_config,
-        __value_def.name() : __value_def
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_config = T_config
-Namespace.addCategoryObject('typeBinding', 'T_config', T_config)
-
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Integral with content type ELEMENT_ONLY
-class T_Integral (pyxb.binding.basis.complexTypeDefinition):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Integral with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Integral')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 95, 1)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}step_unit uses Python identifier step_unit
-    __step_unit = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_unit'), 'step_unit', '__httpchercheurs_edf_comlogicielsEssai_T_Integral_httpchercheurs_edf_comlogicielsEssaistep_unit', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 97, 3), )
-
-    
-    step_unit = property(__step_unit.value, __step_unit.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}config uses Python identifier config
-    __config = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'config'), 'config', '__httpchercheurs_edf_comlogicielsEssai_T_Integral_httpchercheurs_edf_comlogicielsEssaiconfig', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 98, 3), )
-
-    
-    config = property(__config.value, __config.set, None, None)
-
-    _ElementMap.update({
-        __step_unit.name() : __step_unit,
-        __config.name() : __config
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_Integral = T_Integral
-Namespace.addCategoryObject('typeBinding', 'T_Integral', T_Integral)
-
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY
-class T_step_Essai (pyxb.binding.basis.complexTypeDefinition):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_step_Essai with content type EMPTY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY
-    _Abstract = True
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_step_Essai')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 118, 1)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
-    _ElementMap.update({
-        
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_step_Essai = T_step_Essai
-Namespace.addCategoryObject('typeBinding', 'T_step_Essai', T_step_Essai)
-
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY
-class T_Essai (pyxb.binding.basis.complexTypeDefinition):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_Essai with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_Essai')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 121, 2)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}step_Essai uses Python identifier step_Essai
-    __step_Essai = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), 'step_Essai', '__httpchercheurs_edf_comlogicielsEssai_T_Essai_httpchercheurs_edf_comlogicielsEssaistep_Essai', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 119, 1), )
-
-    
-    step_Essai = property(__step_Essai.value, __step_Essai.set, None, None)
-
-    _ElementMap.update({
-        __step_Essai.name() : __step_Essai
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_Essai = T_Essai
-Namespace.addCategoryObject('typeBinding', 'T_Essai', T_Essai)
-
-
-# Complex type {http://chercheurs.edf.com/logiciels/Essai}T_RodsWorthSetting with content type ELEMENT_ONLY
-class T_RodsWorthSetting (T_step_Essai):
-    """Complex type {http://chercheurs.edf.com/logiciels/Essai}T_RodsWorthSetting with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'T_RodsWorthSetting')
-    _XSDLocation = pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 101, 1)
-    _ElementMap = T_step_Essai._ElementMap.copy()
-    _AttributeMap = T_step_Essai._AttributeMap.copy()
-    # Base type is T_step_Essai
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}Integral_O uses Python identifier Integral_O
-    __Integral_O = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Integral_O'), 'Integral_O', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaiIntegral_O', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 86, 3), )
-
-    
-    Integral_O = property(__Integral_O.value, __Integral_O.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}version uses Python identifier version
-    __version = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'version'), 'version', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaiversion', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 105, 3), )
-
-    
-    version = property(__version.value, __version.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}virtual_groups uses Python identifier virtual_groups
-    __virtual_groups = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'virtual_groups'), 'virtual_groups', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaivirtual_groups', True, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 106, 3), )
-
-    
-    virtual_groups = property(__virtual_groups.value, __virtual_groups.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}xenon_feedback uses Python identifier xenon_feedback
-    __xenon_feedback = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'xenon_feedback'), 'xenon_feedback', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaixenon_feedback', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 107, 3), )
-
-    
-    xenon_feedback = property(__xenon_feedback.value, __xenon_feedback.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}cb uses Python identifier cb
-    __cb = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'cb'), 'cb', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaicb', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 108, 3), )
-
-    
-    cb = property(__cb.value, __cb.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}states uses Python identifier states
-    __states = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'states'), 'states', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaistates', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 109, 3), )
-
-    
-    states = property(__states.value, __states.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}calcul_type uses Python identifier calcul_type
-    __calcul_type = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'calcul_type'), 'calcul_type', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaicalcul_type', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 110, 3), )
-
-    
-    calcul_type = property(__calcul_type.value, __calcul_type.set, None, None)
-
-    
-    # Element {http://chercheurs.edf.com/logiciels/Essai}Integral uses Python identifier Integral
-    __Integral = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Integral'), 'Integral', '__httpchercheurs_edf_comlogicielsEssai_T_RodsWorthSetting_httpchercheurs_edf_comlogicielsEssaiIntegral', False, pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 112, 3), )
-
-    
-    Integral = property(__Integral.value, __Integral.set, None, None)
-
-    _ElementMap.update({
-        __Integral_O.name() : __Integral_O,
-        __version.name() : __version,
-        __virtual_groups.name() : __virtual_groups,
-        __xenon_feedback.name() : __xenon_feedback,
-        __cb.name() : __cb,
-        __states.name() : __states,
-        __calcul_type.name() : __calcul_type,
-        __Integral.name() : __Integral
-    })
-    _AttributeMap.update({
-        
-    })
-_module_typeBindings.T_RodsWorthSetting = T_RodsWorthSetting
-Namespace.addCategoryObject('typeBinding', 'T_RodsWorthSetting', T_RodsWorthSetting)
-
-
-step_Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 119, 1))
-Namespace.addCategoryObject('elementBinding', step_Essai.name().localName(), step_Essai)
-
-Essai = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Essai'), T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 120, 1))
-Namespace.addCategoryObject('elementBinding', Essai.name().localName(), Essai)
-
-RodsWorthSetting = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'RodsWorthSetting'), T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 117, 1))
-Namespace.addCategoryObject('elementBinding', RodsWorthSetting.name().localName(), RodsWorthSetting)
-
-
-
-T_virtual_groups._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'group_name'), T_group_name, scope=T_virtual_groups, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 80, 3)))
-
-T_virtual_groups._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'value_def'), T_value_def, scope=T_virtual_groups, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 81, 3)))
-
-def _BuildAutomaton ():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton
-    del _BuildAutomaton
-    import pyxb.utils.fac as fac
-
-    counters = set()
-    states = []
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_virtual_groups._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'group_name')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 80, 3))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = set()
-    symbol = pyxb.binding.content.ElementUse(T_virtual_groups._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'value_def')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 81, 3))
-    st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-         ]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    st_1._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, False, containing_state=None)
-T_virtual_groups._Automaton = _BuildAutomaton()
-
-
-
-
-T_config._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'key_config'), T_key_config, scope=T_config, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 91, 3)))
-
-T_config._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'value_def'), T_value_def_1, scope=T_config, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 92, 3)))
-
-def _BuildAutomaton_ ():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_
-    del _BuildAutomaton_
-    import pyxb.utils.fac as fac
-
-    counters = set()
-    states = []
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_config._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'key_config')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 91, 3))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = set()
-    symbol = pyxb.binding.content.ElementUse(T_config._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'value_def')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 92, 3))
-    st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-         ]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    st_1._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, False, containing_state=None)
-T_config._Automaton = _BuildAutomaton_()
-
-
-
-
-T_Integral._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_unit'), T_step_unit, scope=T_Integral, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 97, 3)))
-
-T_Integral._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'config'), T_config, scope=T_Integral, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 98, 3)))
-
-def _BuildAutomaton_2 ():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_2
-    del _BuildAutomaton_2
-    import pyxb.utils.fac as fac
-
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 98, 3))
-    counters.add(cc_0)
-    states = []
-    final_update = set()
-    symbol = pyxb.binding.content.ElementUse(T_Integral._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_unit')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 97, 3))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_0, False))
-    symbol = pyxb.binding.content.ElementUse(T_Integral._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'config')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 98, 3))
-    st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-         ]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-        fac.UpdateInstruction(cc_0, True) ]))
-    st_1._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, False, containing_state=None)
-T_Integral._Automaton = _BuildAutomaton_2()
-
-
-
-
-T_Essai._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'step_Essai'), T_step_Essai, scope=T_Essai, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 119, 1)))
-
-def _BuildAutomaton_3 ():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_3
-    del _BuildAutomaton_3
-    import pyxb.utils.fac as fac
-
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 122, 4))
-    counters.add(cc_0)
-    cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 123, 3))
-    counters.add(cc_1)
-    states = []
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_0, False))
-    final_update.add(fac.UpdateInstruction(cc_1, False))
-    symbol = pyxb.binding.content.ElementUse(T_Essai._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'step_Essai')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 123, 3))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    transitions = []
-    transitions.append(fac.Transition(st_0, [
-        fac.UpdateInstruction(cc_0, True),
-        fac.UpdateInstruction(cc_1, False) ]))
-    transitions.append(fac.Transition(st_0, [
-        fac.UpdateInstruction(cc_1, True) ]))
-    st_0._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, True, containing_state=None)
-T_Essai._Automaton = _BuildAutomaton_3()
-
-
-
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Integral_O'), T_Integral_O, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 86, 3), unicode_default='pas compris'))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'version'), T_version, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 105, 3), unicode_default='1.0.0'))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'virtual_groups'), T_virtual_groups, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 106, 3)))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'xenon_feedback'), T_xenon_feedback, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 107, 3)))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'cb'), T_cb, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 108, 3)))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'states'), T_states, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 109, 3)))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'calcul_type'), T_calcul_type, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 110, 3)))
-
-T_RodsWorthSetting._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Integral'), T_Integral, scope=T_RodsWorthSetting, location=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 112, 3)))
-
-def _BuildAutomaton_4 ():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_4
-    del _BuildAutomaton_4
-    import pyxb.utils.fac as fac
-
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 106, 3))
-    counters.add(cc_0)
-    cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 111, 3))
-    counters.add(cc_1)
-    cc_2 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 112, 3))
-    counters.add(cc_2)
-    states = []
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'version')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 105, 3))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'virtual_groups')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 106, 3))
-    st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'xenon_feedback')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 107, 3))
-    st_2 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_2)
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'cb')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 108, 3))
-    st_3 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_3)
-    final_update = None
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'states')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 109, 3))
-    st_4 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_4)
-    final_update = set()
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'calcul_type')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 110, 3))
-    st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_5)
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_1, False))
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Integral_O')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 86, 3))
-    st_6 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_6)
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_2, False))
-    symbol = pyxb.binding.content.ElementUse(T_RodsWorthSetting._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Integral')), pyxb.utils.utility.Location('/home/A96028/QT5GitEficasTravail/eficas/Poc/cataPoc.xsd', 112, 3))
-    st_7 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_7)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-         ]))
-    transitions.append(fac.Transition(st_2, [
-         ]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [
-        fac.UpdateInstruction(cc_0, True) ]))
-    transitions.append(fac.Transition(st_2, [
-        fac.UpdateInstruction(cc_0, False) ]))
-    st_1._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_3, [
-         ]))
-    st_2._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_4, [
-         ]))
-    st_3._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_5, [
-         ]))
-    st_4._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_6, [
-         ]))
-    transitions.append(fac.Transition(st_7, [
-         ]))
-    st_5._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_6, [
-        fac.UpdateInstruction(cc_1, True) ]))
-    transitions.append(fac.Transition(st_7, [
-        fac.UpdateInstruction(cc_1, False) ]))
-    st_6._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_7, [
-        fac.UpdateInstruction(cc_2, True) ]))
-    st_7._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, False, containing_state=None)
-T_RodsWorthSetting._Automaton = _BuildAutomaton_4()
-
-
-RodsWorthSetting._setSubstitutionGroup(step_Essai)
index c28e2147621543328920cd6e8af35198140e26e5..943e16dc171027901f81a19051ebca5dbddc5667 100644 (file)
@@ -5,8 +5,6 @@ pyxb.GlobalValidationConfig._setInvalidElementInContent(pyxb.GlobalValidationCon
 pyxb.GlobalValidationConfig._setOrphanElementInContent(pyxb.GlobalValidationConfig.RAISE_EXCEPTION)
 
 
-jdd = CreateFromDocument(open('toto.xml').read())
-#print (jdd.toDOM().toprettyxml())
-print ('voici la valeur de xenon_feedback', jdd.step_Essai[0].xenon_feedback, '\n') 
-
+jdd = CreateFromDocument(open('pocEssai.xml').read())
+print (jdd.toDOM().toprettyxml())
 
index 42745e287de9cfa507fc4ef3ff903c56d8ad083a..2e78a8b93880ab92adc2fe29c9d57e84748cf278 100644 (file)
@@ -4,6 +4,29 @@
 .PHONY: xsdAll driverAll
 SHELL=bash
 
+# #Pour chercher le modèle commun comme si 
+# # nous n'étions pas dans le source d'eficas
+# CDM_ROOT_DIR ?=../
+# #APP_ROOT_DIR ?=../../
+# #PRODUCTS_DIR ?=${HOME}/products
+
+# save_PYTHONPATH:=${PYTHONPATH}
+# save_PATH:=${PATH}
+# save_LD_LIBRARY_PATH:=${LD_LIBRARY_PATH}
+
+# #Exemple : Environement Code_Saturne
+# #CSPREFIX:=$(PRODUCTS_DIR)/code_saturne-6.1.0/install
+# #CSBIN:=${CSPREFIX}/bin
+# #CSLDLIB:=${CSPREFIX}/lib
+# #export PATH=$(CSBIN):$(save_PATH)
+# #export LD_LIBRARY_PATH=$(CSLDLIB):$(save_LD_LIBRARY_PATH)
+
+# #Accès aux generic_component et au CDM
+# export PYTHONPATH=$(save_PYTHONPATH):$(abspath $(CDM_ROOT_DIR))
+# #Accès aux generic_component et au CDM
+# #export PYTHONPATH=$(save_PYTHONPATH):$(abspath $(APP_ROOT_DIR)):$(abspath $(CDM_ROOT_DIR))
+# #export PYTHONPATH+=:$(abspath $(APP_ROOT)) ajout un blanc entre la valeur de PYTHONPATH et le chemin de APP_ROOT
+
 ifdef EFICAS4VIMMP_ROOT
 srcdir?=${EFICAS4VIMMP_ROOT}
 else
@@ -45,7 +68,7 @@ cata_Vimmp.py \
 cata_gromacs.py \
 cata_cps.py \
 cata_CSAndCPS.py \
-cata_CSAndCPS_v11.py 
+cata_CSAndCPS_v16.py 
 
 cata_basename=$(cata_files:%.py=%)
 xsd_files   = $(cata_files:%.py=%.xsd)
@@ -123,6 +146,6 @@ testAll: exec.sh driverAll $(new_test_driver_py) $(new_test_driver_xml)
 #################   REGLES DE NETTOYAGE   ########################
 
 clean:
-       rm -f *.pyc *~ qtEficasSlm.sh exec.sh environ.sh
+       rm -f *.pyc *~ qtEficasSlm.sh exec.sh environ.sh qtEficas.sh
        rm -rf raw  binding.py __pycache__
        rm -f $(xsd_files) $(driver_files)  *test_driver_?.py *test_driver_?.xml
index 5a3f8eff50033fcbbd3ec1e401c16077bf809c05..9f3fe4fb63b543b714d5fcf6981a31a0fd10c153 100644 (file)
@@ -50,7 +50,7 @@ EOF
 endef
 export SCRIPT_EFI = $(call _SCRIPT_EFI,qtEficas.sh)
 
-exec.sh: $(confdir)/GNUmakefile.env $(confdir)/GNUmakefile.mdm
+exec.sh: $(confdir)/GNUmakefile.env $(confdir)/GNUmakefile.mdm GNUmakefile
        @eval "$$SCRIPT_EXEC" && chmod +x $@
        @echo "You may use source exec.sh to launch a command using the minimal prerequisites without modifying your environement, thanks."
 #      @echo "-----------------> $(QTDEF)" | cat -A -
index e494f2af368bb687ce8c710e21b00b8fe79079d0..de56c9ad837439ad78c5fd6c11aabb7e614a5ea2 100755 (executable)
@@ -3,7 +3,7 @@
 import sys
 
 #print(sys.argv[:])
-
+#Ne pas faire : from Vimmp import @module@ as mdm
 import @module@ as mdm
 import pyxb