From d58ab8e3a458ae7a121d555c8f4daa235a590aa2 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Tue, 21 Jul 2015 10:30:38 +0200 Subject: [PATCH] modif PSEN --- InterfaceQT4/composimp.py | 8 +- InterfaceQT4/feuille.py | 16 +- InterfaceQT4/monWidgetHeure.py | 22 +- InterfaceQT4/monWidgetPlusieursInto.py | 25 +- InterfaceQT4/monWidgetSimpBase.py | 4 +- Noyau/N_VALIDATOR.py | 3 +- PSEN_Eficas/ExtractGeneratorandLoadList.py | 69 ++ PSEN_Eficas/PSEN_Cata.py | 1118 +++++++++++--------- PSEN_Eficas/opsPSEN.py | 111 ++ PSEN_Eficas/prefs_PSEN.py | 2 +- UiQT4/desBaseWidget.ui | 3 + UiQT4/desChoixCommandes.ui | 38 +- UiQT4/desWidgetDate.ui | 4 +- UiQT4/desWidgetHeure.ui | 4 +- UiQT4/eficas_en.qm | Bin 78089 -> 78339 bytes UiQT4/eficas_fr.ts | 631 +++++++++-- generator/generator_PSEN.py | 67 +- generator/generator_dicoImbrique.py | 18 +- 18 files changed, 1438 insertions(+), 705 deletions(-) create mode 100755 PSEN_Eficas/ExtractGeneratorandLoadList.py create mode 100755 PSEN_Eficas/opsPSEN.py mode change 100644 => 100755 generator/generator_PSEN.py diff --git a/InterfaceQT4/composimp.py b/InterfaceQT4/composimp.py index decf7062..802a188d 100644 --- a/InterfaceQT4/composimp.py +++ b/InterfaceQT4/composimp.py @@ -142,6 +142,7 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodeMinimal): # Gestion d'une seule valeur (eventuellement un tuple ou un complexe) if maDefinition.max == 1 : + # A verifier if maDefinition.into != [] and maDefinition.into != None: if len(maDefinition.into) < 4 : from monWidgetRadioButton import MonWidgetRadioButton @@ -218,7 +219,12 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodeMinimal): # Gestion des listes else : - if maDefinition.into != [] and maDefinition.into != None: + #if maDefinition.into != [] and maDefinition.into != None: + # Attention pas fini --> on attend une liste de ASSD avec ordre + if self.item.wait_assd() and self.item.is_list_SansOrdreNiDoublon(): + from monWidgetPlusieursInto import MonWidgetPlusieursInto + widget=MonWidgetPlusieursInto(self,maDefinition,monNom,monObjet,parentQt,maCommande) + elif self.item.has_into(): if self.item.is_list_SansOrdreNiDoublon(): from monWidgetPlusieursInto import MonWidgetPlusieursInto widget=MonWidgetPlusieursInto(self,maDefinition,monNom,monObjet,parentQt,maCommande) diff --git a/InterfaceQT4/feuille.py b/InterfaceQT4/feuille.py index 1b11cbf0..8eef0582 100644 --- a/InterfaceQT4/feuille.py +++ b/InterfaceQT4/feuille.py @@ -79,30 +79,16 @@ class Feuille(QWidget,ContientIcones,SaisieValeur,FacultatifOuOptionnel): # self.debutToolTip=nomTraduit+"\n" longueur=QFontMetrics(self.label.font()).width(nomTraduit) if longueur >= nomMax : - print "je formate" nouveauNom=self.formate(nomTraduit) - print"________" - print nouveauNom - print"________" - print self - #self.label.setTextFormat(Qt.AutoText) self.label.setText(nouveauNom) - #self.agrandit() else : self.label.setText(nomTraduit) def agrandit(self): # inutile pour certains widgets if self.height() < 40 : - print "j agrandis" self.setMinimumHeight(50) - #self.setMaximumHeight(50) self.resize(self.width(),200) - #self.principalLayout.setAlignment(Qt.AlignTop) - #self.label.resize(self.label.width(),200) - print self.label.height() - print self.height() - print "__________" def setValeurs(self): @@ -120,7 +106,7 @@ class Feuille(QWidget,ContientIcones,SaisieValeur,FacultatifOuOptionnel): def setCommentaire(self): c = self.debutToolTip - if self.node.item.definition.validators : c+=self.node.item.definition.validators.aide() + #if self.node.item.definition.validators : c+=self.node.item.definition.validators.aide() self.aide=c if self.objSimp.get_fr() != None and self.objSimp.get_fr() != "": c2 = '

'+c+str(self.objSimp.get_fr())+"

