]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
merge PSEN
authorpascale.noyret <pascale.noyret@edf.fr>
Fri, 7 Aug 2015 10:22:56 +0000 (12:22 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Fri, 7 Aug 2015 10:22:56 +0000 (12:22 +0200)
17 files changed:
Ihm/I_MACRO_ETAPE.py
Ihm/I_MCSIMP.py
InterfaceQT4/browser.py
InterfaceQT4/configuration.py
InterfaceQT4/gereIcones.py
InterfaceQT4/monWidgetMatrice.py
InterfaceQT4/monWidgetPlusieursBase.py
InterfaceQT4/monWidgetPlusieursIntoOrdonne.py
InterfaceQT4/monWidgetPlusieursTuple.py
InterfaceQT4/monWidgetSimpFichier.py
InterfaceQT4/qtEficas.py
PSEN_Eficas/PSEN_Cata.py
PSEN_Eficas/opsPSEN.py
UiQT4/Tuple2.ui
UiQT4/desWidgetPlusieursTuple.ui
generator/generator_PSEN.py
generator/generator_dicoImbrique.py

index fbcc450908372e23857fbc0bf1ce14a8098d83d1..9cd262cb16991177f544707e4d33e58a5f72aeb2 100644 (file)
@@ -1141,7 +1141,9 @@ class MACRO_ETAPE(I_ETAPE.ETAPE):
       """
       try:
          sd=Noyau.N_MACRO_ETAPE.MACRO_ETAPE.Build_sd(self,nom)
-      except AsException,e:
+      except :
+      #   return None
+      #except AsException,e:
          # Une erreur s'est produite lors de la construction du concept
          # Comme on est dans EFICAS, on essaie de poursuivre quand meme
          # Si on poursuit, on a le choix entre deux possibilites :
index c8477cb46b4923290f7f615a6d6b3a17327c5d53..d9a6906dd4e8cdca5b3a00b2b40344416c76c7ae 100644 (file)
@@ -117,10 +117,10 @@ class MCSIMP(I_OBJECT.OBJECT):
            else : texteVal=str(val)
            txt = txt + sep+ texteVal 
 
-        if len(txt) > 200:
-            #ligne trop longue, on tronque
-            txt=txt+" ..."
-            break
+##        if len(txt) > 200:
+##            #ligne trop longue, on tronque
+##            txt=txt+" ..."
+##            break
         sep=','
       # cas des listes de tuples de longueur 1
       if isinstance(val,types.TupleType) and len(self.valeur) == 1 : txt=txt+','
index d87818f2391ea0be6f3325da98480987122474c4..7594e78a1725bdade8a88f8c5a5990a815324edc 100644 (file)
@@ -135,7 +135,7 @@ class JDCTree( QTreeWidget ):
 
     def handleOnItem(self,item,int):
         #if (len(self.selectedIndexes())!=2): return
-        #print "je passe dans handleOnItem"
+        #print "je passe dans handleOnItem pour ", self.item.nom
         self.inhibeExpand == True 
         self.itemCourrant=item
         itemParent=item
@@ -143,11 +143,10 @@ class JDCTree( QTreeWidget ):
         while not (hasattr (itemParent,'getPanel2')) : 
            if itemParent.plie==True : itemParent.setDeplie()
            itemParent=itemParent.treeParent 
-        #print itemParent
+        #print itemParent.item.nom
         #print itemParent.fenetre
         #print self.editor.afficheCommandesPliees
         if itemParent.fenetre != self.editor.fenetreCentraleAffichee : 
-            #print self.editor.afficheCommandesPliees
             if self.editor.afficheCommandesPliees : itemParent.plieToutEtReaffiche()
             else :                                  itemParent.affichePanneau()
         if itemParent!=item and item.fenetre != None: item.fenetre.rendVisible()
@@ -174,6 +173,7 @@ PARAMETERS  = "PARAMETRE"
 class JDCNode(QTreeWidgetItem):
     def __init__( self, treeParent, item):
         #print "creation d'un noeud : ", item, " ",item.nom,"", treeParent, self
+        #print "creation d'un noeud : ", item.nom
         self.a=0
         self.item        = item
         self.vraiParent  = treeParent
@@ -202,8 +202,6 @@ class JDCNode(QTreeWidgetItem):
         else :
             self.plie        = False
             self.appartientAUnNoeudPlie = False
-        #print "self.plie", self.plie
-        #print "self.appartientAUnNoeudPlie", self.appartientAUnNoeudPlie
         #print self.treeParent
 
         ajoutAuParentduNoeud=0
@@ -593,7 +591,7 @@ class JDCNode(QTreeWidgetItem):
 #    #------------------------------------------------------------------
     def onValid(self):        
 
-        print "onValid pour ", self.item.nom
+        #print "onValid pour ", self.item.nom
         if hasattr(self,'fenetre') and self.fenetre: self.fenetre.setValide()
         if (self.item.nom == "VARIABLE" or self.item.nom == "DISTRIBUTION") and self.item.isvalid():
            self.item.jdc.recalcule_etat_correlation()
@@ -754,6 +752,9 @@ class JDCNode(QTreeWidgetItem):
         #print "je suis dans plieToutEtReaffiche", self.item.get_nom()
         self.editor.deplier = False
         for item in self.children :
+            # il ne faut pas plier les blocs 
+            from InterfaceQT4 import compobloc
+            if (isinstance(item,compobloc.Node)) : continue
             item.setPlie()
         self.affichePanneau()
 
index c4e1ef7d8433d68f54bb01fb37f77d6b044f24cb..db41783093a1c569e6ea35e8ec8bca09db5c3dfb 100644 (file)
@@ -70,7 +70,11 @@ class CONFIG_BASE:
       if self.appli: self.parent=appli.top\r
       else:         self.parent=None\r
 \r
-      if not os.path.isdir(self.savedir) : self.savedir=os.environ['HOME']\r
+      if not os.path.isdir(self.savedir) :\r
+        if sys.platform[0:5]=="linux" :\r
+          self.savedir=os.environ['HOME']\r
+        else:\r
+          self.savedir='C:/'\r
       \r
 \r
 \r
@@ -82,7 +86,10 @@ class CONFIG_BASE:
       self.path_doc     = os.path.abspath(os.path.join(self.repIni,'..','Doc'))\r
       self.exec_acrobat = 'acroread'\r
       nomDir="Eficas_"+self.code\r
-      self.savedir   = os.path.abspath(os.path.join(os.environ['HOME'],nomDir))\r
+      if sys.platform[0:5]=="linux" :\r
+        self.savedir   = os.path.abspath(os.path.join(os.environ['HOME'],nomDir))\r
+      else:\r
+        self.savedir = os.path.abspath('C:/')\r
       self.mode_nouv_commande='initial'\r
       self.affiche="alpha"\r
  \r
index e5d3d67caa5b4b6f745b3d67465523c4cac867f1..a0053c900a897261c834879e5004d3a40a8291b2 100644 (file)
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 # Modules Python
-import string,types,os,re
+import string,types,os,re,sys
 import traceback
 
 from PyQt4 import *
@@ -156,11 +156,13 @@ class ContientIcones:
   def BFichierVisu(self):
        fichier=self.lineEditVal.text()
        if fichier == None or str(fichier)=="" : return
-       from qtCommun import ViewText
+       from monViewTexte import ViewText
        try :
-         if sys.platform[0:5]=="linux" : cmd="xdg-open "+ str(fichier)
-         else                         : cmd="start "+ str(fichier)
-         os.system(cmd)
+         if sys.platform[0:5]=="linux" :
+           cmd="xdg-open "+ str(fichier)
+           os.system(cmd)
+         else                         :
+           os.startfile(str(fichier)) 
        except:
          try :
             fp=open(fichier)
index dfce842478b18da2f21cca491a71c5371001cc5b..ad4ee030fc6da873378aec3e5bf9a3577f4d6ef1 100644 (file)
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 # Modules Python
-import string,types,os
+import string,types,os,sys
 
 # Modules Eficas
 from PyQt4.QtGui     import *
@@ -46,6 +46,13 @@ class MonWidgetMatrice (Ui_desWidgetMatrice,Feuille):
         else :
            try    : self.initialValeur()
            except : self.initialSsValeur()
+        if sys.platform[0:5]!="linux" : 
+          repIcon=self.node.editor.appliEficas.repIcon
+          fichier=os.path.join(repIcon, 'update.png')
+          icon = QIcon(fichier)
+          self.PBrefresh.setIcon(icon)
+          self.PBrefresh.setIconSize(QSize(32, 32))
+
 
 
   def connecterSignaux(self) :
index a43800ab0e7f70d6f47c04509c1b5efe33514fe1..fd35071cf2a1c4406d9200eded42f73342c9774a 100644 (file)
@@ -48,6 +48,20 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe):
         GereListe.__init__(self)
         self.connect(self.BSelectFichier,SIGNAL("clicked()"), self.selectInFile)
 
+       if sys.platform[0:5]!="linux":
+          repIcon=self.node.editor.appliEficas.repIcon
+          fichier=os.path.join(repIcon, 'arrow_up.png')
+          icon = QIcon(fichier)
+          self.RBHaut.setIcon(icon)
+          self.RBHaut.setIconSize(QSize(32, 32))
+          fichier2=os.path.join(repIcon, 'arrow_down.png')
+          icon2 = QIcon(fichier2)
+          self.RBBas.setIcon(icon2)
+          fichier3=os.path.join(repIcon, 'file-explorer.png')
+          icon3 = QIcon(fichier2)
+          self.BSelectFichier.setIcon(icon3)
+          self.BSelectFichier.setIconSize(QSize(32, 32))
+
         self.listeValeursCourantes=self.node.item.GetListeValeurs()
         if self.monSimpDef.max != "**"  and self.monSimpDef.max < 7: 
            hauteur=dicoLongueur[self.monSimpDef.max]
index ed20a4dad9c318ef636787a3e392d80a2daf90f4..b56f4b0406aa1c971a61f91b901ba4981add1647 100644 (file)
@@ -53,6 +53,16 @@ class MonWidgetPlusieursIntoOrdonne (Ui_WidgetPlusieursIntoOrdonne, Feuille,Gere
         self.prepareListeResultat()
         self.adjustSize()
         self.vScrollBarRE = self.scrollAreaRE.verticalScrollBar()
+        if sys.platform[0:5]!="linux":
+          repIcon=self.node.editor.appliEficas.repIcon
+          fichier=os.path.join(repIcon, 'arrow_up.png')
+          icon = QIcon(fichier)
+          self.RBHaut.setIcon(icon)
+          self.RBHaut.setIconSize(QSize(32, 32))
+          fichier2=os.path.join(repIcon, 'arrow_down.png')
+          icon2 = QIcon(fichier2)
+          self.RBBas.setIcon(icon2)
+
        
   def setValeurs(self):
        for i in self.listeLE:
index 9b8f254b643e6976dd048024733dcf85b8125cc9..64af770a6df33fe42815147263b9aee7c18c0c78 100644 (file)
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 # Modules Python
-import string,types,os
+import string,types,os,sys
 
 # Modules Eficas
 from PyQt4.QtGui import *
@@ -44,6 +44,7 @@ class TupleCustom :
       self.valeur=None
       self.index=index
 
+
       for i in range(self.tailleTuple):
          nomLE="lineEditVal_"+str(i+1)
          courant=getattr(self,nomLE)
@@ -132,6 +133,22 @@ class MonWidgetPlusieursTuple(Feuille,GereListe):
         GereListe.__init__(self)
         self.politique=PolitiquePlusieurs(self.node,self.editor)
         self.parentQt.commandesLayout.insertWidget(-1,self)
+        if sys.platform[0:5]!="linux":
+          repIcon=self.node.editor.appliEficas.repIcon
+          fichier=os.path.join(repIcon, 'arrow_up.png')
+          icon = QIcon(fichier)
+          self.RBHaut.setIcon(icon)
+          self.RBHaut.setIconSize(QSize(32, 32))
+          fichier2=os.path.join(repIcon, 'arrow_down.png')
+          icon2 = QIcon(fichier2)
+          self.RBBas.setIcon(icon2)
+          fichier3=os.path.join(repIcon, 'file-explorer.png')
+          icon3 = QIcon(fichier3)
+          self.BSelectFichier.setIcon(icon3)
+          self.BSelectFichier.setIconSize(QSize(32, 32))
+          
+        
+
 
   def ajoutLineEdit(self,valeur=None,inInit=False):
       self.indexDernierLabel=self.indexDernierLabel+1
@@ -165,6 +182,7 @@ class MonWidgetPlusieursTuple(Feuille,GereListe):
 
 
   def setValeurs(self):
+       self.RBListePush()
        valeurs=self.node.item.get_valeur()
        min,max=self.node.item.GetMinMax()
        if max == "**" or max > 5 : aCreer=5
@@ -222,3 +240,41 @@ class MonWidgetPlusieursTuple(Feuille,GereListe):
          except :
            pass
           
+  def RBListePush(self):
+      if self.objSimp.valeur != None and self.objSimp.valeur != [] : return
+      if self.objSimp.definition.validators.typeDesTuples[0]==self.editor.readercata.cata[0].sd_ligne :
+         val=[]
+         for k in self.objSimp.jdc.LineDico.keys() :
+              try :
+               valeur=self.objSimp.jdc.get_concept(k)
+               val.append((valeur,0))
+              except :
+               pass
+         self.node.item.set_valeur(val)
+      if self.objSimp.definition.validators.typeDesTuples[0]==self.editor.readercata.cata[0].sd_generateur :
+         val=[]
+         for k in self.objSimp.jdc.MachineDico.keys() :
+              try :
+               valeur=self.objSimp.jdc.get_concept(k)
+               val.append((valeur,0))
+              except :
+               pass
+         self.node.item.set_valeur(val)
+      if self.objSimp.definition.validators.typeDesTuples[0]==self.editor.readercata.cata[0].sd_transfo :
+         val=[]
+         for k in self.objSimp.jdc.TransfoDico.keys() :
+              try :
+               valeur=self.objSimp.jdc.get_concept(k)
+               val.append((valeur,0))
+              except :
+               pass
+         self.node.item.set_valeur(val)
+      if self.objSimp.definition.validators.typeDesTuples[0]==self.editor.readercata.cata[0].sd_charge :
+         val=[]
+         for k in self.objSimp.jdc.LoadDico.keys() :
+              try :
+               valeur=self.objSimp.jdc.get_concept(k)
+               val.append((valeur,0))
+              except :
+               pass
+         self.node.item.set_valeur(val)
index 03cf456cb2a1219e6a9e3eb90d4e00cd424ce1da..25f5c07357cede05255a051e6690ac1e16e0c4fa 100644 (file)
@@ -34,8 +34,12 @@ class MonWidgetSimpFichier (Ui_WidgetSimpFichier,MonWidgetSimpBase):
 
   def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande):
         MonWidgetSimpBase.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande)
+        if sys.platform[0:5]!="linux" :
+          repIcon=self.node.editor.appliEficas.repIcon
+          fichier=os.path.join(repIcon, 'file-explorer.png')
+          icon = QIcon(fichier)
+          self.BFichier.setIcon(icon)
+          self.BFichier.setIconSize(QSize(32, 32))
         # deja fait dans MonWidgetSimpBase
         #self.maCommande.listeAffichageWidget.append(self.lineEditVal)
 
-
-
index e0415e66cba888adb134f9ddecb753f04690526c..160f5921fce1cd0ae7b79352b4631c77f60ae7d0 100644 (file)
@@ -63,7 +63,8 @@ class Appli(Ui_Eficas,QMainWindow):
         self.ficRecents={}
         self.listeAEnlever=[]
         self.ListeCode=['Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP','ZCracks', 'CarmelCND','MT']
-        self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+        #self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+        self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'..','Editeur','icons')
 
         if self.salome:
           import Accas
@@ -74,7 +75,6 @@ class Appli(Ui_Eficas,QMainWindow):
         self.multi=multi
         if langue=='fr': self.langue=langue
         else           : self.langue="ang"
-        self.langue='fr'
         if self.multi == False :
              self.definitCode(code,ssCode)
              if code==None: return
@@ -163,8 +163,11 @@ class Appli(Ui_Eficas,QMainWindow):
     def ajoutExecution(self):
         self.menuExecution = self.menubar.addMenu(QApplication.translate("Eficas", "Execution", None, QApplication.UnicodeUTF8))
         self.actionExecution = QAction(self)
-        icon6 = QIcon(self.repIcon+"/roue.png")
-        self.actionExecution.setIcon(icon6)
+        if sys.platform[0:5]=="linux":
+          icon6 = QIcon(self.repIcon+"/roue.png")
+          self.actionExecution.setIcon(icon6)
+        else :
+          self.actionExecution.setText(QApplication.translate("Eficas", "Run", None))
         self.actionExecution.setObjectName("actionExecution")
         self.menuExecution.addAction(self.actionExecution)
         if not(self.actionExecution in self.toolBar.actions()):
@@ -249,7 +252,6 @@ class Appli(Ui_Eficas,QMainWindow):
 
     def PSEN(self):
         self.ajoutExecution()
-        self.ajoutSauveExecution()
 
     def ChercheGrpMesh(self):
         Msg,listeGroup=self.ChercheGrpMeshInSalome()
index 2621f9f50165e92385048a1e7cbf8bcf3e1b1aeb..b888149407dbcfb25f96e5f1ed0113c20174d129 100755 (executable)
@@ -78,14 +78,19 @@ class Matrice:
 #CONTEXT.debug = 1
 JdC = JDC_CATA ( code = 'PSEN',
                  execmodul = None,
-                 regles = ( AU_MOINS_UN ( 'PARAMETRES_PSSE' ),
+                 regles = ( AU_MOINS_UN ( 'PSSE_PARAMETERS' ),
                             AU_MOINS_UN ( 'DIRECTORY' ),
                             AU_MOINS_UN ( 'DISTRIBUTION' ),
                             AU_MOINS_UN ( 'SIMULATION' ),
-                            AU_PLUS_UN ( 'PARAMETRES_PSSE' ),
+                            AU_PLUS_UN ( 'PSSE_PARAMETERS' ),
                             AU_PLUS_UN ( 'DIRECTORY' ),
                             AU_PLUS_UN ( 'SIMULATION' ),
                             AU_PLUS_UN ( 'CORRELATION' ),
+                            AU_PLUS_UN ( 'N_1_GENERATORS' ),
+                            AU_PLUS_UN ( 'N_1_LINES' ),
+                            AU_PLUS_UN ( 'N_1_LOADS' ),
+                            AU_PLUS_UN ( 'N_1_TRANSFORMERS' ),
+                            
                             ),
                  ) # Fin JDC_CATA
 
@@ -133,34 +138,34 @@ MONTRANSFO =  OPER ( nom = "MONTRANSFO",
 
 
 
-PARAMETRES_PSSE = PROC ( nom = "PARAMETRES_PSSE",
+PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS",
              op=None,
              docu = "",
-  COUT_COMBUSTIBLE = SIMP ( statut = "o",
+  FUEL_COST = SIMP ( statut = "o",
                      typ=bool,
                      defaut=True,
                      ),
-  COUT_DELESTAGE = SIMP ( statut = "o",
+  LOADSHEDDING_COST = SIMP ( statut = "o",
                      typ=bool,
                      defaut=False,
                      ),
-  COUT_MVAR = SIMP ( statut = "o",
+  MVAR_COST = SIMP ( statut = "o",
                      typ=bool,
                      defaut=False,
                     ),
-  IMAP = SIMP ( statut = "o",
+  I_MAX = SIMP ( statut = "o",
                      typ='TXM',
                      into=['RateA','RateB','RateC'],
-                     defaut=False,
+                     defaut='RateA',
                     ),
   LOCK_TAPS = SIMP ( statut = "o",
                      typ=bool,
                      defaut=True,
                      ),
-  P_MIN= SIMP ( statut = "o",
-                     typ=bool,
-                     defaut=True,
-                     ),
+##  P_MIN= SIMP ( statut = "o",
+##                     typ=bool,
+##                     defaut=True,
+##                     ),
 )
 
 SIMULATION = PROC ( nom = "SIMULATION",
@@ -182,148 +187,1079 @@ SIMULATION = PROC ( nom = "SIMULATION",
                  into=[1],
                 ),
 
-##  STUDY = SIMP ( statut = "o",
-##                 typ = "TXM",
-##                 into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ),
-##                 max=5,
-##                 fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
-##                 ang = "Open TURNS library debug level print",
-##                 ), 
-) 
+##  STUDY = SIMP ( statut = "o",
+##                 typ = "TXM",
+##                 into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ),
+##                 max=5,
+##                 fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
+##                 ang = "Open TURNS library debug level print",
+##                 ), 
+) 
+
+
+#================================
+# Definition du modele physique
+#================================
+
+
+
+CORRELATION = PROC ( nom = 'CORRELATION',
+                     op = None,
+                     docu = "",
+                     fr = "Correlation entre variables",
+                     ang = "Variable correlation",
+
+####  Copula = SIMP ( statut = "o",
+####                  typ = 'TXM',
+####                  into = ( "Independent", "Normal" ),
+####                  defaut = "Independent",
+####                  fr = "Type de la copule",
+####                  ang = "Copula kind",
+####                  ),
+##
+## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
+##                  
+    CorrelationMatrix = SIMP ( statut = "o",
+                               typ = Matrice(nbLigs=None,
+                                             nbCols=None,
+                                             methodeCalculTaille='NbDeDistributions',
+                                             structure="symetrique"),
+                               fr = "Matrice de correlation entre les variables d'entree",
+                               ang = "Correlation matrix for input variables",
+                               ),
+##  #), # Fin BLOC Matrix
+##
+##
+) 
+
+DIRECTORY = MACRO ( nom = 'DIRECTORY',
+        op=None,
+        fr = "Chargement des generateurs et des charges",
+        ang = "Physical model wrapper load",
+                sd_prod = opsPSEN.INCLUDE,
+                op_init = opsPSEN.INCLUDE_context,
+                #sd_prod=None,
+                fichier_ini = 1,
+
+        PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'),
+        sav_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),),
+        results_folder=SIMP(statut="o",typ='Repertoire'),
+        #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
+        #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
+        #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),        
+        
+) 
+
+
+
+#================================
+# Importation des fichiers csv N-1
+#================================
+
+N_1_LINES = PROC( nom="N_1_LINES",
+                     op = None,
+                     docu = "",
+                     fr = "N-1 lignes",
+                     ang = "N-1 lines",
+  Activated = SIMP ( statut='o', typ=bool, defaut=True),
+##  FileName = SIMP ( statut = "o",
+##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+##                    fr = "chemin du fichier csv des probabilites des defauts lignes",
+##                    ang = "csv file path with probabilities of line outages",
+##                    ),
+  Probability = SIMP ( statut = 'o',
+                       typ = Tuple(2),
+                       max = '**',
+                       fr = "Probabilite d'indisponibilite de la ligne",
+                       ang = "Probability that the line is not available",
+                       validators=VerifTypeTuple((sd_ligne,'R')),),
+              )
+
+N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS",
+                     op = None,
+                     docu = "",
+                     fr = "N-1 transformateurs",
+                     ang = "N-1 transformers",
+  Activated = SIMP ( statut='o', typ=bool, defaut=True),
+##  FileName = SIMP ( statut = "o",
+##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+##                    fr = "chemin du fichier csv des probabilites des defauts transformateur",
+##                    ang = "csv file path with probabilities of transformer outages",
+##                    ),
+  Probability = SIMP ( statut = 'o',
+                       typ = Tuple(2),
+                       max = '**',
+                       fr = "Probabilite d'indisponibilite de la ligne",
+                       ang = "Probability that the line is not available",
+                       validators=VerifTypeTuple((sd_transfo,'R')),),
+              )
+N_1_GENERATORS = PROC( nom="N_1_GENERATORS",
+                     op = None,
+                     docu = "",
+                     fr = "N-1 generateurs",
+                     ang = "N-1 generators",
+  Activated = SIMP ( statut='o', typ=bool, defaut=True),
+##  FileName = SIMP ( statut = "o",
+##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+##                    fr = "chemin du fichier csv des probabilites des defauts generateurs",
+##                    ang = "csv file path with probabilities of generator outages",
+##                    ),
+  Probability = SIMP ( statut = 'o',
+                       typ = Tuple(2),
+                       max = '**',
+                       fr = "Probabilite d'indisponibilite du generateur",
+                       ang = "Probability that the generator is not available",
+                       validators=VerifTypeTuple((sd_generateur,'R')),),
+              )
+N_1_LOADS = PROC( nom="N_1_LOADS",
+                     op = None,
+                     docu = "",
+                     fr = "N-1 charges",
+                     ang = "N-1 loads",
+  Activated = SIMP ( statut='o', typ=bool, defaut=True),
+##  FileName = SIMP ( statut = "o",
+##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+##                    fr = "chemin du fichier csv des probabilites des defauts charges",
+##                    ang = "csv file path with probabilities of load outages",
+##                    ),
+  Probability = SIMP ( statut = 'o',
+                       typ = Tuple(2),
+                       max = '**',
+                       fr = "Probabilite d'indisponibilite du generateur",
+                       ang = "Probability that the generator is not available",
+                       validators=VerifTypeTuple((sd_charge,'R')),),
+              )
+
+
+
+
+#================================
+# Definition des LOIS
+#================================
+
+# Nota : les variables de type OPER doivent etre en majuscules !
+# Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type)
+DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
+                      sd_prod = loi,
+                      op = 68,
+                      fr = "Definitions des lois marginales utilisees par les variables d'entree", 
+
+#====
+# Choisir generateur ou charge
+#====
+
+##  TypeMachine = SIMP ( statut='o', typ='TXM',
+##                      into = ('charge','vent1','vent2','pv','N-1',),
+##                      ),
+  Activated = SIMP ( statut='o', typ=bool, defaut=True),
+  ComponentType = SIMP (statut='o', typ='TXM',
+                      into = ('Generator','Load','Line','Transformer'),),
+  b_gener = BLOC (condition = "ComponentType == 'Generator'",
+        
+  Type = SIMP (statut= "o", typ = "TXM",
+               into = ("Generator Power Level", "Generator Availability"),
+               fr = "Choisir si c'est le niveau de puissance ou la disponibilité du generateur qui sera tiree",
+               ang= "Choose whether the power level or the availability of the generator will be set by the law",
+               defaut = "Generator Power Level",
+               ),
+                  
+  Generator   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon"),
+
+#====
+# Type de distribution
+#====
+  
+
+  Law = SIMP ( statut = "o", typ = "TXM",
+                into = ( "Exponential",
+                         "Histogram",
+                         "Normal",
+                         "Rayleigh",
+                         "PDF_from_file",
+                         "TruncatedNormal",
+                         "TimeSeries_from_file",
+                         "Uniform",
+                         "UserDefined",
+                         "Weibull",
+                         ),
+                fr = "Choix du type de la loi marginale",
+                ang = "1D marginal distribution",
+                ),
+
+                      
+#====
+# Definition des parametres selon le type de la loi
+#====
+
+
+  EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
+
+                         Lambda = SIMP ( statut = "o",
+                                         typ = "R",
+                                         max = 1,
+                                         val_min = 0.,
+                                         fr = "Parametre Lambda | Lambda > 0",
+                                         ang = "Lambda parameter | Lambda > 0",
+                                         ),
+
+                         Gamma = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure du support de la loi",
+                                        ang = "Support lower bound",
+                                        ),
+
+  ), # Fin BLOC EXPONENTIAL
+
+
+  HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
+
+                       First = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du supoport de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : largeur de classe, hauteur de classe",
+                                       ang = "Class bandwidth, class height couple list",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+
+  ), # Fin BLOC HISTOGRAM
+
+
+   NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
+
+                    Mu = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Moyenne de la loi",
+                                ang = "Mean value",
+                                ),
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  val_min = 0.,
+                                  fr = "Ecart type de la loi",
+                                  ang = "Standard deviation",
+                                  ),
+
+   ), # Fin BLOC NORMAL
+
+
+  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Parametre Sigma de la loi | Sigma > 0",
+                                  ang = "Sigma parameter | Sigma > 0",
+                                  ),
+
+                   Gamma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Borne inferieure du support de la loi",
+                                  ang = "Support lower bound",
+                                  ),
+ ), # Fin BLOC RAYLEIGH
+
+  PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Nom du modele physique",
+                    ang = "Physical model identifier",
+                    ),
+              ),
+              
+
+
+   TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
+
+                             MuN = SIMP ( statut = "o",
+                                          typ = "R",
+                                          max = 1,
+                                          fr = "Moyenne de la loi Normale non tronquée",
+                                          ang = "Mean value of the associated non truncated normal distribution",
+                                          ),
+
+                             SigmaN = SIMP ( statut = "o",
+                                             typ = "R",
+                                             max = 1,
+                                             val_min = 0.,
+                                             fr = "Ecart-type de la loi Normale non tronquée",
+                                             ang = "Standard deviation of the associated non truncated normal distribution",
+                                             ),
+
+                             A = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure de la loi | A < B",
+                                        ang = "Lower bound | A < B",
+                                        ),
+
+                             B = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne superieure de la loi | A < B",
+                                        ang = "Upper bound | A < B",
+                                        ),
+
+   ), # Fin BLOC TRUNCATEDNORMAL
+
+
+  TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Fichier CSV d'une serie temporelle",
+                    ang = "CSV file of a time series",
+                    ),
+              ),
+
+
+   UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
+
+                     A = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne inferieure du support de la loi | A < B",
+                                ang = "Support lower bound | A < B",
+                                ),
+
+                     B = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne superieure du support de la loi | A < B",
+                                ang = "Support upper bound | A < B",
+                                ),
+
+   ), # Fin BLOC UNIFORM
+
+
+   USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
+
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : (valeur, probabilite)",
+                                       ang = "List of pairs : (value, probability)",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+
+  ), # Fin BLOC USERDEFINED
+
+
+   WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
+
+                     Settings = SIMP ( statut = "o",
+                                          typ = "TXM",
+                                          max = 1,
+                                          into = ( "AlphaBeta", "MuSigma" ),
+                                          defaut = "AlphaBeta",
+                                          fr = "Parametrage de la loi weibull",
+                                          ang = "Weibull distribution parameter set",
+                                          ),
+
+                     AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
+
+                                         Alpha = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Parametre Alpha de la loi | Alpha > 0",
+                                                        ang = "Alpha parameter | Alpha > 0",
+                                                        ),
+
+                                         Beta = SIMP ( statut = "o",
+                                                       typ = "R",
+                                                       max = 1,
+                                                       val_min = 0.,
+                                                       fr = "Parametre Beta de la loi | Beta > 0",
+                                                       ang = "Beta parameter | Beta > 0",
+                                                       ),
+
+                                         ), # Fin BLOC AlphaBeta_Parameters
+
+
+                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
+
+                                         Mu = SIMP ( statut = "o",
+                                                     typ = "R",
+                                                     max = 1,
+                                                     fr = "Moyenne de la loi",
+                                                     ang = "Mean value",
+                                                     ),
+
+                                         Sigma = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Ecart type de la loi",
+                                                        ang = "Standard deviation",
+                                                        ),
+
+                                         ), # Fin BLOC MuSigma_Parameters
+
+                     Gamma = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du support de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+    ), # Fin BLOC WEIBULL
+
+
+    Transfer_Function = FACT(statut='f',
+                
+        Input = SIMP ( statut='o',
+                       typ = 'TXM',
+                       fr = 'Entrer une fonction de transfert à partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \
+                             ou entrer une liste de tuples (valeur tiree - puissance normalisee)',
+                       ang = 'Enter wind speed - turbine production transfer function as a .pow file, \n \
+                              or enter a generic list of (law output value, normalized power output) tuples',
+                       into = ('.pow file', 'tuples list'),
+                             ),
+        b_file = BLOC(condition = "Input == '.pow file'",
+                      File_Name = SIMP ( statut = "o",
+                                        typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',),
+                                        fr = "Nom du fichier de transfer .pow",
+                                        ang = ".pow file name",
+                                        ),
+                      Wind_Speed_Measurement_Height = SIMP ( statut = 'o',
+                                        typ = "R",
+                                        max = 1,
+                                        fr = 'Hauteur (en metres) a laquelle les mesures de vitesse du vent ont ete prises',
+                                        ang = 'Height of wind speed measurements (m)',
+                                        sug = 10,
+                                        val_min = 0, 
+                                        ),
+                      Hub_Height = SIMP (statut = 'o',
+                                         typ = "R",
+                                         fr = 'hauteur de moyeu de l''eolienne',
+                                         ang = 'wind turbine hub height',
+                                         sug = 80,
+                                         val_min = 0,),
+                      Alpha = SIMP (statut = 'o',
+                                         typ = "R",
+                                         fr = 'l''alpha pour extrapoler les mesures de vitesse du vent a la hauteur du moyeu ',
+                                         ang = 'alpha used to extrapolate wind speed measurements to hub height',
+                                         defaut = 1./7,
+                                         val_min = 0,
+                                         val_max = 1,
+                                            ),
+                      Percent_Losses = SIMP (statut = 'o',
+                                         typ = "R",
+                                         fr = 'pourcentage de pertes entre la sortie theorique d''une turbine et la sortie de la centrale',
+                                         ang = 'percent losses between theoretical power output of a single turbine and the output of the farm',
+                                         defaut = 5,
+                                         val_min = 0,
+                                         val_max = 100,
+                                             ),                      
+                      ), #fin du bloc FileName
+
+        b_tuples = BLOC(condition = "Input == 'tuples list'",
+
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**',
+                                       min = 2,
+                                       fr = "Liste de couples : valeur tiree, puissance normalisee sortie",
+                                       ang = "List of couples : value set by law, normalized power output",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+                      ), #fin du block Tuples List
+                            
+        ), #fin du FACT Transfer Function
+
+  ), #fin du bloc generateur
+                      
+  b_charge = BLOC (condition = "ComponentType == 'Load'",
+        
+
+#====
+# Type de distribution
+#====
+  
+  Type = SIMP (statut= "o", typ = "TXM",
+               into = ("Load Level", "Load Availability"),
+               fr = "Choisir si c'est le niveau de charge ou la disponibilité de la charge qui sera tiree",
+               ang= "Choose whether the power level or the availability of the load will be set by the law",
+               defaut = "Load Level",
+               ),
+
+  Load       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",),
+
+  Law = SIMP ( statut = "o", typ = "TXM",
+                into = ( "Exponential",
+                         "Histogram",
+                         "Normal",
+                         "Rayleigh",
+                         "PDF_from_file",
+                         "TruncatedNormal",
+                         "TimeSeries_from_file",
+                         "Uniform",
+                         "UserDefined",
+                         "Weibull",
+                         ),
+                fr = "Choix du type de la loi marginale",
+                ang = "1D marginal distribution",
+                ),
+
+                      
+#====
+# Definition des parametres selon le type de la loi
+#====
+
+
+  EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
+
+                         Lambda = SIMP ( statut = "o",
+                                         typ = "R",
+                                         max = 1,
+                                         val_min = 0.,
+                                         fr = "Parametre Lambda | Lambda > 0",
+                                         ang = "Lambda parameter | Lambda > 0",
+                                         ),
+
+                         Gamma = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure du support de la loi",
+                                        ang = "Support lower bound",
+                                        ),
+
+  ), # Fin BLOC EXPONENTIAL
+
+
+  HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
+
+                       First = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du supoport de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : largeur de classe, hauteur de classe",
+                                       ang = "Class bandwidth, class height couple list",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+
+  ), # Fin BLOC HISTOGRAM
+
+
+   NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
+
+                    Mu = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Moyenne de la loi",
+                                ang = "Mean value",
+                                ),
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  val_min = 0.,
+                                  fr = "Ecart type de la loi",
+                                  ang = "Standard deviation",
+                                  ),
+
+   ), # Fin BLOC NORMAL
+
+
+  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Parametre Sigma de la loi | Sigma > 0",
+                                  ang = "Sigma parameter | Sigma > 0",
+                                  ),
+
+                   Gamma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Borne inferieure du support de la loi",
+                                  ang = "Support lower bound",
+                                  ),
+ ), # Fin BLOC RAYLEIGH
+
+  PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Nom du modele physique",
+                    ang = "Physical model identifier",
+                    ),
+              ),
+              
+
+
+   TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
+
+                             MuN = SIMP ( statut = "o",
+                                          typ = "R",
+                                          max = 1,
+                                          fr = "Moyenne de la loi Normale non tronquée",
+                                          ang = "Mean value of the associated non truncated normal distribution",
+                                          ),
+
+                             SigmaN = SIMP ( statut = "o",
+                                             typ = "R",
+                                             max = 1,
+                                             val_min = 0.,
+                                             fr = "Ecart-type de la loi Normale non tronquée",
+                                             ang = "Standard deviation of the associated non truncated normal distribution",
+                                             ),
+
+                             A = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure de la loi | A < B",
+                                        ang = "Lower bound | A < B",
+                                        ),
+
+                             B = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne superieure de la loi | A < B",
+                                        ang = "Upper bound | A < B",
+                                        ),
+
+   ), # Fin BLOC TRUNCATEDNORMAL
+
+
+  TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Fichier CSV d'une serie temporelle",
+                    ang = "CSV file of a time series",
+                    ),
+              ),
+
+
+   UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
+
+                     A = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne inferieure du support de la loi | A < B",
+                                ang = "Support lower bound | A < B",
+                                ),
+
+                     B = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne superieure du support de la loi | A < B",
+                                ang = "Support upper bound | A < B",
+                                ),
+
+   ), # Fin BLOC UNIFORM
+
+
+   USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
+
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : (valeur, probabilite)",
+                                       ang = "List of pairs : (value, probability)",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+
+  ), # Fin BLOC USERDEFINED
+
+
+   WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
+
+                     Settings = SIMP ( statut = "o",
+                                          typ = "TXM",
+                                          max = 1,
+                                          into = ( "AlphaBeta", "MuSigma" ),
+                                          defaut = "AlphaBeta",
+                                          fr = "Parametrage de la loi weibull",
+                                          ang = "Weibull distribution parameter set",
+                                          ),
+
+                     AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
+
+                                         Alpha = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Parametre Alpha de la loi | Alpha > 0",
+                                                        ang = "Alpha parameter | Alpha > 0",
+                                                        ),
+
+                                         Beta = SIMP ( statut = "o",
+                                                       typ = "R",
+                                                       max = 1,
+                                                       val_min = 0.,
+                                                       fr = "Parametre Beta de la loi | Beta > 0",
+                                                       ang = "Beta parameter | Beta > 0",
+                                                       ),
+
+                                         ), # Fin BLOC AlphaBeta_Parameters
+
+
+                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
+
+                                         Mu = SIMP ( statut = "o",
+                                                     typ = "R",
+                                                     max = 1,
+                                                     fr = "Moyenne de la loi",
+                                                     ang = "Mean value",
+                                                     ),
+
+                                         Sigma = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Ecart type de la loi",
+                                                        ang = "Standard deviation",
+                                                        ),
+
+                                         ), # Fin BLOC MuSigma_Parameters
+
+                     Gamma = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du support de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+    ), # Fin BLOC WEIBULL
+
+
+  ), #fin du bloc charge
+
+  b_ligne = BLOC (condition = "ComponentType == 'Line'",
+        
+
+#====
+# Type de distribution
+#====
+  
+  Type = SIMP (statut= "o", typ = "TXM",
+               into = ("Line Availability",),
+               fr = "La disponibilite de la ligne sera tiree",
+               ang= "Line availability will be set by the law",
+               defaut = "Line Availability",
+               ),
+
+  Line   = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"),
+
+  Law = SIMP ( statut = "o", typ = "TXM",
+                into = ( #"Exponential",
+                         #"Histogram",
+                         #"Normal",
+                         #"Rayleigh",
+                         #"PDF_from_file",
+                         #"TruncatedNormal",
+                         #"TimeSeries_from_file",
+                         #"Uniform",
+                         "UserDefined",
+                         #"Weibull",
+                         ),
+                defaut = "UserDefined",
+                fr = "Choix du type de la loi marginale",
+                ang = "1D marginal distribution",
+                ),
+
+                      
+#====
+# Definition des parametres selon le type de la loi
+#====
+
+
+  EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
+
+                         Lambda = SIMP ( statut = "o",
+                                         typ = "R",
+                                         max = 1,
+                                         val_min = 0.,
+                                         fr = "Parametre Lambda | Lambda > 0",
+                                         ang = "Lambda parameter | Lambda > 0",
+                                         ),
+
+                         Gamma = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure du support de la loi",
+                                        ang = "Support lower bound",
+                                        ),
+
+  ), # Fin BLOC EXPONENTIAL
+
+
+  HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
+
+                       First = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du supoport de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : largeur de classe, hauteur de classe",
+                                       ang = "Class bandwidth, class height couple list",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       ),
+
+  ), # Fin BLOC HISTOGRAM
+
+
+   NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
+
+                    Mu = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Moyenne de la loi",
+                                ang = "Mean value",
+                                ),
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  val_min = 0.,
+                                  fr = "Ecart type de la loi",
+                                  ang = "Standard deviation",
+                                  ),
+
+   ), # Fin BLOC NORMAL
+
+
+  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
+
+                   Sigma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Parametre Sigma de la loi | Sigma > 0",
+                                  ang = "Sigma parameter | Sigma > 0",
+                                  ),
+
+                   Gamma = SIMP ( statut = "o",
+                                  typ = "R",
+                                  max = 1,
+                                  fr = "Borne inferieure du support de la loi",
+                                  ang = "Support lower bound",
+                                  ),
+ ), # Fin BLOC RAYLEIGH
+
+  PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Nom du modele physique",
+                    ang = "Physical model identifier",
+                    ),
+              ),
+              
+
+
+   TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
 
+                             MuN = SIMP ( statut = "o",
+                                          typ = "R",
+                                          max = 1,
+                                          fr = "Moyenne de la loi Normale non tronquée",
+                                          ang = "Mean value of the associated non truncated normal distribution",
+                                          ),
 
+                             SigmaN = SIMP ( statut = "o",
+                                             typ = "R",
+                                             max = 1,
+                                             val_min = 0.,
+                                             fr = "Ecart-type de la loi Normale non tronquée",
+                                             ang = "Standard deviation of the associated non truncated normal distribution",
+                                             ),
 
-#================================
-# Importation des fichiers csv N-1
-#================================
+                             A = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne inferieure de la loi | A < B",
+                                        ang = "Lower bound | A < B",
+                                        ),
 
-N_1_LINES = PROC( nom="N_1_LINES",
-                     op = None,
-                     docu = "",
-                     fr = "N-1 lignes",
-                     ang = "N-1 lines",
+                             B = SIMP ( statut = "o",
+                                        typ = "R",
+                                        max = 1,
+                                        fr = "Borne superieure de la loi | A < B",
+                                        ang = "Upper bound | A < B",
+                                        ),
 
-  FileName = SIMP ( statut = "o",
-                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
-                    fr = "chemin du fichier csv des probabilites des defauts lignes",
-                    ang = "csv file path with probabilities of line outages",
-                    ),
-              )
+   ), # Fin BLOC TRUNCATEDNORMAL
 
-N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS",
-                     op = None,
-                     docu = "",
-                     fr = "N-1 transformateurs",
-                     ang = "N-1 transformers",
 
+  TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
+             
   FileName = SIMP ( statut = "o",
                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
-                    fr = "chemin du fichier csv des probabilites des defauts transformateur",
-                    ang = "csv file path with probabilities of transformer outages",
+                    fr = "Fichier CSV d'une serie temporelle",
+                    ang = "CSV file of a time series",
                     ),
-              )
-N_1_GENERATORS = PROC( nom="N_1_GENERATORS",
-                     op = None,
-                     docu = "",
-                     fr = "N-1 generateurs",
-                     ang = "N-1 generators",
+              ),
 
-  FileName = SIMP ( statut = "o",
-                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
-                    fr = "chemin du fichier csv des probabilites des defauts generateurs",
-                    ang = "csv file path with probabilities of generator outages",
-                    ),
-              )
-N_1_LOADS = PROC( nom="N_1_LOADS",
-                     op = None,
-                     docu = "",
-                     fr = "N-1 charges",
-                     ang = "N-1 loads",
 
-  FileName = SIMP ( statut = "o",
-                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
-                    fr = "chemin du fichier csv des probabilites des defauts charges",
-                    ang = "csv file path with probabilities of load outages",
-                    ),
-              )
+   UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
 
-#================================
-LINE_LIST = PROC (nom='LINE_LIST',
-                op = None,
-                docu = "",
-                fr = "PN",
-                ang = "PN",
+                     A = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne inferieure du support de la loi | A < B",
+                                ang = "Support lower bound | A < B",
+                                ),
+
+                     B = SIMP ( statut = "o",
+                                typ = "R",
+                                max = 1,
+                                fr = "Borne superieure du support de la loi | A < B",
+                                ang = "Support upper bound | A < B",
+                                ),
+
+   ), # Fin BLOC UNIFORM
 
+
+   USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
+
+                       # Il faut definir une collection de couples ( x,p ) 
                        Values = SIMP ( statut = 'o',
                                        typ = Tuple(2),
                                        max = '**', 
-                                       fr = "Liste de couples : largeur de classe, hauteur de classe",
-                                       ang = "Class bandwidth, class height couple list",
-                                       validators=VerifTypeTuple((sd_ligne,'R')),
+                                       fr = "Liste de couples : (valeur, probabilite)",
+                                       ang = "List of pairs : (value, probability)",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       defaut=((0,0.0),(1,1.0)),
                                        ),
-)
-#================================
-# Definition des LOIS
-#================================
 
-# Nota : les variables de type OPER doivent etre en majuscules !
-# Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type)
-DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
-                      sd_prod = loi,
-                      op = 68,
-                      fr = "Definitions des lois marginales utilisees par les variables d'entree", 
+  ), # Fin BLOC USERDEFINED
 
-#====
-# Choisir generateur ou charge
-#====
 
-##  TypeMachine = SIMP ( statut='o', typ='TXM',
-##                      into = ('charge','vent1','vent2','pv','N-1',),
-##                      ),
-  Activated = SIMP ( statut='o', typ=bool, defaut=True),
-  ComponentType = SIMP (statut='o', typ='TXM',
-                      into = ('Generator','Load','Line','Transformer'),),
-  b_gener = BLOC (condition = "ComponentType == 'Generator'",
-        Generator   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon"),),
-  b_charge = BLOC (condition = "ComponentType == 'Load'",
-        Load       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon"),),
-  b_ligne = BLOC (condition = "ComponentType == 'Line'",
-        Line   = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"),),
+   WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
+
+                     Settings = SIMP ( statut = "o",
+                                          typ = "TXM",
+                                          max = 1,
+                                          into = ( "AlphaBeta", "MuSigma" ),
+                                          defaut = "AlphaBeta",
+                                          fr = "Parametrage de la loi weibull",
+                                          ang = "Weibull distribution parameter set",
+                                          ),
+
+                     AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
+
+                                         Alpha = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Parametre Alpha de la loi | Alpha > 0",
+                                                        ang = "Alpha parameter | Alpha > 0",
+                                                        ),
+
+                                         Beta = SIMP ( statut = "o",
+                                                       typ = "R",
+                                                       max = 1,
+                                                       val_min = 0.,
+                                                       fr = "Parametre Beta de la loi | Beta > 0",
+                                                       ang = "Beta parameter | Beta > 0",
+                                                       ),
+
+                                         ), # Fin BLOC AlphaBeta_Parameters
+
+
+                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
+
+                                         Mu = SIMP ( statut = "o",
+                                                     typ = "R",
+                                                     max = 1,
+                                                     fr = "Moyenne de la loi",
+                                                     ang = "Mean value",
+                                                     ),
+
+                                         Sigma = SIMP ( statut = "o",
+                                                        typ = "R",
+                                                        max = 1,
+                                                        val_min = 0.,
+                                                        fr = "Ecart type de la loi",
+                                                        ang = "Standard deviation",
+                                                        ),
+
+                                         ), # Fin BLOC MuSigma_Parameters
+
+                     Gamma = SIMP ( statut = "o",
+                                    typ = "R",
+                                    max = 1,
+                                    fr = "Borne inferieure du support de la loi",
+                                    ang = "Support lower bound",
+                                    ),
+
+    ), # Fin BLOC WEIBULL
+
+  ), #fin du bloc ligne
+                  
   b_transfo = BLOC (condition = "ComponentType == 'Transformer'",
-        Transformer       = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"),),
-##  b_gener = BLOC (condition = "TypeComposant == 'Generateur'",
-##        Generateur   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon"),),
-##  b_charge = BLOC (condition = "TypeComposant == 'Charge'",
-##        charge       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon"),),  
-                      
+        
+
 #====
 # Type de distribution
 #====
-
-  Kind = SIMP ( statut = "o", typ = "TXM",
-                into = ( "NonParametrique", 
-                         #"Beta",
-                         "Exponential",
+  
+  Type = SIMP (statut= "o", typ = "TXM",
+               into = ("Transformer Availability",),
+               fr = "La disponibilite du transformateur sera tiree",
+               ang= "Transformer availability will be set by the law",
+               defaut = "Transformer Availability"
+               ),
+
+  Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"),
+
+  Law = SIMP ( statut = "o", typ = "TXM",
+                into = ( #"Beta", 
+                         #"Exponential",
                          #"Gamma",
                          #"Geometric",
                          #"Gumbel",
-                         "Histogram",
+                         #"Histogram",
                          #"Laplace",
                          #"Logistic",
                          #"LogNormal",
                          #"MultiNomial",
                          #"NonCentralStudent",
-                         "Normal",
+                         #"Normal",
                          #"Poisson",
                          #"Rayleigh",
                          #"Student",
-                         "PDF_from_file",
+                         #"PDF_from_file",
                          #"Triangular",
-                         "TruncatedNormal",
-                         "Uniform",
+                         #"TruncatedNormal",
+                         #"TimeSeries_from_file",
+                         #"Uniform",
                          "UserDefined",
-                         "Weibull",
+                         #"Weibull",
                          ),
+                defaut="UserDefined",
                 fr = "Choix du type de la loi marginale",
                 ang = "1D marginal distribution",
                 ),
@@ -333,16 +1269,16 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 # Definition des parametres selon le type de la loi
 #====
 
-  NONPARAM = BLOC ( condition = " Kind in ( 'NonParametrique', ) ",
-             
-  FileName = SIMP ( statut = "o",
-                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
-                    fr = "Nom du modele physique",
-                    ang = "Physical model identifier",
-                    ),
-              ),
+##  NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ",
+##             
+##  FileName = SIMP ( statut = "o",
+##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+##                    fr = "Nom du modele physique",
+##                    ang = "Physical model identifier",
+##                    ),
+##              ),
 
-#  BETA = BLOC ( condition = " Kind in ( 'Beta', ) ",
+#  BETA = BLOC ( condition = " Law in ( 'Beta', ) ",
 #
 #                  Settings = SIMP ( statut = "o",
 #                                       typ = "TXM",
@@ -414,7 +1350,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
 
 
-  EXPONENTIAL = BLOC ( condition = " Kind in ( 'Exponential', ) ",
+  EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
 
                          Lambda = SIMP ( statut = "o",
                                          typ = "R",
@@ -435,7 +1371,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
 
 
-#  GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ",
+#  GAMMA = BLOC ( condition = " Law in ( 'Gamma', ) ",
 #
 #                   Settings = SIMP ( statut = "o",
 #                                        typ = "TXM",
@@ -498,7 +1434,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
 
 #
-#  GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ",
+#  GEOMETRIC = BLOC ( condition = " Law in ( 'Geometric', ) ",
 #
 #                       P = SIMP ( statut = "o",
 #                                  typ = "R",
@@ -513,7 +1449,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 #
-#  GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ",
+#  GUMBEL = BLOC ( condition = " Law in ( 'Gumbel', ) ",
 #
 #                    Settings = SIMP ( statut = "o",
 #                                         typ = "TXM",
@@ -567,7 +1503,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
 
 
-  HISTOGRAM = BLOC ( condition = " Kind in ( 'Histogram', ) ",
+  HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
 
                        First = SIMP ( statut = "o",
                                     typ = "R",
@@ -585,12 +1521,11 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
                                        validators=VerifTypeTuple(('R','R')),
                                        ),
 
-
   ), # Fin BLOC HISTOGRAM
 
 
 
-#  LAPLACE = BLOC ( condition = " Kind in ( 'Laplace', ) ",
+#  LAPLACE = BLOC ( condition = " Law in ( 'Laplace', ) ",
 #
 #                   Lambda = SIMP ( statut = "o",
 #                                   typ = "R",
@@ -609,7 +1544,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #  ), # Fin BLOC LAPLACE
 #
-#  LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ",
+#  LOGNORMAL = BLOC ( condition = " Law in ( 'LogNormal', ) ",
 #
 #                     Settings = SIMP ( statut = "o",
 #                                       typ = "TXM",
@@ -688,7 +1623,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 #
-#   LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ",
+#   LOGISTIC = BLOC ( condition = " Law in ( 'Logistic', ) ",
 #
 #                       Alpha = SIMP ( statut = "o",
 #                                      typ = "R",
@@ -709,7 +1644,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 #
-#   MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ",
+#   MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ",
 #                         
 #                         N = SIMP ( statut = "o",
 #                                    typ = "I",
@@ -730,7 +1665,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #   ), # Fin BLOC MULTINOMIAL
 #
 #
-#  NONCENTRALSTUDENT = BLOC ( condition = " Kind in ( 'NonCentralStudent', ) ",
+#  NONCENTRALSTUDENT = BLOC ( condition = " Law in ( 'NonCentralStudent', ) ",
 #
 #                   Nu = SIMP ( statut = "o",
 #                               typ = "R",
@@ -756,7 +1691,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #  ), # Fin BLOC NONCENTRALSTUDENT
 
 
-   NORMAL = BLOC ( condition = " Kind in ( 'Normal', ) ",
+   NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
 
                     Mu = SIMP ( statut = "o",
                                 typ = "R",
@@ -777,7 +1712,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
 
 #
-#   POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ",
+#   POISSON = BLOC ( condition = " Law in ( 'Poisson', ) ",
 #
 #                     Lambda = SIMP ( statut = "o",
 #                                     typ = "R",
@@ -791,7 +1726,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 #
-#  RAYLEIGH = BLOC ( condition = " Kind in ( 'Rayleigh', ) ",
+#  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
 #
 #                   Sigma = SIMP ( statut = "o",
 #                                  typ = "R",
@@ -808,7 +1743,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #                                  ),
 # ), # Fin BLOC RAYLEIGH
 
-  PDF = BLOC ( condition = " Kind in ( 'PDF_from_file', ) ",
+  PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
              
   FileName = SIMP ( statut = "o",
                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
@@ -817,7 +1752,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
                     ),
               ),
               
-#   STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ",
+#   STUDENT = BLOC ( condition = " Law in ( 'Student', ) ",
 #
 #                     Mu = SIMP ( statut = "o",
 #                                 typ = "R",
@@ -845,7 +1780,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 #
-#   TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ",
+#   TRIANGULAR = BLOC ( condition = " Law in ( 'Triangular', ) ",
 #
 #                         A = SIMP ( statut = "o",
 #                                    typ = "R",
@@ -872,7 +1807,7 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 #
 #
 
-   TRUNCATEDNORMAL = BLOC ( condition = " Kind in ( 'TruncatedNormal', ) ",
+   TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
 
                              MuN = SIMP ( statut = "o",
                                           typ = "R",
@@ -906,8 +1841,17 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
    ), # Fin BLOC TRUNCATEDNORMAL
 
 
+  TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
+             
+  FileName = SIMP ( statut = "o",
+                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
+                    fr = "Fichier CSV d'une serie temporelle",
+                    ang = "CSV file of a time series",
+                    ),
+              ),
+
 
-   UNIFORM = BLOC ( condition = " Kind in ( 'Uniform', ) ",
+   UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
 
                      A = SIMP ( statut = "o",
                                 typ = "R",
@@ -926,20 +1870,22 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
    ), # Fin BLOC UNIFORM
 
 
+   USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
 
-   USERDEFINED = BLOC ( condition = " Kind in ( 'UserDefined', ) ",
-
-                           # Il faut definir une collection de couples ( x,p ) 
-                         Fichier = SIMP ( statut = 'o',
-                                         typ =( 'Fichier', 'CSV (*.csv);;All Files (*)',),
-                                      
-                                         ),
-
-   ), # Fin BLOC USERDEFINED
+                       # Il faut definir une collection de couples ( x,p ) 
+                       Values = SIMP ( statut = 'o',
+                                       typ = Tuple(2),
+                                       max = '**', 
+                                       fr = "Liste de couples : (valeur, probabilite)",
+                                       ang = "List of pairs : (value, probability)",
+                                       validators=VerifTypeTuple(('R','R')),
+                                       defaut=((0,0.0),(1,1.0)),
+                                       ),
 
+  ), # Fin BLOC USERDEFINED
 
 
-   WEIBULL = BLOC ( condition = " Kind in ( 'Weibull', ) ",
+   WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
 
                      Settings = SIMP ( statut = "o",
                                           typ = "TXM",
@@ -999,62 +1945,23 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
 
     ), # Fin BLOC WEIBULL
 
+
+
+  ), #fin du bloc transformer 
+                    
+
 ) 
 
+Classement_Commandes_Ds_Arbre=('DIRECTORY', 'DISTRIBUTION', 'CORRELATION',)
 
+Ordre_Des_Commandes = ( 'DIRECTORY', 'PSSE_PARAMETERS', 'SIMULATION', 'DISTRIBUTION', 'CORRELATION',
+                        'N_1_GENERATORS', 'N_1_LINES', 'N_1_TRANSFORMERS', 'N_1_LOADS',)
 
-#================================
-# Definition du modele physique
-#================================
 
 
 
-CORRELATION = PROC ( nom = 'CORRELATION',
-                     op = None,
-                     docu = "",
-                     fr = "Correlation entre variables",
-                     ang = "Variable correlation",
 
-####  Copula = SIMP ( statut = "o",
-####                  typ = 'TXM',
-####                  into = ( "Independent", "Normal" ),
-####                  defaut = "Independent",
-####                  fr = "Type de la copule",
-####                  ang = "Copula kind",
-####                  ),
-##
-## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
-##                  
-    CorrelationMatrix = SIMP ( statut = "o",
-                               typ = Matrice(nbLigs=None,
-                                             nbCols=None,
-                                             methodeCalculTaille='NbDeDistributions',
-                                             structure="symetrique"),
-                               fr = "Matrice de correlation entre les variables d'entree",
-                               ang = "Correlation matrix for input variables",
-                               ),
-##  #), # Fin BLOC Matrix
-##
-##
-) 
 
-DIRECTORY = MACRO ( nom = 'DIRECTORY',
-        op=None,
-        fr = "Chargement des generateurs et des charges",
-        ang = "Physical model wrapper load",
-                sd_prod = opsPSEN.INCLUDE,
-                op_init = opsPSEN.INCLUDE_context,
-                #sd_prod=None,
-                fichier_ini = 1,
-        
-        sav_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),),
-        results_folder=SIMP(statut="o",typ='Repertoire'),
-        #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
-        #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
-        #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),        
-        PSSE_path=SIMP(statut="o",typ='Repertoire'),
-) 
 
-Classement_Commandes_Ds_Arbre=('DIRECTORY','DISTRIBUTION','CORRELATION')
 
 
index 1d859343828102b7dde62a05e5065bedd9378536..1e641cfde05a3aa5eaa0e190a03037e5b02bccef 100755 (executable)
@@ -26,6 +26,7 @@ def INCLUDE(self,PSSE_path,sav_file,**args):
        Fonction sd_prod pour la macro INCLUDE
    """
    
+   if sav_file==None: return
    reevalue=0
    if hasattr(self,'fichier_ini'):
        reevalue=1
index 3bf7199d76a0aba92f001c9f78fe1e335f89936c..fb7c2ab6703138e98531dfb5f3c01ed28c680fda 100644 (file)
@@ -6,10 +6,16 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>539</width>
-    <height>35</height>
+    <width>482</width>
+    <height>34</height>
    </rect>
   </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
@@ -39,7 +45,7 @@
    <item>
     <widget class="LECustomTuple" name="lineEditVal_1">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
@@ -62,6 +68,9 @@ border:0px;
 
 </string>
      </property>
+     <property name="text">
+      <string/>
+     </property>
      <property name="readOnly">
       <bool>false</bool>
      </property>
@@ -77,7 +86,7 @@ border:0px;
    <item>
     <widget class="LECustomTuple" name="lineEditVal_2">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
@@ -115,9 +124,12 @@ border:0px;</string>
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Preferred</enum>
+     </property>
      <property name="sizeHint" stdset="0">
       <size>
-       <width>123</width>
+       <width>5</width>
        <height>20</height>
       </size>
      </property>
index 38d1e84f8104e3e034523fef5544a9f223651923..1b75a651bdd14f808c4f721e2dd55c0ada5e47a9 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>966</width>
-    <height>251</height>
+    <height>281</height>
    </rect>
   </property>
   <property name="sizePolicy">
    <property name="spacing">
     <number>0</number>
    </property>
-   <property name="leftMargin">
+   <property name="margin">
     <number>0</number>
    </property>
-   <property name="topMargin">
-    <number>1</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>5</number>
-   </property>
    <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <property name="spacing">
-      <number>0</number>
-     </property>
+    <layout class="QVBoxLayout" name="verticalLayout_5">
      <item>
-      <layout class="QHBoxLayout" name="horizontalLayout">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
        <property name="spacing">
         <number>0</number>
        </property>
-       <property name="sizeConstraint">
-        <enum>QLayout::SetFixedSize</enum>
-       </property>
        <item>
-        <spacer name="horizontalSpacer_3">
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <property name="spacing">
+          <number>0</number>
+         </property>
+         <property name="sizeConstraint">
+          <enum>QLayout::SetFixedSize</enum>
+         </property>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>21</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="MonBoutonValide" name="RBValide">
+           <property name="minimumSize">
+            <size>
+             <width>21</width>
+             <height>25</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>21</width>
+             <height>25</height>
+            </size>
+           </property>
+           <property name="focusPolicy">
+            <enum>Qt::ClickFocus</enum>
+           </property>
+           <property name="toolTip">
+            <string>Affiche le rapport de validation du mot-clef</string>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">border : 0px</string>
+           </property>
+           <property name="text">
+            <string>...</string>
+           </property>
+           <property name="icon">
+            <iconset>
+             <normaloff>../Editeur/icons/ast-green-ball.png</normaloff>../Editeur/icons/ast-green-ball.png</iconset>
+           </property>
+           <property name="iconSize">
+            <size>
+             <width>25</width>
+             <height>25</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
          <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
+          <enum>Qt::Vertical</enum>
          </property>
          <property name="sizeHint" stdset="0">
           <size>
-           <width>21</width>
-           <height>20</height>
+           <width>20</width>
+           <height>5</height>
           </size>
          </property>
         </spacer>
        </item>
-       <item>
-        <widget class="MonBoutonValide" name="RBValide">
-         <property name="minimumSize">
-          <size>
-           <width>21</width>
-           <height>25</height>
-          </size>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>21</width>
-           <height>25</height>
-          </size>
-         </property>
-         <property name="focusPolicy">
-          <enum>Qt::ClickFocus</enum>
-         </property>
-         <property name="toolTip">
-          <string>Affiche le rapport de validation du mot-clef</string>
-         </property>
-         <property name="styleSheet">
-          <string notr="true">border : 0px</string>
-         </property>
-         <property name="text">
-          <string>...</string>
-         </property>
-         <property name="icon">
-          <iconset>
-           <normaloff>../Editeur/icons/ast-green-ball.png</normaloff>../Editeur/icons/ast-green-ball.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>25</width>
-           <height>25</height>
-          </size>
-         </property>
-        </widget>
-       </item>
       </layout>
      </item>
-     <item>
-      <spacer name="verticalSpacer">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>5</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
     </layout>
    </item>
    <item>
     </widget>
    </item>
    <item>
-    <widget class="QFrame" name="frame">
-     <property name="frameShape">
-      <enum>QFrame::NoFrame</enum>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <item>
-       <widget class="QScrollArea" name="scrollArea">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">background : rgb(247,247,247)</string>
-        </property>
-        <property name="frameShape">
-         <enum>QFrame::NoFrame</enum>
-        </property>
-        <property name="lineWidth">
-         <number>1</number>
-        </property>
-        <property name="widgetResizable">
-         <bool>true</bool>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+    <layout class="QVBoxLayout" name="verticalLayout_4">
+     <item>
+      <widget class="QFrame" name="frame">
+       <property name="frameShape">
+        <enum>QFrame::NoFrame</enum>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QScrollArea" name="scrollArea">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="styleSheet">
+           <string notr="true">background : rgb(247,247,247)</string>
+          </property>
+          <property name="frameShape">
+           <enum>QFrame::NoFrame</enum>
+          </property>
+          <property name="lineWidth">
+           <number>1</number>
+          </property>
+          <property name="widgetResizable">
+           <bool>true</bool>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+          </property>
+          <widget class="QWidget" name="verticalWidgetLE">
+           <property name="geometry">
+            <rect>
+             <x>0</x>
+             <y>0</y>
+             <width>535</width>
+             <height>220</height>
+            </rect>
+           </property>
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayoutLE">
+            <property name="spacing">
+             <number>0</number>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <item>
+             <spacer name="verticalSpacer_3">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>13</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </widget>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QFrame" name="frame">
+       <property name="frameShape">
+        <enum>QFrame::Box</enum>
+       </property>
+       <layout class="QHBoxLayout" name="horizontalLayout_6">
+        <property name="margin">
+         <number>0</number>
         </property>
-        <widget class="QWidget" name="verticalWidgetLE">
-         <property name="geometry">
-          <rect>
-           <x>0</x>
-           <y>0</y>
-           <width>539</width>
-           <height>227</height>
-          </rect>
-         </property>
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayoutLE">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_5">
           <property name="spacing">
            <number>0</number>
           </property>
-          <property name="margin">
-           <number>0</number>
+          <property name="sizeConstraint">
+           <enum>QLayout::SetFixedSize</enum>
           </property>
           <item>
-           <spacer name="verticalSpacer_3">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
+           <widget class="QToolButton" name="RBHaut">
+            <property name="minimumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
             </property>
-            <property name="sizeHint" stdset="0">
+            <property name="focusPolicy">
+             <enum>Qt::ClickFocus</enum>
+            </property>
+            <property name="toolTip">
+             <string>Remonte la ligne</string>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border : 0px</string>
+            </property>
+            <property name="text">
+             <string>...</string>
+            </property>
+            <property name="icon">
+             <iconset theme="go-up">
+              <normaloff/>
+             </iconset>
+            </property>
+            <property name="iconSize">
              <size>
-              <width>20</width>
-              <height>13</height>
+              <width>32</width>
+              <height>32</height>
              </size>
             </property>
-           </spacer>
+           </widget>
           </item>
           <item>
-           <widget class="QFrame" name="frame">
-            <property name="frameShape">
-             <enum>QFrame::Box</enum>
-            </property>
-            <layout class="QHBoxLayout" name="horizontalLayout_6">
-             <property name="margin">
-              <number>0</number>
-             </property>
-             <item>
-              <layout class="QHBoxLayout" name="horizontalLayout_5">
-               <property name="spacing">
-                <number>0</number>
-               </property>
-               <property name="sizeConstraint">
-                <enum>QLayout::SetFixedSize</enum>
-               </property>
-               <item>
-                <widget class="QToolButton" name="RBHaut">
-                 <property name="minimumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="maximumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="focusPolicy">
-                  <enum>Qt::ClickFocus</enum>
-                 </property>
-                 <property name="toolTip">
-                  <string>Remonte la ligne</string>
-                 </property>
-                 <property name="styleSheet">
-                  <string notr="true">border : 0px</string>
-                 </property>
-                 <property name="text">
-                  <string>...</string>
-                 </property>
-                 <property name="icon">
-                  <iconset theme="go-up">
-                   <normaloff/>
-                  </iconset>
-                 </property>
-                 <property name="iconSize">
-                  <size>
-                   <width>32</width>
-                   <height>32</height>
-                  </size>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <widget class="QToolButton" name="RBBas">
-                 <property name="minimumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="maximumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="focusPolicy">
-                  <enum>Qt::ClickFocus</enum>
-                 </property>
-                 <property name="toolTip">
-                  <string>Descend la ligne</string>
-                 </property>
-                 <property name="styleSheet">
-                  <string notr="true">border : 0px</string>
-                 </property>
-                 <property name="text">
-                  <string>...</string>
-                 </property>
-                 <property name="icon">
-                  <iconset theme="go-down">
-                   <normaloff/>
-                  </iconset>
-                 </property>
-                 <property name="iconSize">
-                  <size>
-                   <width>32</width>
-                   <height>32</height>
-                  </size>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <widget class="QToolButton" name="RBMoins">
-                 <property name="minimumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="maximumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="focusPolicy">
-                  <enum>Qt::ClickFocus</enum>
-                 </property>
-                 <property name="toolTip">
-                  <string>supprime une ligne</string>
-                 </property>
-                 <property name="styleSheet">
-                  <string notr="true">border : 0px</string>
-                 </property>
-                 <property name="text">
-                  <string>...</string>
-                 </property>
-                 <property name="icon">
-                  <iconset>
-                   <normalon>../Editeur/icons/MoinsBleu2.png</normalon>
-                  </iconset>
-                 </property>
-                 <property name="iconSize">
-                  <size>
-                   <width>32</width>
-                   <height>32</height>
-                  </size>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <widget class="QToolButton" name="RBPlus">
-                 <property name="minimumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="maximumSize">
-                  <size>
-                   <width>21</width>
-                   <height>31</height>
-                  </size>
-                 </property>
-                 <property name="focusPolicy">
-                  <enum>Qt::ClickFocus</enum>
-                 </property>
-                 <property name="toolTip">
-                  <string>Ajoute une ligne</string>
-                 </property>
-                 <property name="styleSheet">
-                  <string notr="true">border : 0px</string>
-                 </property>
-                 <property name="text">
-                  <string>...</string>
-                 </property>
-                 <property name="icon">
-                  <iconset>
-                   <normaloff>../Editeur/icons/PlusBleu.png</normaloff>../Editeur/icons/PlusBleu.png</iconset>
-                 </property>
-                 <property name="iconSize">
-                  <size>
-                   <width>32</width>
-                   <height>32</height>
-                  </size>
-                 </property>
-                </widget>
-               </item>
-              </layout>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_6">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeType">
-                <enum>QSizePolicy::Minimum</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>40</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QToolButton" name="RBVoisListe">
-               <property name="minimumSize">
-                <size>
-                 <width>21</width>
-                 <height>31</height>
-                </size>
-               </property>
-               <property name="maximumSize">
-                <size>
-                 <width>21</width>
-                 <height>31</height>
-                </size>
-               </property>
-               <property name="focusPolicy">
-                <enum>Qt::ClickFocus</enum>
-               </property>
-               <property name="toolTip">
-                <string>Montre l'ensemble des valeurs</string>
-               </property>
-               <property name="styleSheet">
-                <string notr="true">border : 0px</string>
-               </property>
-               <property name="text">
-                <string>...</string>
-               </property>
-               <property name="icon">
-                <iconset>
-                 <normaloff>../Editeur/icons/verre-loupe-icone-6087-64.png</normaloff>../Editeur/icons/verre-loupe-icone-6087-64.png</iconset>
-               </property>
-               <property name="iconSize">
-                <size>
-                 <width>32</width>
-                 <height>32</height>
-                </size>
-               </property>
-              </widget>
-             </item>
-            </layout>
+           <widget class="QToolButton" name="RBBas">
+            <property name="minimumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="focusPolicy">
+             <enum>Qt::ClickFocus</enum>
+            </property>
+            <property name="toolTip">
+             <string>Descend la ligne</string>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border : 0px</string>
+            </property>
+            <property name="text">
+             <string>...</string>
+            </property>
+            <property name="icon">
+             <iconset theme="go-down">
+              <normaloff/>
+             </iconset>
+            </property>
+            <property name="iconSize">
+             <size>
+              <width>32</width>
+              <height>32</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QToolButton" name="RBMoins">
+            <property name="minimumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="focusPolicy">
+             <enum>Qt::ClickFocus</enum>
+            </property>
+            <property name="toolTip">
+             <string>supprime une ligne</string>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border : 0px</string>
+            </property>
+            <property name="text">
+             <string>...</string>
+            </property>
+            <property name="icon">
+             <iconset>
+              <normalon>../Editeur/icons/MoinsBleu2.png</normalon>
+             </iconset>
+            </property>
+            <property name="iconSize">
+             <size>
+              <width>32</width>
+              <height>32</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QToolButton" name="RBPlus">
+            <property name="minimumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>21</width>
+              <height>31</height>
+             </size>
+            </property>
+            <property name="focusPolicy">
+             <enum>Qt::ClickFocus</enum>
+            </property>
+            <property name="toolTip">
+             <string>Ajoute une ligne</string>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">border : 0px</string>
+            </property>
+            <property name="text">
+             <string>...</string>
+            </property>
+            <property name="icon">
+             <iconset>
+              <normaloff>../Editeur/icons/PlusBleu.png</normaloff>../Editeur/icons/PlusBleu.png</iconset>
+            </property>
+            <property name="iconSize">
+             <size>
+              <width>32</width>
+              <height>32</height>
+             </size>
+            </property>
            </widget>
           </item>
          </layout>
-        </widget>
-       </widget>
-      </item>
-     </layout>
-    </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_6">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Minimum</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QToolButton" name="RBVoisListe">
+          <property name="minimumSize">
+           <size>
+            <width>21</width>
+            <height>31</height>
+           </size>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>21</width>
+            <height>31</height>
+           </size>
+          </property>
+          <property name="focusPolicy">
+           <enum>Qt::ClickFocus</enum>
+          </property>
+          <property name="toolTip">
+           <string>Montre l'ensemble des valeurs</string>
+          </property>
+          <property name="styleSheet">
+           <string notr="true">border : 0px</string>
+          </property>
+          <property name="text">
+           <string>...</string>
+          </property>
+          <property name="icon">
+           <iconset>
+            <normaloff>../Editeur/icons/verre-loupe-icone-6087-64.png</normaloff>../Editeur/icons/verre-loupe-icone-6087-64.png</iconset>
+          </property>
+          <property name="iconSize">
+           <size>
+            <width>32</width>
+            <height>32</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
    </item>
    <item>
     <layout class="QVBoxLayout" name="verticalLayout">
index 154a8634a8a5327e56295078a522b8a18fae2ab2..d158fa53d08373696b4a0aee4f4a4c92b8cac5a0 100755 (executable)
@@ -56,10 +56,16 @@ class PSENGenerator(DicoImbriqueGenerator):
    def gener(self,obj,format='brut',config=None):
 
       print "je passe dans gener"
-      #self.MachineDico = obj.MachineDico
-      #self.LoadDico = obj.LoadDico
-      #self.LineDico = obj.LineDico
-      #self.TransfoDico = obj.TransfoDico
+      try :
+         self.MachineDico = obj.MachineDico
+         self.LoadDico = obj.LoadDico
+         self.LineDico = obj.LineDico
+         self.TransfoDico = obj.TransfoDico
+      except :
+         self.MachineDico = None
+         self.LoadDico = None
+         self.LineDico = None
+         self.TransfoDico = None
       
       self.initDico()
       # Cette instruction genere le contenu du fichier de commandes (persistance)
@@ -73,11 +79,11 @@ class PSENGenerator(DicoImbriqueGenerator):
    
    def initDico(self) :
       DicoImbriqueGenerator.initDico(self)
-      #self.Entete = 'MachineDico = ' + str(self.MachineDico) +'\n'
-      #self.Entete += 'LoadDico = ' + str(self.LoadDico) +'\n'
-      #self.Entete += 'LineDico = ' + str(self.LineDico) +'\n'
-      #self.Entete += 'TransfoDico = ' + str(self.TransfoDico) +'\n'
-      #self.Entete +='\n'
+      self.Entete = 'MachineDico = ' + str(self.MachineDico) +'\n'
+      self.Entete += 'LoadDico = ' + str(self.LoadDico) +'\n'
+      self.Entete += 'LineDico = ' + str(self.LineDico) +'\n'
+      self.Entete += 'TransfoDico = ' + str(self.TransfoDico) +'\n'
+      self.Entete +='\n'
 
 
 #----------------------------------------------------------------------------------------
@@ -85,8 +91,10 @@ class PSENGenerator(DicoImbriqueGenerator):
 #----------------------------------------------------------------------------------------
 
    def writeDefault(self,fn) :
-        DicoImbriqueGenerator.writeDefault(self,fn)
-        return
+       fileDico = "PSEN/PSENconfig.py" 
+       f = open( str(fileDico), 'wb')
+       f.write( self.Entete + "Dico =" + str(self.Dico) )
+       f.close()
 
    
 
index fda9c0a6d8112d7a0ff62f384a5dfd6bf24a6640..a9d937eb7ee15369550461d83666ce5ffb9d61d3 100644 (file)
@@ -73,7 +73,6 @@ class DicoImbriqueGenerator(PythonGenerator):
 #----------------------------------------------------------------------------------------
 
    def writeDefault(self,fn) :
-       print "je passe par writeDefault"
        fileDico = fn[:fn.rfind(".")] + '.py'
        f = open( str(fileDico), 'wb')
        f.write( self.Entete + "Dico =" + str(self.Dico) )
@@ -94,7 +93,21 @@ class DicoImbriqueGenerator(PythonGenerator):
         if not(self.Dico.has_key(nom)) : dicoCourant={}
         else : dicoCourant=self.Dico [nom]
         if hasattr(obj.valeur,'nom'):dicoCourant[liste[-1]]=obj.valeur.nom
-        else : dicoCourant[liste[-1]]=obj.valeurFormatee
+        else : 
+           if type(obj.valeur)  in (types.ListType,types.TupleType):
+              try :
+#PNPNPN a remplacer par plus propre
+                 if obj.definition.validators.typeDesTuples[0] !='R' :
+                    val=[]
+                    elt=[]
+                    for tupleElt in obj.valeur :
+                        elt=(str(tupleElt[0]),tupleElt[1])
+                        val.append(elt)
+                    dicoCourant[liste[-1]]=val
+                 else :dicoCourant[liste[-1]]=obj.valeur
+              except :
+                 dicoCourant[liste[-1]]=obj.valeurFormatee
+           else :dicoCourant[liste[-1]]=obj.valeurFormatee
         self.Dico[nom]=dicoCourant
 
         return s