troisD.envoievisu()
-
class MACROTreeItem(compooper.EtapeTreeItem):
# """ Cette classe hérite d'une grande partie des comportements
#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():
+ #if self.item.is_list_Chargement():
+ #from monWidgetPlusieursTuple2AvecChargement import MonWidgetPlusieursTuple2AvecChargement
+ #widget=MonWidgetPlusieursTuple2(self,maDefinition,monNom,monObjet,parentQt,maCommande)
+ # pass
+ #else :
from monWidgetPlusieursInto import MonWidgetPlusieursInto
widget=MonWidgetPlusieursInto(self,maDefinition,monNom,monObjet,parentQt,maCommande)
elif self.item.wait_assd() :
print "Prevenir la maintenance "
elif self.item.has_into():
if self.item.is_list_SansOrdreNiDoublon():
- print 6
- print self.editor.listeDesListesOuvertes
- print self.item in self.editor.listeDesListesOuvertes
- print self.editor.afficheListesPliees
+ #print (self.item in self.editor.listeDesListesOuvertes or not(self.editor.afficheListesPliees) )
+ #print ( not(self.editor.afficheListesPliees) )
+ #print (self.editor.afficheListesPliees)
+
if self.item in self.editor.listeDesListesOuvertes or not(self.editor.afficheListesPliees) :
from monWidgetPlusieursInto import MonWidgetPlusieursInto
widget=MonWidgetPlusieursInto(self,maDefinition,monNom,monObjet,parentQt,maCommande)
from monWidgetPlusieursPlie import MonWidgetPlusieursPlie
widget=MonWidgetPlusieursPlie(self,maDefinition,monNom,monObjet,parentQt,maCommande)
else :
- print 7
# tres vite pour le tag mais devra etre gere dans configuration
if self.item in self.editor.listeDesListesOuvertes or not(self.editor.afficheListesPliees) :
from monWidgetPlusieursIntoOrdonne import MonWidgetPlusieursIntoOrdonne
from monWidgetPlusieursPlie import MonWidgetPlusieursPlie
widget=MonWidgetPlusieursPlie(self,maDefinition,monNom,monObjet,parentQt,maCommande)
else :
- print 8
+ #print 8
if self.item in self.editor.listeDesListesOuvertes or not(self.editor.afficheListesPliees) :
from monWidgetPlusieursBase import MonWidgetPlusieursBase
widget=MonWidgetPlusieursBase(self,maDefinition,monNom,monObjet,parentQt,maCommande)
return is_a_list
def is_list_SansOrdreNiDoublon(self):
- if self.definition.homo=="SansOrdreNiDoublon": return 1
+ if self.definition.homo=="SansOrdreNiDoublon" : return 1
+ return 0
+
+ def is_list_Chargement(self):
+ if self.definition.docu != "" : return 1
return 0
def has_into(self):
# ces attributs sont mis a jour par definitCode appelee par newEditor
self.code = self.appliEficas.CONFIGURATION.code
- # tres vite a cause du tag. doit etre pase dans CONFIGURATION
#self.afficheListesPliees=False
self.afficheListesPliees=True
if self.code == "ASTER" or self.code == "monCode" : self.afficheListesPliees =True
+ if self.code == 'PSEN_N1' : self.afficheListesPliees = False
self.mode_nouv_commande=self.appliEficas.CONFIGURATION.mode_nouv_commande
self.affiche=self.appliEficas.CONFIGURATION.affiche
print out
print err
+ #-------------------# Pour execution avec output et error dans le bash
+ def runPSEN_N1(self):
+ #-------------------#
+ #cmd = os.path.abspath(os.path.join(os.path.abspath(__file__), '../','../','PSEN_N1','run.py'))
+ #cmd = "from run import runPSEN_N1; dico="+str(dico)
+
+ #textePython=("python "+ cmd + " "+ str(dico))
+ #print textePython
+ #self._viewTextExecute( textePython,"psen_run",".sh")
+ if generator.plugins.has_key('dicoImbrique'):
+ self.generator=generator.plugins['dicoImbrique']()
+ jdc_formate=self.generator.gener(self.jdc)
+ dico=self.generator.Dico
+ from variablesPSENN1 import PSEN_N1_Variables
+ mesVariables= PSEN_N1_Variables()
+ mesVariables.raz()
+ mesVariables.setValues(dico)
+ mesVariables.imprime()
+
+ from eficas_go import getJdcParameters
+ from run import runPSEN_N1
+ res,txt_exception=runPSEN_N1(dico)
+ if res : QMessageBox.information( self, tr("fin de script run"), txt_exception)
+ else : QMessageBox.critical( self, tr("Erreur fatale script run"), txt_exception)
+
+
+
#--------------------------------#
def _newJDC( self ,units = None):
#--------------------------------#
if self.code == "ZCRACKS" : texte=self._newZCRACKS()
if self.code == "TELEMAC" : texte=self._newTELEMAC()
if self.code == "PSEN" : texte = self._newPSEN()
+ if self.code == "PSEN_N1" : texte = self._newPSEN_N1()
# texte=self.newTexteCND
jdc=self.readercata.cata[0].JdC( procedure =texte,
#------------#
def run(self):
#------------#
+ print "kkkkkkkkkk"
fonction="run"+self.code
+ print fonction
if fonction in JDCEditor.__dict__.keys(): apply(JDCEditor.__dict__[fonction],(self,))
#------------#
etape.build_includeInclude(texte)
self.tree.racine.build_children()
+ #-------------------------------------#
+ def deleteMC(self,etape,MCFils):
+ #-------------------------------------#
+ monMC=etape.get_child(MCFils,restreint="oui")
+ if monMC != None : print etape.suppentite(monMC)
+
+
+ #-------------------------------------#
def ajoutMC(self,etape,MCFils,valeurs):
- print etape.nom
- #print etape,MCFils,valeurs
- print dir(etape)
- #print 'etape' , etape
- #print MCFils.valeur
- #print MCFils.val
- print etape.liste_mc_presents()
- monMC= etape.addentite('TransfosList')
- #print etape.append_child
- #monMC=etape.append_child('TransfosList','last')
- print etape.liste_mc_presents()
- # Attention ne pas faire de setValeurs
+ #-------------------------------------#
+ print "je passe dans ajoutMC"
+ monMC=etape.get_child(MCFils,restreint="oui")
+ if monMC== None : monMC= etape.addentite(MCFils)
monMC.valeur=valeurs
monMC.val=valeurs
- print monMC.val
- #print MCFils.valeur
- #print MCFils.val
- print etape.liste_mc_presents()
- print "________"
+ #-------------------------------------#
+ def changeIntoMC(self,etape,MCFils,valeurs):
+ #-------------------------------------#
+ print "je passe dans changeIntoMC"
+ monMC=etape.get_child(MCFils,restreint="oui")
+ if monMC== None : monMC= etape.addentite(MCFils)
+ monMC.definition.into=valeurs
+
+ #-------------------------------------#
+ def changeIntoMCandSet(self,etape,MCFils,into,valeurs):
+ #-------------------------------------#
+ monMC=etape.get_child(MCFils,restreint="oui")
+ if monMC== None : monMC= etape.addentite(MCFils)
+ monMC.definition.into=into
+ monMC.valeur=valeurs
+ monMC.val=valeurs
+ monMC.state='changed'
+ monMC.isvalid()
#-------------------------------------#
def ajoutVersionCataDsJDC(self,txt):
#texte=""
return texte
+ #---------------------------#
+ def _newPSEN_N1(self):
+ #---------------------------#
+ texte="CASE_SELECTION() ; CONTINGENCY_OPTIONS() ; OUTPUT_OPTIONS() ; "
+ #texte=""
+ return texte
+
#---------------------------#
#---------------------------#
#self.editor.affiche_infos(info)
def reaffiche(self):
- print "dans reaffiche de feuille", self.nom
+ #print "dans reaffiche de feuille", self.nom
if self.editor.jdc.aReafficher==True :
self.parentQt.reaffiche()
def setRun(self):
-
if hasattr(self.editor.appliEficas, 'mesScripts') :
if self.editor.code in self.editor.appliEficas.mesScripts.keys() :
self.dict_commandes_mesScripts=self.appliEficas.mesScripts[self.editor.code].dict_commandes
- if hasattr(self.editor,'tree') and self.editor.tree.currentItem() and self.editor.tree.currentItem().item and self.editor.tree.currentItem().item.get_nom() in self.dict_commandes_mesScripts.keys() :
+ if self.obj.nom in self.dict_commandes_mesScripts.keys() :
self.ajoutScript()
return
if hasattr(self,"RBRun"): self.RBRun.close()
def ajoutScript(self):
self.dictCommandes={}
- listeCommandes=self.dict_commandes_mesScripts[self.node.item.get_nom()]
+ listeCommandes=self.dict_commandes_mesScripts[self.obj.nom]
if type(listeCommandes) != types.TupleType: listeCommandes=(listeCommandes,)
i=0
for commande in listeCommandes :
self.LEFiltre.returnPressed.connect(self.LEFiltreReturnPressed)
def filtreListe(self):
- print self.alpha
l=[]
if self.filtre != "" :
for i in self.listeAAfficher :
self.parentQt.commandesLayout.insertWidget(-1,self)
self.maCommande.listeAffichageWidget.append(self.CBChoix)
- print self.objSimp.isoblig()
+ #print self.objSimp.isoblig()
def setValeursApresBouton(self):
if self.listeValeursCourantes== [] : self.node.item.set_valeur(None)
else : self.node.item.set_valeur(self.listeValeursCourantes)
+ # Exception pour PSEN
+ if self.editor.code == 'PSEN_N1' and self.nom==('Onglets') and self.listeValeursCourantes== []: self.node.item.set_valeur([])
self.setValide()
self.reaffiche()
self.ajoutHelpPSEN()
self.ajoutIcones()
+ def PSEN_N1(self):
+ self.ajoutExecution()
+
def TELEMAC(self):
self.enleverActionsStructures()
self.enleverNewInclude()
listeCommandes=self.dict_commandes_mesScripts[nomCmd]
commande=listeCommandes[numero]
conditionValid=commande[4]
- if (self.tree.currentItem().item.isvalid() == 0 and conditionValid == True):
+ if (nodeTraite.item.isvalid() == 0 and conditionValid == True):
QMessageBox.warning( None,
tr("item invalide"),
tr("l item doit etre valide"),)
if hasattr(nodeTraite,p):
listeparam.append(getattr(nodeTraite,p))
if p=="self" : listeparam.append(self)
+ print listeparam
+
try :
- #if 1 :
- fonction(listeparam,self.appliEficas)
+ res, commentaire= fonction(listeparam)
+ if not res :
+ QMessageBox.warning( None,
+ tr("echec de la fonction"),
+ tr(commentaire),)
+ return
except :
fonction(listeparam)
LoadDico={'C1':'C1','C2':'C2','C3':'C3','C4':'C4'}\r
LineDico={'L1':'L1','L2':'L2','L3':'L3','L4':'L4'}\r
TfoDico={'T1':'T1','T2':'T2','T3':'T3','T4':'T4'}\r
- return MachineDico, LoadDico, LineDico, TfoDico\r
+ MDico={'MZ1':'MZ1','MZ2':'MZ2','MZ3':'MZ3','MZ4':'MZ4'}\r
+ if NetworkFile == '/home/A96028/PSEN/PSEN_V8/Code/PSEN_Eficas/faux2.sav': \r
+ print "sans T1"\r
+ TfoDico={'T2':'T2','T3':'T3','T4':'T4'}\r
+\r
+\r
+ return MachineDico, LoadDico, LineDico, TfoDico, MDico\r
class sd_generateur ( ASSD ) : pass
class sd_ligne ( ASSD ) : pass
class sd_transfo ( ASSD ) : pass
+class sd_moteur (ASSD) : pass
#class sd_busbar ( sd_generateur,sd_charge ) : pass
import types
AU_PLUS_UN ( 'N_1_GENERATORS' ),
AU_PLUS_UN ( 'N_1_LINES' ),
AU_PLUS_UN ( 'N_1_LOADS' ),
+ AU_PLUS_UN ( 'N_1_MOTORS' ),
AU_PLUS_UN ( 'N_1_TRANSFORMERS' ),
-
+
),
) # Fin JDC_CATA
ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
)
+MONMOTEUR = OPER ( nom = "MONMOTEUR",
+ sd_prod = sd_moteur,
+ UIinfo = {"groupes": ("CACHE")},
+ op = None,
+ fr = "Moteur",
+ ang = "Motor",
+
+ ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
+)
MACHARGE = OPER ( nom = "MACHARGE",
sd_prod = sd_charge,
UIinfo = {"groupes": ("CACHE")},
PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS",
op=None,
docu = "",
+ ALGORITHM = SIMP ( statut = "o",
+ typ='TXM',
+ into=["Optimum Power Flow","Economic Dispatch and Power Flow"],
+ defaut="Optimum Power Flow",
+ ),
+ I_MAX = SIMP ( statut = "o",
+ typ='TXM',
+ into=['RateA','RateB','RateC'],
+ defaut='RateA',
+ ),
+ LOCK_TAPS = SIMP ( statut = "o",
+ typ=bool,
+ defaut=True,
+ ),
+
+ b_OPF = BLOC (condition = "ALGORITHM == 'Optimum Power Flow'",
FUEL_COST = SIMP ( statut = "o",
typ=bool,
defaut=True,
typ=bool,
defaut=False,
),
- I_MAX = SIMP ( statut = "o",
- typ='TXM',
- into=['RateA','RateB','RateC'],
- defaut='RateA',
- ),
- LOCK_TAPS = SIMP ( statut = "o",
- typ=bool,
- defaut=True,
- ),
+ ITERATION_LIMIT = SIMP ( statut = "o",
+ typ = "I",
+ val_min=1,
+ defaut=20,
+ ),
+ QGEN_CONTROL = SIMP ( statut = "o",
+ typ = bool,
+ defaut = True,
+ ),
+ b_QgenControl = BLOC (condition = "QGEN_CONTROL == True",
+ SAVE_CASE_BEFORE_QCONTROL = SIMP ( statut = "o",
+ typ = bool,
+ defaut = False,
+ fr = "Sauvegarder des fichiers de cas avant d'avoir deconnecte les groupes ne produisant pas de la puissance active",
+ ang = "Save network case files before having disconnected groups that dont generate active power.",
+ ),
+ ),
+ ),
+
+ b_ECD = BLOC (condition = "ALGORITHM == 'Economic Dispatch and Power Flow'",
+ ecd_file=SIMP(statut="o", typ = ('Fichier', 'Economic Dispatch Files (*.ecd);;All Files (*)',),),
+ ),
+
## P_MIN= SIMP ( statut = "o",
## typ=bool,
## defaut=True,
SIMULATION = PROC ( nom = "SIMULATION",
op = None,
docu = "",
- regles =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'),),
-
+ regles =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'), UN_PARMI('NUMBER_PACKAGE','CONVERGENCE'),),
+
SIZE_PACKAGE = SIMP ( statut = "o",
typ = "I",
val_min=10,
## max=5,
## fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
## ang = "Open TURNS library debug level print",
-## ),
-)
+## ),
+)
#================================
#### ),
##
## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
-##
+##
CorrelationMatrix = SIMP ( statut = "o",
typ = Matrice(nbLigs=None,
nbCols=None,
## #), # Fin BLOC Matrix
##
##
-)
+)
DIRECTORY = MACRO ( nom = 'DIRECTORY',
op=None,
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 (*)',),),
-
-)
+ #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
+
+)
ang = "Probability that the generator is not available",
validators=VerifTypeTuple((sd_generateur,'R')),),
)
+N_1_MOTORS = PROC( nom="N_1_MOTORS",
+ op = None,
+ docu = "",
+ fr = "N-1 moteurs",
+ ang = "N-1 motors",
+ 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 moteur",
+ ang = "Probability that the motor is not available",
+ validators=VerifTypeTuple((sd_moteur,'R')),),
+ )
N_1_LOADS = PROC( nom="N_1_LOADS",
op = None,
docu = "",
DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
sd_prod = loi,
op = 68,
- fr = "Definitions des lois marginales utilisees par les variables d'entree",
+ fr = "Definitions des lois marginales utilisees par les variables d'entree",
#====
# Choisir generateur ou charge
## ),
Activated = SIMP ( statut='o', typ=bool, defaut=True),
ComponentType = SIMP (statut='o', typ='TXM',
- into = ('Generator','Load','Line','Transformer'),),
+ into = ('Generator','Load','Motor','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",
+ 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"),
+
+ Sampling = SIMP (statut= "o", typ = "TXM",
+ into = ("Same sample for all generators", "One sample per generator"),
+ fr = "Choisir si une seule tirage sera fait pour tous les generateurs ou si des tirages differents seront faits pour chaque generateur",
+ ang= "Choose whether one drawing/sample will be performed for all of the generators or whether a different drawing/sample will be performed for each generator.",
+ defaut = "Same sample for all generators",
+ ),
+
+ Generator = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon",docu="sd_generateur"),
#====
# Type de distribution
#====
-
+
b_gener_level = BLOC (condition= "Type == 'Generator Power Level'",
Law = SIMP ( statut = "o", typ = "TXM",
ang = "1D marginal distribution",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
ang = "Support lower bound",
),
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : largeur de classe, hauteur de classe",
ang = "Class bandwidth, class height couple list",
validators=VerifTypeTuple(('R','R')),
), # 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 fichier .csv",
ang = ".csv file name",
),
),
-
+
TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
MuN = SIMP ( statut = "o",
typ = "R",
max = 1,
- fr = "Moyenne de la loi Normale non tronquée",
+ fr = "Moyenne de la loi Normale non tronqu�e",
ang = "Mean value of the associated non truncated normal distribution",
),
typ = "R",
max = 1,
val_min = 0.,
- fr = "Ecart-type de la loi Normale non tronquée",
+ fr = "Ecart-type de la loi Normale non tronqu�e",
ang = "Standard deviation of the associated non truncated normal distribution",
),
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, prob.)",
ang = "List of pairs : (value, prob.)",
validators=VerifTypeTuple(('R','R')),
Transfer_Function = FACT(statut='f',
-
+
TF_Input = SIMP ( statut='o',
typ = 'TXM',
- fr = 'Entrer une fonction de transfert à partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \
+ 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',
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,
+ val_min = 0,
),
Hub_Height = SIMP (statut = 'o',
typ = "R",
ang = 'wind turbine hub height',
sug = 80,
val_min = 0,),
- Alpha = SIMP (statut = 'o',
+ AlphaWS = 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 = 5,
val_min = 0,
val_max = 100,
- ),
+ ),
), #fin du bloc FileName
b_tuples = BLOC(condition = "TF_Input == 'tuples list'",
validators=VerifTypeTuple(('R','R')),
),
), #fin du block Tuples List
-
+
), #fin du FACT Transfer Function
), #fin du bloc generator level
defaut="UserDefined",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, prob.)",
ang = "List of pairs : (value, prob.)",
validators=VerifTypeTuple(('R','R')),
),
), # Fin BLOC USERDEFINED
-
+
), #fin du bloc generator avail
-
+
), #fin du bloc generateur
-
+
+#Bloc Charge
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",
+ 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",
),
+ Sampling = SIMP (statut= "o", typ = "TXM",
+ into = ("Same sample for all loads", "One sample per load"),
+ fr = "Choisir si une seule tirage sera fait pour tous les charges ou si des tirages differents seront faits pour chaque charge",
+ ang= "Choose whether one drawing/sample will be performed for all of the loads or whether a different drawing/sample will be performed for each load.",
+ defaut = "Same sample for all loads",
+ ),
+
Load = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",),
b_charge_level = BLOC (condition = "Type == 'Load Level'",
-
+
Law = SIMP ( statut = "o", typ = "TXM",
into = ( "Exponential",
"Histogram",
ang = "1D marginal distribution",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
ang = "Support lower bound",
),
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : largeur de classe, hauteur de classe",
ang = "Class bandwidth, class height couple list",
validators=VerifTypeTuple(('R','R')),
), # 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 fichier .csv",
ang = ".csv file name",
),
),
-
+
TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
MuN = SIMP ( statut = "o",
typ = "R",
max = 1,
- fr = "Moyenne de la loi Normale non tronquée",
+ fr = "Moyenne de la loi Normale non tronqu�e",
ang = "Mean value of the associated non truncated normal distribution",
),
typ = "R",
max = 1,
val_min = 0.,
- fr = "Ecart-type de la loi Normale non tronquée",
+ fr = "Ecart-type de la loi Normale non tronqu�e",
ang = "Standard deviation of the associated non truncated normal distribution",
),
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, probabilite)",
ang = "List of pairs : (value, probability)",
validators=VerifTypeTuple(('R','R')),
b_charge_avail = BLOC (condition = "Type == 'Load Availability'",
-
+
Law = SIMP ( statut = "o", typ = "TXM",
into = ( #"Exponential",
#"Histogram",
defaut = "UserDefined",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, probabilite)",
ang = "List of pairs : (value, probability)",
validators=VerifTypeTuple(('R','R')),
), #fin du block Load Avail
-
+
), #fin du bloc charge
-
+
+
+
+#Bloc Moteur
+ b_moteur = BLOC (condition = "ComponentType == 'Motor'",
+
+
+#====
+# Type de distribution
+#====
+
+ Type = SIMP (statut= "o", typ = "TXM",
+ into = ("Motor Level", "Motor Availability"),
+ fr = "Choisir si c'est le niveau de charge du moteur ou la disponibilit� du moteur qui sera tiree",
+ ang= "Choose whether the power level or the availability of the motor will be set by the law",
+ defaut = "Motor Level",
+ ),
+
+ Sampling = SIMP (statut= "o", typ = "TXM",
+ into = ("Same sample for all motors", "One sample per motor"),
+ fr = "Choisir si une seule tirage sera fait pour tous les moteurs ou si des tirages differents seront faits pour chaque moteur",
+ ang= "Choose whether one drawing/sample will be performed for all of the motors or whether a different drawing/sample will be performed for each motor.",
+ defaut = "Same sample for all motors",
+ ),
+
+ Motor = SIMP(statut='o',typ=sd_moteur,max="**", homo="SansOrdreNiDoublon",),
+
+
+ b_moteur_level = BLOC (condition = "Type == 'Motor Level'",
+
+ 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 fichier .csv",
+ ang = ".csv file name",
+ ),
+ ),
+
+
+
+ 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 block Load Level
+
+
+ b_moteur_avail = BLOC (condition = "Type == 'Motor Availability'",
+
+ 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",
+ defaut = "UserDefined",
+ ),
+
+
+#====
+# Definition des parametres selon le type de la loi
+#====
+
+ 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",
+ ),
+ ),
+
+
+
+ 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')),
+ defaut=((0,0.0),(1,1.0)),
+ ),
+
+ ), # Fin BLOC USERDEFINED
+
+
+ ), #fin du block Load Avail
+
+
+ ), #fin du bloc moteur
+
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",
defaut = "Line Availability",
),
+ Sampling = SIMP (statut= "o", typ = "TXM",
+ into = ("Same sample for all lines", "One sample per line"),
+ fr = "Choisir si une seule tirage sera fait pour tous les lignes ou si des tirages differents seront faits pour chaque ligne",
+ ang= "Choose whether one drawing/sample will be performed for all of the lines or whether a different drawing/sample will be performed for each line.",
+ defaut = "Same sample for all lines",
+ ),
+
Line = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"),
Law = SIMP ( statut = "o", typ = "TXM",
ang = "1D marginal distribution",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
ang = "Support lower bound",
),
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : largeur de classe, hauteur de classe",
ang = "Class bandwidth, class height couple list",
validators=VerifTypeTuple(('R','R')),
), # 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 fichier .csv",
ang = ".csv file name",
),
),
-
+
TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
MuN = SIMP ( statut = "o",
typ = "R",
max = 1,
- fr = "Moyenne de la loi Normale non tronquée",
+ fr = "Moyenne de la loi Normale non tronqu�e",
ang = "Mean value of the associated non truncated normal distribution",
),
typ = "R",
max = 1,
val_min = 0.,
- fr = "Ecart-type de la loi Normale non tronquée",
+ fr = "Ecart-type de la loi Normale non tronqu�e",
ang = "Standard deviation of the associated non truncated normal distribution",
),
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, probabilite)",
ang = "List of pairs : (value, probability)",
validators=VerifTypeTuple(('R','R')),
), # Fin BLOC WEIBULL
), #fin du bloc ligne
-
+
b_transfo = BLOC (condition = "ComponentType == 'Transformer'",
-
+
#====
# Type de distribution
#====
-
+
Type = SIMP (statut= "o", typ = "TXM",
into = ("Transformer Availability",),
fr = "La disponibilite du transformateur sera tiree",
defaut = "Transformer Availability"
),
+ Sampling = SIMP (statut= "o", typ = "TXM",
+ into = ("Same sample for all transformers", "One sample per transformer"),
+ fr = "Choisir si une seule tirage sera fait pour tous les transforamteurs ou si des tirages differents seront faits pour chaque transformateur",
+ ang= "Choose whether one drawing/sample will be performed for all of the tranformers or whether a different drawing/sample will be performed for each transformer.",
+ defaut = "Same sample for all transformers",
+ ),
+
Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"),
Law = SIMP ( statut = "o", typ = "TXM",
- into = ( #"Beta",
+ into = ( #"Beta",
#"Exponential",
#"Gamma",
#"Geometric",
ang = "1D marginal distribution",
),
-
+
#====
# Definition des parametres selon le type de la loi
#====
## NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ",
-##
+##
## FileName = SIMP ( statut = "o",
## typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
## fr = "Nom du modele physique",
ang = "Support lower bound",
),
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : largeur de classe, hauteur de classe",
ang = "Class bandwidth, class height couple list",
validators=VerifTypeTuple(('R','R')),
# fr = "Parametre Lambda | Lambda > 0",
# ang = "Lambda parameter | Lambda > 0",
# ),
-#
+#
# Mu = SIMP ( statut = "o",
# typ = "R",
# max = 1,
# fr = "Ecart type du log",
# ang = "Log standard deviation",
# ),
-#
+#
# ), # Fin BLOC MuSigmaLog_Parameters
#
# Gamma = SIMP ( statut = "o",
#
#
# MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ",
-#
+#
# N = SIMP ( statut = "o",
# typ = "I",
# max = 1,
# ang = "N parameter | N > 0",
# ),
#
-# # Il faut definir une collection de couples ( x,p )
+# # Il faut definir une collection de couples ( x,p )
# Values = SIMP ( statut = 'o',
# typ = "R",
# max = '**',
-# fr = "Liste de probabilités",
+# fr = "Liste de probabilit�s",
# ang = "Probability list",
# validators=VerifTypeTuple(('R','R')),
# ),
# fr = "Parametre Delta de la loi | Delta > 0",
# ang = "Delta parameter | Delta > 0",
# ),
-#
+#
# Gamma = SIMP ( statut = "o",
# typ = "R",
# max = 1,
# ), # 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 fichier .csv",
ang = ".csv file name",
),
),
-
+
# STUDENT = BLOC ( condition = " Law in ( 'Student', ) ",
#
# Mu = SIMP ( statut = "o",
MuN = SIMP ( statut = "o",
typ = "R",
max = 1,
- fr = "Moyenne de la loi Normale non tronquée",
+ fr = "Moyenne de la loi Normale non tronqu�e",
ang = "Mean value of the associated non truncated normal distribution",
),
typ = "R",
max = 1,
val_min = 0.,
- fr = "Ecart-type de la loi Normale non tronquée",
+ fr = "Ecart-type de la loi Normale non tronqu�e",
ang = "Standard deviation of the associated non truncated normal distribution",
),
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",
USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
- # Il faut definir une collection de couples ( x,p )
+ # Il faut definir une collection de couples ( x,p )
Values = SIMP ( statut = 'o',
typ = Tuple(2),
- max = '**',
+ max = '**',
fr = "Liste de couples : (valeur, probabilite)",
ang = "List of pairs : (value, probability)",
validators=VerifTypeTuple(('R','R')),
- ), #fin du bloc transformer
-
+ ), #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',)
-
-
-
-
-
-
-
-
-
-def exportToCsv(editor,cmd) :
- #from PyQt4.QtGui import QFileDialog
- # selection fichier
- #fn = QFileDialog.getOpenFileName()
- #if not fn : return
- #FichieraTraduire=str(fn)
- print "je suis la"
- print editor
- print cmd
+def exportToCsv(listeparam) :
+ texte=""
+ editor= listeparam[0]
+ item = listeparam[1]
+ fn=None
+ try :
+ from PyQt4.QtGui import QFileDialog, QMessageBox
+ fichier = QFileDialog.getOpenFileName()
+ if fichier == None : return
+ except :
+ try :
+ from PyQt5.QtWidgets import QFileDialog, QMessageBox
+ fichier = QFileDialog.getOpenFileName()
+ if fichier[0] == None : return
+ fichier=fichier[0]
+ except:
+ pass
-def importFromCsv(editor,cmd) :
+ nouvelleVal=[]
+ prob=item.object.get_child('Probability')
+ valeur=prob.get_valeur()
+ texte=""
+ for v in valeur :
+ texte+=v[0].nom+";"+str(v[1]).replace('.',',')+"\n"
+
+ try :
+ fn=open(fichier,'wb')
+ fn.write(texte)
+ fn.close()
+ except Exception, why:
+ QMessageBox.critical(editor, ("Save file failed"),
+ ('unable to save ')+str(fn) + str(why))
+
+
+def importFromCsv(listeparam) :
+ texte=""
+ editor= listeparam[0]
+ item = listeparam[1]
+ node = listeparam[2]
+ fn=None
+ try :
+ from PyQt4.QtGui import QFileDialog
+ fichier = QFileDialog.getOpenFileName()
+ if fichier == None : return
+ fn=open(fichier)
+ except :
+ try :
+ from PyQt5.QtWidgets import QFileDialog
+ fichier = QFileDialog.getOpenFileName()
+ if fichier[0] == None : return
+ fn=open(fichier[0])
+ except:
+ pass
+ #fn=open('Classeur1.csv')
+ if not fn : return
+ nouvelleVal=[]
+ prob=item.object.get_child('Probability')
+ monType=prob.definition.validators.typeDesTuples[0]
+ listeObjet=item.object.etape.parent.get_sd_avant_du_bon_type(item.object.etape,(monType,))
+ for ligne in fn.readlines():
+ try :
+ nom,valeur = ligne.split(';')
+ except :
+ texte += "not able to process: "+ ligne
+ continue
+ if nom not in listeObjet :
+ texte += nom + " : ignored (not known in Eficas) \n "
+ continue
+ try :
+ concept=item.jdc.get_concept(nom)
+ except :
+ texte += nom + ": ignored (not known in Eficas) \n "
+ continue
+ try :
+ valNum=valeur.replace (',','.')
+ valeur=eval (valNum, {})
+ except :
+ texte += valeur + " : unable to eval \n "
+ continue
+ nouvelleVal.append((concept,valeur))
+ # exec nom in self.jdc
+
+ if nouvelleVal != [] : prob.set_valeur(nouvelleVal)
+ if texte != "" :
+ try :
+ from PyQt5.QtWidgets import QMessageBox
+ except :
+ from PyQt4.QtGui import QMessageBox
+ QMessageBox.information( None,'unable to append values',texte,)
+
+ node.affichePanneau()
+
print "et ici"
# le dictionnaire des commandes a la structure suivante :
# - toolTip
dict_commandes={
'N_1_GENERATORS':(
- (exportToCsv,"exportToCsv",('editor','self'),False,False,"export values to cvs File"),
- (importFromToCsv,"importFromToCsv",('editor','self'),False,False,"import values from cvs File"),
+ (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"),
+ (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"),
+ ),
+ 'N_1_LINES':(
+ (exportToCsv,"exportToCsv",('editor','item'),False,False,"export values to cvs File"),
+ (importFromCsv,"importFromCsv",('editor','item','self'),False,False,"import values from cvs File"),
)
}
if sav_file==None: return
reevalue=0
+ listeADeTruire=[]
+ listeNouveau=[]
+ toClean=False
if hasattr(self,'fichier_ini'):
reevalue=1
if self.fichier_ini == sav_file : return
+ self.fichier_ini=sav_file
if hasattr(self,'old_context_fichier_init' ):
+ toClean=True
for concept in self.old_context_fichier_init.values():
- self.jdc.delete_concept(concept)
+ #self.jdc.delete_concept(concept)
+ listeADeTruire.append(concept)
self.jdc_aux=None
self.contexte_fichier_init={}
- self.reevalue_sd_jdc()
+ #self.reevalue_sd_jdc()
self.jdc.reset_context()
self.fichier_ini=sav_file
unite = 999
- try :
- #if 1:
- MachineDico,LoadDico,LineDico,TransfoDico = ExtractGeneratorLoadLineandTransfoDico2(sav_file,PSSE_path)
- #else :
- except :
+ #try :
+ if 1:
+ MachineDico,LoadDico,LineDico,TransfoDico, MotorDico = ExtractGeneratorLoadLineandTransfoDico2(sav_file,PSSE_path)
+ else :
+ #except :
if self.jdc.appli is not None:
self.jdc.appli.affiche_alerte("Error", 'An error happened in ExtractGeneratorandLoadList execution ')
self.g_context = {}
self.fichier_err = str(exc)
self.contexte_fichier_init = {}
+
for nom in MachineDico.keys():
self.fichier_text += "%s=MONGENER(ID='%s',);\n" % (nom, 'a')
+ listeNouveau.append(nom)
for nom in LoadDico.keys():
self.fichier_text += "%s=MACHARGE(ID='%s',);\n" % (nom, 'a')
+ listeNouveau.append(nom)
for nom in LineDico.keys():
self.fichier_text += "%s=MALIGNE(ID='%s',);\n" % (nom,'a')
+ listeNouveau.append(nom)
for nom in TransfoDico.keys():
self.fichier_text += "%s=MONTRANSFO(ID='%s',);\n" % (nom,'a')
+ listeNouveau.append(nom)
+
+ for nom in MotorDico.keys():
+ self.fichier_text += "%s=MONMOTEUR(ID='%s',);\n" % (nom,'a')
+ listeNouveau.append(nom)
import Extensions.jdc_include
self.JdC_aux = Extensions.jdc_include.JDC_CATA_INCLUDE(code='PSEN', execmodul=None)
self.jdc.LoadDico=LoadDico
self.jdc.LineDico=LineDico
self.jdc.TransfoDico=TransfoDico
+ self.jdc.MotorDico = MotorDico
+
+ if toClean:
+ for concept in listeADeTruire :
+ if concept.nom not in listeNouveau: self.jdc.delete_concept(concept)
+ self.reevalue_sd_jdc()
def INCLUDE_context(self,d):
"""
--- /dev/null
+# -*- 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
+#
+
+# --------------------------------------------------
+# debut entete
+# --------------------------------------------------
+
+#from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR
+from Accas import *
+import opsPSEN_N1
+#
+#class loi ( ASSD ) : pass
+#class variable ( ASSD ) : pass
+class sd_charge ( ASSD ) : pass
+class sd_generateur ( ASSD ) : pass
+class sd_ligne ( ASSD ) : pass
+class sd_transfo ( ASSD ) : pass
+class sd_moteur ( ASSD ) : pass
+#
+
+# import types
+class Tuple:
+ def __init__(self,ntuple):
+ self.ntuple=ntuple
+
+ def __convert__(self,valeur):
+ if type(valeur) == types.StringType:
+ return None
+ if len(valeur) != self.ntuple:
+ return None
+ return valeur
+
+ def info(self):
+ return "Tuple de %s elements" % self.ntuple
+
+ __repr__=info
+ __str__=info
+
+# class Matrice:
+# def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None):
+# self.nbLigs=nbLigs
+# self.nbCols=nbCols
+# self.methodeCalculTaille=methodeCalculTaille
+# self.formatSortie=formatSortie
+# self.valSup=valSup
+# self.valMin=valMin
+# self.structure=structure
+#
+# def __convert__(self,valeur):
+# # Attention ne verifie pas grand chose
+# if type(valeur) != types.ListType :
+# return None
+# return valeur
+#
+# def info(self):
+# return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
+#
+# __repr__=info
+# __str__=info
+
+
+#CONTEXT.debug = 1
+JdC = JDC_CATA ( code = 'PSEN',
+ execmodul = None,
+ regles = ( AU_MOINS_UN ( 'CASE_SELECTION' ),
+ # AU_MOINS_UN ( 'DIRECTORY' ),
+ # AU_MOINS_UN ( 'DISTRIBUTION' ),
+ # AU_MOINS_UN ( 'SIMULATION' ),
+ # 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
+
+
+# --------------------------------------------------
+# fin entete
+# --------------------------------------------------
+## TODO : RUN
+CASE_SELECTION = MACRO ( nom = "CASE_SELECTION",
+ sd_prod = opsPSEN_N1.INCLUDE,
+ op_init = opsPSEN_N1.INCLUDE_context,
+ regles = (UN_PARMI('FromFile', 'AllCases', 'WorstCases'),),
+ fichier_ini = 1,
+ op = None,
+ fr = "Sélectionnez les cas à analyser",
+ ang = 'Select the cases to analyze',
+ PSSE_path = SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files (x86)\PTI\PSSE33\PSSBIN'),
+ output_folder = SIMP(statut="o", typ="Repertoire"),
+
+ FromFile = FACT(
+ statut = 'f',
+ input_path = SIMP(statut="f",typ='Repertoire'),
+ branch_cases = SIMP(statut='o', typ='TXM'),
+ transfo_cases = SIMP(statut='o', typ='TXM'),
+ high_cases = SIMP(statut='o', typ='TXM'),
+ low_cases = SIMP(statut='o', typ='TXM'),
+ ),
+
+ AllCases = FACT(
+ statut='f',
+ all_cases = SIMP(statut='o', typ=bool, defaut = True),
+ ),
+
+ WorstCases = FACT(
+ regles = (UN_PARMI('AvgBranchLoad', 'AvgBranchLoadPercent'), UN_PARMI('AvgTransfoLoad', 'AvgTransfoLoadPercent'), UN_PARMI('AvgHighVoltage', 'AvgHighVoltagePercent'), UN_PARMI('AvgLowVoltage', 'AvgLowVoltagePercent'),),
+ statut = 'f',
+ AvgBranchLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0),
+ AvgBranchLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100),
+ AvgTransfoLoad = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0),
+ AvgTransfoLoadPercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100),
+ AvgHighVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0),
+ AvgHighVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100),
+ AvgLowVoltage = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0),
+ AvgLowVoltagePercent = SIMP(statut = 'f', typ = 'I', defaut = 0, val_min = 0, val_max = 100),
+ ),
+
+ MaxDepth = SIMP(statut = 'o', typ = 'I', defaut = 5),
+ Consigne = SIMP(statut = "o",homo = 'information',typ = "TXM", defaut = "complete CASE SELECTION"),
+
+ BusesList = SIMP(statut = 'f', typ = 'R', min = 0, max = '**', defaut = (), homo = 'SansOrdreNiDoublon'),
+
+ optionsLF = FACT (
+ statut = 'o',
+ AdjTaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Lock', '1 - Stepping', '2 - Direct'], defaut = '1 - Stepping'),
+ AdjDCtaps = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable'], defaut = '1 - Enable'),
+ SolutionMethod = SIMP(statut = 'o', typ = 'TXM', into = ['0 - FDNS', '1 - FNSL', '2 - Optimized FDNS'], defaut = '1 - FNSL'),
+ AdjSwitchedShunts = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Enable', '2 - Enable continuous mode'], defaut = '1 - Enable'),
+ DispatchMode = SIMP(statut = 'o', typ = 'TXM', into = ['0 - Disable', '1 - Reserve', '2 - Pmax', '3 - Inertia', '4 - Droop'], defaut = '1 - Reserve'),
+ FlatStart = SIMP(statut = 'o', typ = bool, defaut = False),
+ VarLimits = SIMP(statut = 'o', typ = 'I', defaut = 99),
+ ),
+ )
+
+CONTINGENCY_OPTIONS = PROC ( nom = 'CONTINGENCY_OPTIONS',
+ op = None,
+ fr = "Definitions des lois marginales utilisees par les variables d'entree",
+ ang = 'Nyu',
+ Vmin = SIMP(statut = 'o', typ = 'R', defaut = 0.9, val_min = 0),
+ Vmax = SIMP(statut = 'o', typ = 'R', defaut = 1.1, val_min = 0),
+ ContRate = SIMP(statut = 'o', typ = 'TXM', defaut = 'a', into=['a', 'b']),
+ FlowLimitLines = SIMP(statut = 'o', typ = 'I', defaut = 110, val_min = 0),
+ FloLimitTransfos = SIMP(statut = 'o', typ = 'I', defaut = 100, val_min = 0),
+ Tolance = SIMP(statut = 'o', typ = 'I', defaut = 10, val_min = 0),
+ RadialLinesOnly = SIMP(statut = 'o', typ = bool, defaut = False),
+ TripTransfos = SIMP(statut = 'o', typ = bool, defaut = True),
+ TripGenerators = SIMP(statut = 'o', typ = bool, defaut = True),
+ TripN_2 = SIMP(statut = 'o', typ = bool, defaut = False),
+ IsolatedGen = SIMP(statut = 'o', typ = bool, defaut = True),
+ )
+
+OUTPUT_OPTIONS = PROC ( nom = 'OUTPUT_OPTIONS',
+ op = None,
+ fr = "Definitions des lois marginales utilisees par les variables d'entree",
+ ang = 'Nyu',
+ TrNoGSUorGNDOutput = SIMP(statut = 'o', typ = bool, defaut = True),
+ TestBusName = SIMP(statut = 'o', typ = bool, defaut = True),
+ ReportSpaces = SIMP(statut = 'o', typ = bool, defaut = True),
+ RepeatComponentAllLines = SIMP(statut = 'o', typ = bool, defaut = True),
+ MultipleContingencyReport = SIMP(statut = 'o', typ = bool, defaut = True),
+ WriteIndivExcels = SIMP(statut = 'o', typ = bool, defaut = True),
+ WriteFlowDifs = SIMP(statut = 'o', typ = bool, defaut = True),
+ )
+
+DATA_PROCESSING = MACRO ( nom = 'DATA_PROCESSING',
+ sd_prod = opsPSEN_N1.PROCESS,
+ op_init = opsPSEN_N1.PROCESS_context,
+ fichier_ini = 1,
+ op = None,
+ fr = "Sélectionnez les cas à analyser",
+ ang = 'Select the cases to analyze',
+ XLS_file = SIMP(statut="o", typ = ('Fichier', 'XLS file (*.xls);;All Files (*)',),),
+ Onglets = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', homo = 'SansOrdreNiDoublon',into=(),),
+ BusList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', homo = 'SansOrdreNiDoublon',into=(),),
+ ContList = SIMP(statut = 'f', typ = 'TXM', min = 0, max = '**', homo = 'SansOrdreNiDoublon',into=(),),
+ )
--- /dev/null
+# -*- coding: utf-8 -*-\r
+# CONFIGURATION MANAGEMENT OF EDF VERSION\r
+# ======================================================================\r
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
+# (AT YOUR OPTION) ANY LATER VERSION.\r
+#\r
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
+#\r
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
+#\r
+#\r
+# ======================================================================\r
+"""\r
+ Ce module sert pour charger les paramètres de configuration d'EFICAS\r
+"""\r
+# Modules Python\r
+from InterfaceQT4 import configuration\r
+import os\r
+\r
+\r
+class CONFIG(configuration.CONFIG_BASE):\r
+\r
+ #-----------------------------------\r
+ def __init__(self,appli,repIni):\r
+ #-----------------------------------\r
+\r
+ self.labels_user=['catalogues','lang']\r
+ self.labels_eficas=['lang','rep_cata','catalogues']\r
+\r
+ configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode')\r
+\r
+\r
+def make_config(appli,rep):\r
+ return CONFIG(appli,rep)\r
+\r
--- /dev/null
+# -*- 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
+#
+
+#from ExtractGeneratorLoadLineandTransfoDico import *
+#from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico2
+
+def INCLUDE(self,PSSE_path,**args):
+ """
+ Fonction sd_prod pour la macro INCLUDE
+ """
+ #print('in INCLUDE')
+ #print args
+ CaseFolder = args['output_folder']
+ if CaseFolder==None: return
+ reevalue=0
+ if hasattr(self,'fichier_ini'):
+ reevalue=1
+ if self.fichier_ini == CaseFolder : 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=CaseFolder
+ self.contexte_fichier_init = {}
+ self.fichier_unite = 999
+ self.fichier_err = None
+ self.fichier_text=""
+
+ unite = 999
+
+ BusList = [138, 77, 69]
+ self.jdc.appli.changeIntoMC(self,'BusesList',BusList)
+
+
+
+def INCLUDE_context(self,d):
+ """
+ Fonction op_init pour macro INCLUDE
+ """
+ for k,v in self.g_context.items():
+ d[k]=v
+
+
+def PROCESS_context(self,d):
+ print "dans le init du Process"
+
+def PROCESS(self,XLS_file,**args):
+ if XLS_file == "" or XLS_file == None: return
+ if not (hasattr(self,'dico')) :
+ from Processor import getXLS
+ self.dico=getXLS(XLS_file)
+ self.jdc.appli.changeIntoMC(self,'Onglets',self.dico.keys())
+ self.OngletsValeurs=[]
+ else :
+ # On teste si on a modifie la liste des onglets
+ OngletsValeurs= self.get_child('Onglets').getval()
+
+
+ if not (hasattr(self,'OngletsValeurs')) : self.OngletsValeurs=OngletsValeurs
+ elif self.OngletsValeurs == OngletsValeurs : print 'return' ;return
+ else : self.OngletsValeurs=OngletsValeurs
+
+ if OngletsValeurs==() or OngletsValeurs == []:
+ self.jdc.appli.deleteMC(self,'BusList')
+ self.jdc.appli.deleteMC(self,'ContList')
+ self.OngletsValeurs=[]
+ return
+
+ OldBusValeurs= self.get_child('BusList').getval()
+ OldContValeurs= self.get_child('ContList').getval()
+ if OldBusValeurs == None : OldBusValeurs=[]
+ if OldContValeurs == None : OldContValeurs=[]
+
+ listeBus=[]
+ listeCont=[]
+ listeBusCoches=[]
+ listeContCoches=[]
+ for o in OngletsValeurs :
+ for b in self.dico[o][0]:
+ texte=b+" ("+ str(o) +" )"
+ listeBus.append(str(texte))
+ if texte in OldBusValeurs : listeBusCoches.append(str(texte))
+ for c in self.dico[o][1]:
+ texte=c+" ("+ str(o) +" )"
+ listeCont.append(str(texte))
+ if texte in OldContValeurs : listeContCoches.append(str(texte))
+
+ self.jdc.appli.changeIntoMCandSet(self,'BusList',listeBus,listeBusCoches)
+ self.jdc.appli.changeIntoMCandSet(self,'ContList',listeCont,listeContCoches)
+
+
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+code="PSEN_N1"
+import sys, os
+if os.path.dirname(os.path.abspath(__file__)) not in sys.path :
+ sys.path.insert(0,os.path.dirname(os.path.abspath(__file__)))
--- /dev/null
+# -*- coding: utf-8 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='en' #'fr'
+
+# Codage des strings qui accepte les accents (en remplacement de 'ascii')
+encoding='iso-8859-1'
+docPath=repIni
+
+
+#
+catalogues=(
+ ('PSEN_N1','default',os.path.join(repIni,'PSEN_Cata_N1.py'),'python','python'),
+)
--- /dev/null
+#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR
+# RESPONSABLE D6BHHHH J-P.LEFEBVRE
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+# ======================================================================
+# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR
+# DE LA VERSION DU CODE_ASTER ASSOCIE
+#----------------------------------------------------------------------
+version = "1.2"
+date = "25/05/2010"
+exploit = False
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""
+ Ce module sert a lancer EFICAS configure pour Code_Aster
+"""
+# Modules Python
+# Modules Eficas
+
+import sys,os
+#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+import prefs
+name='prefs_'+prefs.code
+__import__(name)
+
+from InterfaceQT4 import eficas_go
+eficas_go.lance_eficas(code=prefs.code)
--- /dev/null
+import sys
+
+def runPSEN_N1(dico) :
+ try :
+ for k in dico.keys() :
+ print k
+ except :
+ pass
+ print dico
+ return 1,'hhhh'
+
+if __name__ == "__main__":
+ if dico == None : dico={}
+ runPSEN_N1(dico)
+
<number>0</number>
</property>
<property name="bottomMargin">
- <number>2</number>
+ <number>5</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
</property>
</widget>
</item>
+ <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>5</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item>
<widget class="QToolButton" name="PBFind">
<property name="minimumSize">
<x>0</x>
<y>0</y>
<width>300</width>
- <height>95</height>
+ <height>92</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<string notr="true">background : rgb(247,247,247)</string>
</property>
<property name="frameShape">
- <enum>QFrame::Box</enum>
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
<rect>
<x>0</x>
<y>0</y>
- <width>422</width>
- <height>194</height>
+ <width>424</width>
+ <height>193</height>
</rect>
</property>
<property name="sizePolicy">
desWidgetMatrice.py desWidgetParam.py desWidgetPlusieursBase.py desWidgetPlusieursInto.py \
desWidgetPlusieursIntoOrdonne.py desWidgetPlusieursTuple.py desWidgetRadioButton.py \
desWidget4a6RadioButton.py desWidgetSimpBase.py desWidgetSDCOInto.py desWidgetSimpBool.py \
- desWidgetSimpSalome.py \
+ desWidgetSimpSalome.py toto.py\
desWidgetSimpComplexe.py desWidgetSimpFichier.py desWidgetSimpTxt.py desWidgetTuple2.py \
desWidgetTuple3.py desWidgetVide.py desWidgetUniqueSDCO.py desWidgetPlusieursPlie.py