" diff --git a/InterfaceQT4/monWidgetHeure.py b/InterfaceQT4/monWidgetHeure.py index 35514035..b576b589 100644 --- a/InterfaceQT4/monWidgetHeure.py +++ b/InterfaceQT4/monWidgetHeure.py @@ -26,27 +26,11 @@ from PyQt4.QtCore import * from Extensions.i18n import tr from feuille import Feuille -from monWidgetSimpTuple import MonWidgetSimpTuple +from monWidgetSimpBase import MonWidgetSimpBase from desWidgetHeure import Ui_WidgetHeure -class MonWidgetHeure (Ui_WidgetHeure,MonWidgetSimpTuple): +class MonWidgetHeure (Ui_WidgetHeure,MonWidgetSimpBase): def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): - self.nbValeurs=3 - MonWidgetSimpTuple.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) - if self.objSimp.isImmuable() : - self.lineEditVal1.setDisabled(True) - self.lineEditVal2.setDisabled(True) - self.lineEditVal3.setDisabled(True) - self.lineEditVal1.setStyleSheet(QString.fromUtf8("background:rgb(244,244,244);\n" "border:0px;\n")) - self.lineEditVal2.setStyleSheet(QString.fromUtf8("background:rgb(244,244,244);\n" "border:0px;\n")) - self.lineEditVal3.setStyleSheet(QString.fromUtf8("background:rgb(244,244,244);\n" "border:0px;\n")) - self.lineEditVal1.setToolTip(tr("Valeur non modifiable")) - self.lineEditVal2.setToolTip(tr("Valeur non modifiable")) - self.lineEditVal3.setToolTip(tr("Valeur non modifiable")) - else : - self.maCommande.listeAffichageWidget.append(self.lineEditVal1) - #self.maCommande.listeAffichageWidget.append(self.lineEditVal2) - #self.maCommande.listeAffichageWidget.append(self.lineEditVal3) - + MonWidgetSimpBase.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) diff --git a/InterfaceQT4/monWidgetPlusieursInto.py b/InterfaceQT4/monWidgetPlusieursInto.py index 5f3a5097..d5bdabf7 100644 --- a/InterfaceQT4/monWidgetPlusieursInto.py +++ b/InterfaceQT4/monWidgetPlusieursInto.py @@ -34,18 +34,21 @@ from gereListe import GereListe class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille): def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): - #print "MonWidgetPlusieursInto", nom, self + print "MonWidgetPlusieursInto", nom, self self.index=1 Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) self.listeValeursCourantes=self.node.item.GetListeValeurs() self.parentQt.commandesLayout.insertWidget(-1,self) - self.maCommande.listeAffichageWidget.append(self.lineEditVal1) + # try except si la liste des possibles est vide + # prevoir qqchose + try : + self.maCommande.listeAffichageWidget.append(self.lineEditVal1) + except : + pass def setValeurs(self): self.listeValeursCourantes=self.node.item.GetListeValeurs() - #print "dans setValeurs" - #print self.node.item.definition.validators #print self.monSimpDef.into #if len(self.monSimpDef.into)*20 > 400 : self.setMinimumHeight(400) #else : self.setMinimumHeight(len(self.monSimpDef.into)*30) @@ -63,7 +66,14 @@ class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille): else: self.listeAAfficher=self.node.item.get_liste_possible([]) else : - self.listeAAfficher=self.monSimpDef.into + self.listeAAfficher=self.node.item.get_liste_possible([]) + + self.PourEtreCoche=self.listeValeursCourantes + if self.objSimp.wait_assd() : + self.listeAAfficher=self.node.item.get_sd_avant_du_bon_type() + self.PourEtreCoche=[] + for concept in self.listeValeursCourantes: + self.PourEtreCoche.append(concept.nom) if len(self.listeAAfficher)*20 > 400 : self.setMinimumHeight(400) else : self.setMinimumHeight(len(self.listeAAfficher)*30) self.adjustSize() @@ -75,7 +85,8 @@ class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille): nomCB="lineEditVal"+str(i+1) courant=getattr(self,nomCB) courant.setText(str(self.listeAAfficher[i])) - if self.monSimpDef.into[i] in self.listeValeursCourantes : + #if self.monSimpDef.into[i] in self.listeValeursCourantes : + if self.listeAAfficher[i] in self.PourEtreCoche : courant.setChecked(True) self.connect(courant,SIGNAL("toggled(bool)"),self.changeValeur) self.vScrollBar.triggerAction(QScrollBar.SliderToMinimum) @@ -144,7 +155,7 @@ class MonWidgetPlusieursInto (Ui_WidgetPlusieursInto,Feuille): def changeValeur(self): self.listeValeursCourantesAvant=self.listeValeursCourantes self.listeValeursCourantes = [] - print "changeValeur ____________" , self.monSimpDef.into, len(self.monSimpDef.into) + #print "changeValeur ____________" , self.monSimpDef.into, len(self.monSimpDef.into) for i in range (1,len(self.listeAAfficher)+1): nomLineEdit="lineEditVal"+str(i) courant=getattr(self,nomLineEdit) diff --git a/InterfaceQT4/monWidgetSimpBase.py b/InterfaceQT4/monWidgetSimpBase.py index 9788f9dc..caf27e01 100644 --- a/InterfaceQT4/monWidgetSimpBase.py +++ b/InterfaceQT4/monWidgetSimpBase.py @@ -79,7 +79,9 @@ class MonWidgetSimpBase (Ui_WidgetSimpBase,Feuille): 'Matrice' : tr(u'Une Matrice est attendue. '), 'Fichier' : tr(u'Un fichier est attendu. '), 'FichierNoAbs' : tr(u'Un fichier est attendu. '), - 'Repertoire' : tr(u'Un repertoire est attendu. ')} + 'Repertoire' : tr(u'Un repertoire est attendu. '), + 'Heure' : tr(u'Heure sous la forme HH:MM'), + 'Date' : tr(u'Date sous la forme JJ/MM/AA')} if mc.type[0] != types.ClassType: commentaire = d_aides.get(mc.type[0], tr("Type de base inconnu")) else : commentaire="" diff --git a/Noyau/N_VALIDATOR.py b/Noyau/N_VALIDATOR.py index 13b4ae3f..10b8506d 100644 --- a/Noyau/N_VALIDATOR.py +++ b/Noyau/N_VALIDATOR.py @@ -273,8 +273,7 @@ class IntoProtocol(PProtocol): if obj not in into: raise ValError( ufmt( - _(tr(u"La valeur : %s ne fait pas partie des choix possibles %s")), - repr(obj), into)) + _(tr(u"La valeur : %s ne fait pas partie des choix possibles %s")), repr(obj), into)) else: # on est dans le cas d'un ensemble continu de valeurs possibles # (intervalle) diff --git a/PSEN_Eficas/ExtractGeneratorandLoadList.py b/PSEN_Eficas/ExtractGeneratorandLoadList.py new file mode 100755 index 00000000..e30826d0 --- /dev/null +++ b/PSEN_Eficas/ExtractGeneratorandLoadList.py @@ -0,0 +1,69 @@ +NetworkFile = r"C:\Users\J15773\Documents\GTDosier\PSENdocs\Victoria\JAMAIQUE\2030Conv_HFP2.sav" + +PSSE_PATH = "C:/Program Files/PTI/PSSE33/PSSBIN" #emplacement de PSSE + +def ExtractGeneratorandLoadList(NetworkFile,PSSE_PATH): + + import os + import sys + + sys.path.append(PSSE_PATH) + os.environ['PATH'] += ';' + PSSE_PATH + ';' + + import psspy + import redirect + + ###initialization PSSE + psspy.psseinit(10000) + _i=psspy.getdefaultint() + _f=psspy.getdefaultreal() + _s=psspy.getdefaultchar() + redirect.psse2py() + + # Silent execution of PSSe + islct=6 # 6=no output; 1=standard + psspy.progress_output(islct) + + #open Network File + psspy.case(NetworkFile) + + #Extract Loads + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + + string = ['NUMBER'] + ierr,iarray = psspy.aloadint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.aloadchar(sid,flag,string) + + LoadList = [] # [Bus name, load ID, extended bus name, bus number] + for i in range(len(iarray[0])): + LoadList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) + + #Extract Generators + sid = -1 #all buses + flag = 1 #all in service loads/generators (4 all loads/generators) + + string = ['NUMBER'] + ierr,iarray = psspy.amachint(sid,flag,string) + + string = ['NAME','ID','EXNAME'] + ierr,carray = psspy.amachchar(sid,flag,string) + + MachineList = [] # [Bus name, machine ID, extended bus name, bus number] + for i in range(len(iarray[0])): + MachineList.append([carray[0][i].strip(),carray[1][i],carray[2][i],iarray[0][i]]) + + return MachineList, LoadList + +def ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH): + MachineList = [['GT 6', '1 ', 'GT 6 11.500', 10], ['GT 7', '1 ', 'GT 7 11.500', 11], ['GT10', '1 ', 'GT10 11.500', 12], ['GT 5', '1 ', 'GT 5 11.500', 13], ['NEWHUNT', '1 ', 'NEWHUNT 11.500', 15], ['BSTMB', '1 ', 'BSTMB 11.500', 23], ['HYD_MAG', '1 ', 'HYD_MAG 6.9000', 25], ['RF1', '1 ', 'RF1 13.800', 37], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['GT3', '1 ', 'GT3 11.500', 43], ['OH3', '1 ', 'OH3 13.800', 47], ['OH4', '1 ', 'OH4 13.800', 50], ['OH6', '1 ', 'OH6 13.800', 52], ['GT 11', '1 ', 'GT 11 11.500', 56], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GT8', '1 ', 'GT8 11.500', 58], ['HYDRR', '1 ', 'HYDRR 6.9000', 59], ['GT9', '1 ', 'GT9 11.500', 63], ['HYD_UWR', '1 ', 'HYD_UWR 6.9000', 64], ['HYD_RIOB', '1 ', 'HYD_RIOB 6.9000', 65], ['HRYD_LW', '1 ', 'HRYD_LW 6.9000', 68], ['GT13B', '1 ', 'GT13B 11.500', 76], ['GT12B', '1 ', 'GT12B 11.500', 77], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['OLDHARB1', '1 ', 'OLDHARB1 138.00', 114], ['WIGTON', '1 ', 'WIGTON 0.6900', 202], ['JEPWK1', '1 ', 'JEPWK1 11.500', 300], ['JEPWK1', '2 ', 'JEPWK1 11.500', 300], ['JEPWK1', '3 ', 'JEPWK1 11.500', 300], ['JEPWK2', '1 ', 'JEPWK2 11.500', 301], ['JEPWK2', '2 ', 'JEPWK2 11.500', 301], ['JEPWK2', '3 ', 'JEPWK2 11.500', 301], ['W_MUN1', '1 ', 'W_MUN1 69.000', 503], ['HYD_RHORN', '1 ', 'HYD_RHORN 69.000', 711]] + + LoadList= [['TREDEGAR', '1 ', 'TREDEGAR 69.000', 5], ['HOPE', '1 ', 'HOPE 69.000', 16], ['MILCHELT', '1 ', 'MILCHELT 69.000', 17], ['PARADISE', '1 ', 'PARADISE 69.000', 24], ['BLEDGE', '1 ', 'BLEDGE 69.000', 26], ['CANE RIV', '1 ', 'CANE RIV 69.000', 27], ['HIGHGATE', '1 ', 'HIGHGATE 69.000', 29], ['QUEENS D', '1 ', 'QUEENS D 69.000', 30], ['OCHO', '1 ', 'OCHO 69.000', 32], ['BOGUE_69', '1 ', 'BOGUE_69 69.000', 33], ['ROSE HAL', '1 ', 'ROSE HAL 69.000', 35], ['OH1', '1 ', 'OH1 13.800', 36], ['RF1', '1 ', 'RF1 13.800', 37], ['CEMENT C', '1 ', 'CEMENT C 69.000', 38], ['OBAY69', '1 ', 'OBAY69 69.000', 39], ['DUNCANS6', '1 ', 'DUNCANS6 69.000', 40], ['OH2', '1 ', 'OH2 13.800', 41], ['RF2', '1 ', 'RF2 13.800', 42], ['3MLS69', '1 ', '3MLS69 69.000', 45], ['WBLVD69', '1 ', 'WBLVD69 69.000', 46], ['OH3', '1 ', 'OH3 13.800', 47], ['PORT ANT', '1 ', 'PORT ANT 69.000', 48], ['OH4', '1 ', 'OH4 13.800', 50], ['B6_BUS13', '1 ', 'B6_BUS13 13.800', 57], ['GREENWOO', '1 ', 'GREENWOO 69.000', 60], ['LYSSONS', '1 ', 'LYSSONS 69.000', 61], ['PORUS', '1 ', 'PORUS 69.000', 62], ['R RIVER', '1 ', 'R RIVER 69.000', 66], ['MARTHA B', '1 ', 'MARTHA B 69.000', 67], ['WKH69', '1 ', 'WKH69 69.000', 69], ['PNASUS69', '1 ', 'PNASUS69 69.000', 70], ['ANNOTTO', '1 ', 'ANNOTTO 69.000', 71], ['UW RIVER', '1 ', 'UW RIVER 69.000', 74], ['KNDAL 69', '1 ', 'KNDAL 69 69.000', 75], ['MONYMUSK', '1 ', 'MONYMUSK 69.000', 78], ['OROCABES', '1 ', 'OROCABES 69.000', 79], ['MAGGOTTY', '1 ', 'MAGGOTTY 69.000', 80], ['UP PARK', '1 ', 'UP PARK 69.000', 82], ['TWICKENH', '1 ', 'TWICKENH 69.000', 85], ['MAY PEN', '1 ', 'MAY PEN 69.000', 88], ['PAJ', '1 ', 'PAJ 69.000', 89], ['GROAD_69', '1 ', 'GROAD_69 69.000', 90], ['CSPRING', '1 ', 'CSPRING 69.000', 91], ['S_ TREE6', '1 ', 'S_ TREE6 69.000', 92], ['NAGGOS H', '1 ', 'NAGGOS H 69.000', 94], ['GOODYEAR', '1 ', 'GOODYEAR 69.000', 99], ['HBAY_69', '1 ', 'HBAY_69 69.000', 101], ['RFORT69', '1 ', 'RFORT69 69.000', 102], ['RHODEN P', '1 ', 'RHODEN P 69.000', 105], ['DUHANEY6', '1 ', 'DUHANEY6 69.000', 107], ['CARDIFF', '1 ', 'CARDIFF 69.000', 109], ['JAB13.8', '1 ', 'JAB13.8 13.800', 112], ['JAM13.8', '1 ', 'JAM13.8 13.800', 113]] + return MachineList, LoadList + +if __name__ == "__main__": + MachineList,LoadList= ExtractGeneratorandLoadList2(NetworkFile,PSSE_PATH) + print MachineList, LoadList diff --git a/PSEN_Eficas/PSEN_Cata.py b/PSEN_Eficas/PSEN_Cata.py index 1d8328d8..cfa08502 100755 --- a/PSEN_Eficas/PSEN_Cata.py +++ b/PSEN_Eficas/PSEN_Cata.py @@ -24,9 +24,13 @@ #from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR from Accas import * +import opsPSEN class loi ( ASSD ) : pass class variable ( ASSD ) : pass +class sd_charge ( ASSD ) : pass +class sd_generateur ( ASSD ) : pass +class sd_busbar ( sd_generateur,sd_charge ) : pass import types class Tuple: @@ -70,15 +74,17 @@ class Matrice: #CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'OPENTURNS_STUDY', +JdC = JDC_CATA ( code = 'PSEN', execmodul = None, -## regles = ( AU_MOINS_UN ( 'CRITERIA' ), -## AU_MOINS_UN ( 'MODEL' ), -## AVANT ( ('DISTRIBUTION', 'MODEL'), 'VARIABLE' ), -# A_CLASSER ( 'VARIABLE', 'CORRELATION' ), -# A_CLASSER ( 'VARIABLE', 'CRITERIA' ), -# A_CLASSER ( 'CORRELATION', 'CRITERIA' ), - #), + regles = ( AU_MOINS_UN ( 'PARAMETRES_PSSE' ), + AU_MOINS_UN ( 'DIRECTORY' ), + AU_MOINS_UN ( 'DISTRIBUTION' ), + AU_MOINS_UN ( 'SIMULATION' ), + AU_PLUS_UN ( 'PARAMETRES_PSSE' ), + AU_PLUS_UN ( 'DIRECTORY' ), + AU_PLUS_UN ( 'SIMULATION' ), + AU_PLUS_UN ( 'CORRELATION' ), + ), ) # Fin JDC_CATA @@ -86,16 +92,77 @@ JdC = JDC_CATA ( code = 'OPENTURNS_STUDY', # fin entete # -------------------------------------------------- +MONGENER = OPER ( nom = "MONGENER", + sd_prod = sd_generateur, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Generateur", + ang = "Generator", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), +) +MACHARGE = OPER ( nom = "MACHARGE", + sd_prod = sd_charge, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Charge", + ang = "Load", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), +) +MONBUSBAR = OPER ( nom = "MONBUSBAR", + sd_prod = sd_busbar, + UIinfo = {"groupes": ("CACHE")}, + op = None, + fr = "Generateur", + ang = "Generator", + + ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",), +) + + + +PARAMETRES_PSSE = PROC ( nom = "PARAMETRES_PSSE", + op=None, + docu = "", + COUT_COMBUSTIBLE = SIMP ( statut = "o", + typ=bool, + defaut=True, + ), + COUT_DELESTAGE = SIMP ( statut = "o", + typ=bool, + defaut=False, + ), + COUT_MVAR = SIMP ( statut = "o", + typ=bool, + defaut=False, + ), + IMAP = SIMP ( statut = "o", + typ='TXM', + into=['RateA','RateB','RateC'], + defaut=False, + ), + +) SIMULATION = PROC ( nom = "SIMULATION", op = None, docu = "", + regles =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'),), - SAMPLE = SIMP ( statut = "o", - typ = "R", - val_min=0, - + SIZE_PACKAGE = SIMP ( statut = "o", + typ = "I", + val_min=10, + defaut=100, ), - + NUMBER_PACKAGE = SIMP ( statut = "f", + typ = "I", + val_min=1, + ), + CONVERGENCE = SIMP ( statut = "f", + typ="I", + into=[1], + ), + STUDY = SIMP ( statut = "o", typ = "TXM", into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ), @@ -106,55 +173,6 @@ SIMULATION = PROC ( nom = "SIMULATION", ) -OPF_Parameters = PROC ( nom = "OPF_Parameters", - op = None, - docu = "", - - Minimize_fuel_cost = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix cout fuel" - ), - Minimize_adj_bus_shunt = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix minimize bus shunts" - ), - Minimize_adj_bus_loads = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix minimize bus loads" - ), - -) - -PSSe_Irate = PROC ( nom = "PSSe_Irate", - op = None, - docu = "", - - Rate_A = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix rate A" - ), - Rate_B = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix rate B" - ), - Rate_C = SIMP ( statut = "o", - typ = "TXM", - into=('True','False'), - defaut='False', - fr="Choix rate C" - ), - -) #================================ @@ -167,33 +185,46 @@ 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',), + ), + TypeComposant = SIMP (statut='o', typ='TXM', + into = ('Generateur','Charge'),), + b_gener = BLOC (condition = "TypeComposant == 'Generateur'", + #Generateur = SIMP(statut='o',typ=sd_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"),), + charge = SIMP(statut='o',typ=sd_charge),), #==== # Type de distribution #==== - Type_Model = SIMP ( statut='o', typ='TXM', - into = ('type_1','type_2','type_3','type_4', - ), - ), Kind = SIMP ( statut = "o", typ = "TXM", - into = ( "Beta", + into = ( "NonParametrique", + #"Beta", "Exponential", - "Gamma", - "Geometric", - "Gumbel", + #"Gamma", + #"Geometric", + #"Gumbel", "Histogram", - "Laplace", - "Logistic", - "LogNormal", - "MultiNomial", - "NonCentralStudent", + #"Laplace", + #"Logistic", + #"LogNormal", + #"MultiNomial", + #"NonCentralStudent", "Normal", - "Poisson", - "Rayleigh", - "Student", - "Triangular", + #"Poisson", + #"Rayleigh", + #"Student", + "PDF_from_file", + #"Triangular", "TruncatedNormal", "Uniform", "UserDefined", @@ -203,79 +234,89 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION", ang = "1D marginal distribution", ), + #==== # Definition des parametres selon le type de la loi #==== - BETA = BLOC ( condition = " Kind in ( 'Beta', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "RT", "MuSigma" ), - defaut = "RT", - fr = "Parametrage de la loi beta", - ang = "Beta distribution parameter set", - ), - - RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", - - R = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre R de la loi | R > 0", - ang = "R parameter | R > 0", - ), - - # T > R - T = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre T de la loi | T > R", - ang = "T parameter | T > R", - ), - - ), # Fin BLOC RT_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 - - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - # B > A - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi", - ang = "Support upper bound", - ), + 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", + ), + ), - ), # Fin BLOC BETA +# BETA = BLOC ( condition = " Kind in ( 'Beta', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "RT", "MuSigma" ), +# defaut = "RT", +# fr = "Parametrage de la loi beta", +# ang = "Beta distribution parameter set", +# ), +# +# RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", +# +# R = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre R de la loi | R > 0", +# ang = "R parameter | R > 0", +# ), +# +# # T > R +# T = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre T de la loi | T > R", +# ang = "T parameter | T > R", +# ), +# +# ), # Fin BLOC RT_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 +# +# +# A = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi", +# ang = "Support lower bound", +# ), +# +# # B > A +# B = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne superieure du support de la loi", +# ang = "Support upper bound", +# ), +# +# ), # Fin BLOC BETA @@ -300,135 +341,135 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "KLambda", "MuSigma" ), - defaut = "KLambda", - fr = "Parametrage de la loi gamma", - ang = "Gamma distribution parameter set", - ), - - KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", - - K = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre K de la loi | K > 0", - ang = "K parameter | K > 0", - ), - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda de la loi | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - ), # Fin BLOC KLambda_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 supoport de la loi", - ang = "Support lower bound", - ), - - - ), # Fin BLOC GAMMA - - - - GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ", - - P = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - val_max = 1., - fr = "Parametre P | 0 < P < 1", - ang = "P parameter | 0 < P < 1", - ), - - ), # Fin BLOC GEOMETRIC - - - - GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "AlphaBeta", "MuSigma" ), - defaut = "AlphaBeta", - fr = "Parametrage de la loi gumbel", - ang = "Gumbel 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, - fr = "Parametre Beta de la loi", - ang = "Beta parameter", - ), - - ), # 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", - ), +# GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "KLambda", "MuSigma" ), +# defaut = "KLambda", +# fr = "Parametrage de la loi gamma", +# ang = "Gamma distribution parameter set", +# ), +# +# KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", +# +# K = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre K de la loi | K > 0", +# ang = "K parameter | K > 0", +# ), +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda de la loi | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# ), # Fin BLOC KLambda_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 supoport de la loi", +# ang = "Support lower bound", +# ), +# +# +# ), # Fin BLOC GAMMA - ), # Fin BLOC MuSigma_Parameters - ), # Fin BLOC GUMBEL +# +# GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ", +# +# P = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# val_max = 1., +# fr = "Parametre P | 0 < P < 1", +# ang = "P parameter | 0 < P < 1", +# ), +# +# ), # Fin BLOC GEOMETRIC +# +# +# +# GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "AlphaBeta", "MuSigma" ), +# defaut = "AlphaBeta", +# fr = "Parametrage de la loi gumbel", +# ang = "Gumbel 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, +# fr = "Parametre Beta de la loi", +# ang = "Beta parameter", +# ), +# +# ), # 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 +# +# ), # Fin BLOC GUMBEL @@ -454,170 +495,170 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - LAPLACE = BLOC ( condition = " Kind in ( 'Laplace', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - ), # Fin BLOC LAPLACE - - LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ", - - Settings = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), - defaut = "MuSigmaLog", - fr = "Parametrage de la loi lognormale", - ang = "Lognormal distribution parameter set", - ), - - 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 - - MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne de la loi", - ang = "Mean value", - ), - - SigmaOverMu = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Rapport ecart type / moyenne de la loi", - ang = "Standard deviation / mean value ratio", - ), - - ), # Fin BLOC MuSigmaOverMu_Parameters - - MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", - - MuLog = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Moyenne du log", - ang = "Log mean value", - ), - - SigmaLog = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Ecart type du log", - ang = "Log standard deviation", - ), - - ), # Fin BLOC MuSigmaLog_Parameters - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi", - ang = "Support lower bound", - ), - - ), # Fin BLOC LOGNORMAL - - - - LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ", - - Alpha = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du supoport de la loi", - ang = "Support lower bound", - ), - - 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 LOGISTIC - - - - MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ", - - N = SIMP ( statut = "o", - typ = "I", - max = 1, - fr = "Parametre N de la loi | N > 0", - ang = "N parameter | N > 0", - ), - - # Il faut definir une collection de couples ( x,p ) - Values = SIMP ( statut = 'o', - typ = "R", - max = '**', - fr = "Liste de probabilités", - ang = "Probability list", - validators=VerifTypeTuple(('R','R')), - ), - - ), # Fin BLOC MULTINOMIAL - - - NONCENTRALSTUDENT = BLOC ( condition = " Kind in ( 'NonCentralStudent', ) ", - - Nu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Nu de la loi | Nu > 0", - ang = "Nu parameter | Nu > 0", - ), - - Delta = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Delta de la loi | Delta > 0", - ang = "Delta parameter | Delta > 0", - ), - - Gamma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Gamma de centrage de la loi", - ang = "Gamma parameter", - ), - - ), # Fin BLOC NONCENTRALSTUDENT +# LAPLACE = BLOC ( condition = " Kind in ( 'Laplace', ) ", +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# ), # Fin BLOC LAPLACE +# +# LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ", +# +# Settings = SIMP ( statut = "o", +# typ = "TXM", +# max = 1, +# into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), +# defaut = "MuSigmaLog", +# fr = "Parametrage de la loi lognormale", +# ang = "Lognormal distribution parameter set", +# ), +# +# 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 +# +# MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne de la loi", +# ang = "Mean value", +# ), +# +# SigmaOverMu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Rapport ecart type / moyenne de la loi", +# ang = "Standard deviation / mean value ratio", +# ), +# +# ), # Fin BLOC MuSigmaOverMu_Parameters +# +# MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", +# +# MuLog = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Moyenne du log", +# ang = "Log mean value", +# ), +# +# SigmaLog = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Ecart type du log", +# ang = "Log standard deviation", +# ), +# +# ), # Fin BLOC MuSigmaLog_Parameters +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi", +# ang = "Support lower bound", +# ), +# +# ), # Fin BLOC LOGNORMAL +# +# +# +# LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ", +# +# Alpha = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du supoport de la loi", +# ang = "Support lower bound", +# ), +# +# 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 LOGISTIC +# +# +# +# MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ", +# +# N = SIMP ( statut = "o", +# typ = "I", +# max = 1, +# fr = "Parametre N de la loi | N > 0", +# ang = "N parameter | N > 0", +# ), +# +# # Il faut definir une collection de couples ( x,p ) +# Values = SIMP ( statut = 'o', +# typ = "R", +# max = '**', +# fr = "Liste de probabilités", +# ang = "Probability list", +# validators=VerifTypeTuple(('R','R')), +# ), +# +# ), # Fin BLOC MULTINOMIAL +# +# +# NONCENTRALSTUDENT = BLOC ( condition = " Kind in ( 'NonCentralStudent', ) ", +# +# Nu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Nu de la loi | Nu > 0", +# ang = "Nu parameter | Nu > 0", +# ), +# +# Delta = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Delta de la loi | Delta > 0", +# ang = "Delta parameter | Delta > 0", +# ), +# +# Gamma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Gamma de centrage de la loi", +# ang = "Gamma parameter", +# ), +# +# ), # Fin BLOC NONCENTRALSTUDENT NORMAL = BLOC ( condition = " Kind in ( 'Normal', ) ", @@ -640,93 +681,101 @@ DISTRIBUTION = OPER ( nom = "DISTRIBUTION", ), # Fin BLOC NORMAL - - POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ", - - Lambda = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 0., - fr = "Parametre Lambda de la loi | Lambda > 0", - ang = "Lambda parameter | Lambda > 0", - ), - - ), # Fin BLOC POISSON - - - - RAYLEIGH = BLOC ( condition = " Kind 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 - - - STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ", - - Mu = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Mu de la loi", - ang = "Mu parameter", - ), - - Nu = SIMP ( statut = "o", - typ = "R", - max = 1, - val_min = 2., - fr = "Parametre Nu de la loi | Nu > 2", - ang = "Nu parameter | Nu > 2", - ), - - Sigma = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Parametre Sigma de la loi", - ang = "Sigma parameter", - ), - - ), # Fin BLOC STUDENT - - - - TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ", - - A = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne inferieure du support de la loi | A < M < B", - ang = "Support lower bound | A < M < B", - ), - - M = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Mode de la loi | A < M < B", - ang = "Mode | A < M < B", - ), - - B = SIMP ( statut = "o", - typ = "R", - max = 1, - fr = "Borne superieure du support de la loi | A < M < B", - ang = "Support upper bound | A < M < B", - ), - - ), # Fin BLOC TRIANGULAR - - +# +# POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ", +# +# Lambda = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 0., +# fr = "Parametre Lambda de la loi | Lambda > 0", +# ang = "Lambda parameter | Lambda > 0", +# ), +# +# ), # Fin BLOC POISSON +# +# +# +# RAYLEIGH = BLOC ( condition = " Kind 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 = " Kind in ( 'PDF_from_file', ) ", + + FileName = SIMP ( statut = "o", + typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',), + fr = "Nom du modele physique", + ang = "Physical model identifier", + ), + ), + +# STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ", +# +# Mu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Mu de la loi", +# ang = "Mu parameter", +# ), +# +# Nu = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# val_min = 2., +# fr = "Parametre Nu de la loi | Nu > 2", +# ang = "Nu parameter | Nu > 2", +# ), +# +# Sigma = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Parametre Sigma de la loi", +# ang = "Sigma parameter", +# ), +# +# ), # Fin BLOC STUDENT +# +# +# +# TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ", +# +# A = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne inferieure du support de la loi | A < M < B", +# ang = "Support lower bound | A < M < B", +# ), +# +# M = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Mode de la loi | A < M < B", +# ang = "Mode | A < M < B", +# ), +# +# B = SIMP ( statut = "o", +# typ = "R", +# max = 1, +# fr = "Borne superieure du support de la loi | A < M < B", +# ang = "Support upper bound | A < M < B", +# ), +# +# ), # Fin BLOC TRIANGULAR +# +# TRUNCATEDNORMAL = BLOC ( condition = " Kind in ( 'TruncatedNormal', ) ", @@ -894,7 +943,22 @@ CORRELATION = PROC ( nom = 'CORRELATION', ## ) - +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, + + fichier_sav=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),), + dossier_resultat=SIMP(statut="o",typ='Repertoire'), + fichier_lignes=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + fichier_groupes=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + fichier_parc=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),), + chemin_psse=SIMP(statut="o",typ='Repertoire'), +) diff --git a/PSEN_Eficas/opsPSEN.py b/PSEN_Eficas/opsPSEN.py new file mode 100755 index 00000000..894cb715 --- /dev/null +++ b/PSEN_Eficas/opsPSEN.py @@ -0,0 +1,111 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2013 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import re +#from ExtractGeneratorandLoadList import ExtractGeneratorandLoadList +from ExtractGeneratorandLoadList import ExtractGeneratorandLoadList2 + +def INCLUDE(self,chemin_psse,fichier_sav,**args): + """ + Fonction sd_prod pour la macro INCLUDE + """ + + print "INCLUDE", self + reevalue=0 + if hasattr(self,'fichier_ini'): + reevalue=1 + if self.fichier_ini == fichier_sav : return + if hasattr(self,'old_context_fichier_init' ): + for concept in self.old_context_fichier_init.values(): + self.jdc.delete_concept(concept) + self.jdc_aux=None + self.contexte_fichier_init={} + self.reevalue_sd_jdc() + self.jdc.reset_context() + + self.fichier_ini=fichier_sav + self.contexte_fichier_init = {} + self.fichier_unite = 999 + self.fichier_err = None + self.fichier_text="" + + unite = 999 + + pattern_debut_ligne = re.compile(r'^[0-9].*') + try: + MachineListOrigin,LoadListOrigin= ExtractGeneratorandLoadList2(fichier_sav,chemin_psse) + except : + if self.jdc.appli is not None: + self.jdc.appli.affiche_alerte("Error", 'An error happened in ExtractGeneratorandLoadList execution ') + self.g_context = {} + self.etapes = [] + self.jdc_aux = None + self.fichier_err = str(exc) + self.contexte_fichier_init = {} + + MachineList=[] + LoadList=[] + BusBarList=[] + for m in MachineListOrigin: + if m in LoadListOrigin : BusBarList.append(m) + else : MachineList.append(m) + + for m in LoadListOrigin: + if m not in MachineListOrigin : LoadList.append(m) + + for m in MachineList: + nouv=m[0].replace(' ','_') + nouveau=nouv.replace('.','_') + nom = nouveau+"__"+str(m[1]) + if pattern_debut_ligne.match(nom): nom='_'+nom + id = str(m[3]) + self.fichier_text += "%s=MONGENER(ID='%s',);\n" % (nom, id) + + for m in BusBarList: + nouv=m[0].replace(' ','_') + nouveau=nouv.replace('.','_') + nom = nouveau+"__"+str(m[1]) + if pattern_debut_ligne.match(nom): nom='_'+nom + id = str(m[3]) + self.fichier_text += "%s=MONBUSBAR(ID='%s',);\n" % (nom, id) + + for m in LoadList: + nouv=m[0].replace(' ','_') + nouveau=nouv.replace('.','_') + nom = nouveau+"__"+str(m[1]) + if pattern_debut_ligne.match(nom): nom='_'+nom + if pattern_debut_ligne.match(nom): print 'match' + id = str(m[3]) + self.fichier_text += "%s=MACHARGE(ID='%s',);\n" % (nom, id) + + import Extensions.jdc_include + self.JdC_aux = Extensions.jdc_include.JDC_CATA_INCLUDE(code='PSEN', execmodul=None) + self.make_contexte_include(None, self.fichier_text) + self.old_context_fichier_init = self.contexte_fichier_init + self.parent.record_unit(unite, self) + + +def INCLUDE_context(self,d): + """ + Fonction op_init pour macro INCLUDE + """ + for k,v in self.g_context.items(): + d[k]=v + diff --git a/PSEN_Eficas/prefs_PSEN.py b/PSEN_Eficas/prefs_PSEN.py index 7f553ed8..e4d94440 100755 --- a/PSEN_Eficas/prefs_PSEN.py +++ b/PSEN_Eficas/prefs_PSEN.py @@ -37,5 +37,5 @@ docPath=repIni # catalogues=( - ('PSEN','default',os.path.join(repIni,'PSEN_Cata.py'),'dico','python'), + ('PSEN','default',os.path.join(repIni,'PSEN_Cata.py'),'PSEN','python'), ) diff --git a/UiQT4/desBaseWidget.ui b/UiQT4/desBaseWidget.ui index b91de3c1..a44c7fa3 100644 --- a/UiQT4/desBaseWidget.ui +++ b/UiQT4/desBaseWidget.ui @@ -29,6 +29,9 @@ + + 3 + 0 diff --git a/UiQT4/desChoixCommandes.ui b/UiQT4/desChoixCommandes.ui index 1b733d10..85802d5e 100644 --- a/UiQT4/desChoixCommandes.ui +++ b/UiQT4/desChoixCommandes.ui @@ -29,6 +29,12 @@ background-color : rgb(248,247,246) + + 0 + + + 0 + @@ -196,8 +202,22 @@ + + + + Qt::Horizontal + + + + 71 + 18 + + + + horizontalSpacer + horizontalSpacer_2 @@ -220,7 +240,7 @@ 0 0 1170 - 512 + 530 @@ -231,22 +251,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 10 - 5 - - - - diff --git a/UiQT4/desWidgetDate.ui b/UiQT4/desWidgetDate.ui index 8d4184d9..873ab4f7 100644 --- a/UiQT4/desWidgetDate.ui +++ b/UiQT4/desWidgetDate.ui @@ -6,8 +6,8 @@ 0 0 - 936 - 60 + 736 + 62 diff --git a/UiQT4/desWidgetHeure.ui b/UiQT4/desWidgetHeure.ui index 7204b0b9..03d5dfba 100644 --- a/UiQT4/desWidgetHeure.ui +++ b/UiQT4/desWidgetHeure.ui @@ -6,8 +6,8 @@ 0 0 - 936 - 60 + 658 + 61 diff --git a/UiQT4/eficas_en.qm b/UiQT4/eficas_en.qm index 0664a22003ff018a9d24d8d3af0d22228de836f7..0cf59ce8585b8e8eb256934954d74d1c7336a9cd 100644 GIT binary patch delta 5177 zcmXY#c|c9+8^^!ro^$TG=iIH;B~v0-h9ti%BTSZYQ3+|8u3Zrc zF_w{L>=F%St0-9}jbtok&k*u^^3Fef&U?W7SS6GrV6MtuRJRW_q-Dx-bYe=LDG$p|U_1n`FnHmfs$$o_DCdJkBbi8j}LfHTeDW;SO6mwTY&apL-m z=146E$rp1=jK)cfHbWR~A2BwoMCJWcK-d;M zSVP&9vIY-!^dxh;;mHNcs%1VLzoF5JGUpuI09aXbU+?b%%>9EK)SeVeZ^w=EpaArp z$A#rO!;H53xS20W)79SGeB~G5@2!jv_A%BDXMA;lTeLD3h$`Y@H--YO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0i&d2)PynWXER!OGg|rRTqZxJiO)+n=<`PE z6o2U4hsRQ^9@lv`#GpG?@6(N|UP4Z{)J;8CMAJpA&c9Kh9PVbCX=PAd)tT%lgi@1D zKhdhI?y9v9S!bpx(aO#zt5q*wK#6!Kma%@QUiF-e@^8Fe^6NpRXt!QpLTmGFdh>tG zfNfU#ZdWLuvV!%!yG2qBw$k@bq^@<{P2YdjPT=RCOEn(R(6qHi zzdNiC^_L;~({J1WX|w+PTjF_7eRi#hBB@n>izx;ej(uNqe;!ZROI8{{!24 BJR<-A diff --git a/UiQT4/eficas_fr.ts b/UiQT4/eficas_fr.ts index f6200bf1..140c6012 100644 --- a/UiQT4/eficas_fr.ts +++ b/UiQT4/eficas_fr.ts @@ -1824,67 +1824,67 @@ Le fichier associe n'est pas defini - + %s n'est pas un fichier valide - + Nombre d'arguments de %s incorrect (min = %s, max = %s) - + La valeur : %s ne fait pas partie des choix possibles %s - + %s n'est pas de la bonne longueur - + valeur dans l'intervalle %s , %s - + La valeur doit etre comprise entre %s et %s - + %s doit etre inferieur a %s - + longueur de liste comprise entre %s et %s - + Le cardinal de la liste doit etre compris entre %s et %s - + %s devrait etre de longueur inferieure a %s - + %s devrait etre de longueur superieure a %s - + %s contient des valeurs non paires - + %s contient des valeurs hors des choix possibles: %s @@ -1929,208 +1929,350 @@ Le fichier associe n'est pas defini - + %s n'est pas une chaine de longueur comprise entre %s et %s - + TXM de longueur entre %s et %s - + valeur %s obligatoire - + %s ne contient pas les elements obligatoires : %s - + %s absent - + %s est un doublon - + longueur de la chaine entre %s et %s - + Longueur de la chaine incorrecte - + %s n'est pas une chaine - + liste %s - + La liste doit etre en ordre %s - + %s n'est pas par valeurs croissantes - + %s n'est pas par valeurs decroissantes - + %s n'est pas du bon type - + valeur %s pour la somme des cles A et B - + valeur de %s - + valeur d'instance de %s - + %s devrait etre de type %s - + %s n'est pas dans %s - + : verifie les types dans un tuple - + %s ne contient pas les elements devant etre presents ensemble: %s - + %s n'est pas autorise : %s - + %s devrait etre comprise entre %s et %s - - Objet commande commentarisé invalide + + Un concept de nom %s existe déjà ! - - La formule passee à l'interpreteur doit etre sous forme de tuple + + %s n'est pas un repertoire valide - - Début + + Type non encore gere %s - - Un concept de nom %s existe déjà ! + + %s (de type %s) n'est pas d'un type autorise: %s %s - - Pas de nom donné au paramètre + + La valeur : %s est en dehors du domaine de validite [ %s , %s ] - - Le paramètre %s ne peut valoir None + + %s present ensemble - - Format pas implémenté : %s + + unknown keywords : %s - - Impossible de réaliser la vérification de la formule + + Creation Parametre indisponible - - Creation Paramètre indisponible + + La cardinalite n'est pas correcte, la derniere valeur est ignoree - - les paramètres sont liés à un jeu de données + + n est pas un tuple de - - Fichier non encore nommé + + valeurs - - Les types entrés ne sont pas permis + + La Creation de parametre n est possible que dans un jeu de données - - %s n'est pas un repertoire valide + + Valeur incorrecte - - Type non encore gere %s + + n est pas un identifiant correct + - - %s (de type %s) n'est pas d'un type autorise: %s %s + + Entrer un float SVP - - La valeur : %s est en dehors du domaine de validite [ %s , %s ] + + Entrer un float inferieur a - - %s present ensemble + + Entrer un float superieur a - - unknown keywords : %s + + Mauvaise execution + + + + + impossible d executer la methode + + + + + Mauvaise Commande + + + + + Aucune variable connue + + + + + Mauvaise dimension de matrice + + + + + le nombre de ligne n est pas egal a + + + + + le nombre de colonne n est pas egal a + + + + + Mauvaise Valeur + + + + + l element + + + + + n est pas correct + + + + + Modification Impossible + + + + + le parametre n'est pas valide + + + + + n est pas un identifiant correct + + + + + Valeur incorrecte: + + + + + Valeur incorrecte + + + + + Valeur correcte + + + + + impossible d'evaluer : + + + + + Objet commande commentarisee invalide + + + + + La formule passee a l'interpreteur doit etre sous forme de tuple + + + + + Debut + + + + + Pas de nom donne au parametre + + + + + Le parametre %s ne peut valoir None + + + + + Format non implemente : %s + + + + + Impossible de realiser la verification de la formule + + + + + Un concept de nom %s existe deja ! + + + + + existe deja + + + + + + les parametres sont lies a un jeu de donnees + + + + + Fichier non encore nomme + + + + + Les types entres ne sont pas permis @@ -2776,6 +2918,34 @@ p, li { white-space: pre-wrap; } + + WidgetDate + + + Form + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + + + Détruit le mot-clef + + + WidgetFact @@ -2812,6 +2982,47 @@ p, li { white-space: pre-wrap; } + + WidgetHeure + + + Form + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + + + <html><head/><body><p><br/></p></body></html> + + + + + Détruit le mot-clef + + + + + WidgetInformative + + + Form + + + WidgetOptionnel @@ -2840,6 +3051,84 @@ p, li { white-space: pre-wrap; } + + WidgetParam + + + DCommandeUnique + + + + + ... + + + + + <html><head/><body><p><span style=" color:#000000;">Paramètre</span></p></body></html> + + + + + Détruit le commentaire + + + + + Affiche les commandes possibles + + + + + &Commandes + + + + + Shift+A, Alt+A, Alt+A, Alt+A + + + + + Affiche le formulaire de la commande précédente + + + + + << + + + + + Affiche le formulaire de la commande suivante + + + + + >> + + + + + <html><head/><body><p>Valeur: </p></body></html> + + + + + <html><head/><body><p>Nom: </p></body></html> + + + + + Verifie la valeur + + + + + <html><head/><body><p><br/></p></body></html> + + + WidgetPlusieursBase @@ -2936,6 +3225,64 @@ p, li { white-space: pre-wrap; } + + WidgetPlusieursIntoOrdonne + + + Form + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + + + TextLabel + + + + + Remonte d'une ligne + + + + + Descend d'une ligne + + + + + Détruit une ligne + + + + + ajoute une ligne + + + + + visualise l'ensemble des valeurs + + + + + Détruit le mot-clef + + + WidgetRadioButton @@ -2969,6 +3316,44 @@ p, li { white-space: pre-wrap; } + + WidgetSDCOInto + + + Form + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + + + <html><head/><body><p>Structures de données du type requis </p><p><br/></p></body></html> + + + + + <html><head/><body><p>ou Nom du concept</p></body></html> + + + + + Détruit le mot-clef + + + WidgetSimpBase @@ -3230,6 +3615,62 @@ p, li { white-space: pre-wrap; } + + WidgetUniqueSDCO + + + Form + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + + + Attend un objet de type CO + + + + + Détruit le mot-clef + + + + + WidgetVide + + + Form + + + + + ... + + + + + <html><head/><body><p><span style=" color:#0055ff;">Label</span></p></body></html> + + + + + Attend un objet de type XXXX. Il faut le créer + + + baseWidget @@ -3274,6 +3715,52 @@ p, li { white-space: pre-wrap; } + + desWidgetCreeParam + + + Gestion des Paramètres + + + + + <html><head/><body><p>Nom: </p></body></html> + + + + + <html><head/><body><p>Valeur: </p></body></html> + + + + + <html><head/><body><p><span style=" text-decoration: underline;">Créer un paramètre</span></p></body></html> + + + + + desWidgetMatrice + + + Dialog + + + + + Affiche le rapport de validation du mot-clef + + + + + ... + + + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + self.appliEficas diff --git a/generator/generator_PSEN.py b/generator/generator_PSEN.py old mode 100644 new mode 100755 index c9df95a4..154a8634 --- a/generator/generator_PSEN.py +++ b/generator/generator_PSEN.py @@ -25,7 +25,9 @@ texte_debut+=' format="med";\n' import traceback import types,string,re,os from Extensions.i18n import tr -from generator_python import PythonGenerator +from generator_dicoImbrique import DicoImbriqueGenerator +import pdb +from numpy import zeros def entryPoint(): """ @@ -40,7 +42,7 @@ def entryPoint(): } -class PSENGenerator(PythonGenerator): +class PSENGenerator(DicoImbriqueGenerator): """ Ce generateur parcourt un objet de type JDC et produit un texte au format eficas et @@ -53,10 +55,15 @@ class PSENGenerator(PythonGenerator): #---------------------------------------------------------------------------------------- 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 + self.initDico() - # Cette instruction genere le contenu du fichier de commandes (persistance) - self.text=PythonGenerator.gener(self,obj,format) + self.text=DicoImbriqueGenerator.gener(self,obj,format) return self.text @@ -65,7 +72,12 @@ class PSENGenerator(PythonGenerator): #---------------------------------------------------------------------------------------- def initDico(self) : - self.textePourRun = texte_debut + 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' #---------------------------------------------------------------------------------------- @@ -73,40 +85,29 @@ class PSENGenerator(PythonGenerator): #---------------------------------------------------------------------------------------- def writeDefault(self,fn) : - print self.textePourRun - - def ajoutRun(self) : - self.textePourRun+=" write_mesh_crack();\n" - self.textePourRun+=" do_mesh_crack(0);\n" - self.textePourRun+=" nice_cut(20.);\n" - self.textePourRun+=' export_mesh("'+self.cracked_name+'","med");\n' - self.textePourRun+="}" + DicoImbriqueGenerator.writeDefault(self,fn) + return + #---------------------------------------------------------------------------------------- # analyse de chaque noeud de l'arbre #---------------------------------------------------------------------------------------- - def generMCSIMP(self,obj) : - """recuperation de l objet MCSIMP""" - #print dir(obj) - s=PythonGenerator.generMCSIMP(self,obj) - if obj.nom in ListeConcatene : - stringListe="" - for val in obj.val: - stringListe+=str(val)+" " - self.textePourRun+=" "+obj.nom+ "='"+ stringListe[0:-1]+ "';\n" - return s - if obj.nom=="elset_radius" : - self.textePourRun+=" if_must_define_elset=1;\n" - if obj.nom=="sane_name" : - self.textePourRun+=" import_mesh('"+obj.val+"');\n" - if obj.nom=="cracked_name" : self.cracked_name=obj.val - if obj.nom=="repertoire" : - print "PNPNPN a traiter" - return s - self.textePourRun+=" "+obj.nom+ "=" + s[0:-1]+ ";\n" - return s +## def generMCSIMP(self,obj) : +## """recuperation de l objet MCSIMP""" +## #print dir(obj) +## self.dicoMCSIMP[obj.nom]=obj.val +## self.dicoTemp[obj.nom]=obj.val +## s=DicoImbriqueGenerator.generMCSIMP(self,obj) +## return s +## +## def generETAPE(self,obj): +## self.dicoTemp={} +## s=DicoImbriqueGenerator.generETAPE(self,obj) +## if obj.nom=="DISTRIBUTION" : self.dicoLois[obj.sd.nom]=self.dicoTemp +## self.dicoTemp={} +## return s # si repertoire on change tous les noms de fichier diff --git a/generator/generator_dicoImbrique.py b/generator/generator_dicoImbrique.py index 010eb18d..fda9c0a6 100644 --- a/generator/generator_dicoImbrique.py +++ b/generator/generator_dicoImbrique.py @@ -65,6 +65,7 @@ class DicoImbriqueGenerator(PythonGenerator): def initDico(self) : self.Dico={} + self.Entete = '' #---------------------------------------------------------------------------------------- @@ -75,7 +76,7 @@ class DicoImbriqueGenerator(PythonGenerator): print "je passe par writeDefault" fileDico = fn[:fn.rfind(".")] + '.py' f = open( str(fileDico), 'wb') - f.write( str(self.Dico) ) + f.write( self.Entete + "Dico =" + str(self.Dico) ) f.close() #---------------------------------------------------------------------------------------- @@ -84,13 +85,18 @@ class DicoImbriqueGenerator(PythonGenerator): def generMCSIMP(self,obj) : """recuperation de l objet MCSIMP""" + s=PythonGenerator.generMCSIMP(self,obj) liste=obj.get_genealogie() - dicoCourant=self.Dico - for i in liste [0:-1]: - if not(dicoCourant.has_key(i)) : dicoCourant[i]={} - dicoCourant=dicoCourant[i] - dicoCourant[liste[-1]]=obj.valeur + nom=obj.etape.nom + if hasattr(obj.etape,'sdnom') and obj.etape.sdnom != None and obj.etape.sdnom != "" : + nom = nom+ obj.etape.sdnom + 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 + self.Dico[nom]=dicoCourant + return s -- 2.39.2