# format du Tuple (code,version,catalogue,formatOut, finit par defaut Ãventuellement)
catalogues = (
# ('Adao','V1',os.path.join(repIni,'ADAO_Cata_V1.py'),'python','python'),
- ('Adao','V760',os.path.join(repIni,'ADAO_Cata_V0_V7_6_0.py'),'python','python'),
+ ('Adao','V770',os.path.join(repIni,'ADAO_Cata_V0_V7_7_0.py'),'python','python'),
# ('Adao','V751',os.path.join(repIni,'ADAO_Cata_V0_V7_5_1.py'),'python','python'),
)
from InterfaceQT4 import composimp
- if (isinstance(item,composimp.Node)) : item.fenetre.rendVisible()
+ if (isinstance(item,composimp.Node)) and item.fenetre : item.fenetre.rendVisible()
elif itemParent!=item:
#self.tree.handleExpandedItem(item)
#item.fenetre.donnePremier()
+ #item.fenetre.rendActif()
print 'il faut afficher le 1er'
try :
fr = item.item.get_fr()
from monWidgetSDCOInto import MonWidgetSDCOInto
widget=MonWidgetSDCOInto(self,maDefinition,monNom,monObjet,parentQt,maCommande)
elif self.item.wait_assd():
+ print self.item.get_sd_avant_du_bon_type()
if len(self.item.get_sd_avant_du_bon_type()) == 0 :
from monWidgetVide import MonWidgetVide
widget=MonWidgetVide(self,maDefinition,monNom,monObjet,parentQt,maCommande)
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.wait_assd() :
+ from monWidgetPlusieursASSDIntoOrdonne import MonWidgetPlusieursASSDIntoOrdonne
+ widget=MonWidgetPlusieursASSDIntoOrdonne(self,maDefinition,monNom,monObjet,parentQt,maCommande)
elif self.item.wait_tuple() :
if self.item.object.definition.type[0].ntuple == 2:
from monWidgetPlusieursTuple2 import MonWidgetPlusieursTuple2
--- /dev/null
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Modules Python
+import string,types,os,sys
+
+# Modules Eficas
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+from Extensions.i18n import tr
+
+from monWidgetPlusieursIntoOrdonne import MonWidgetPlusieursIntoOrdonne
+from politiquesValidation import PolitiquePlusieurs
+
+
+
+
+class MonWidgetPlusieursASSDIntoOrdonne (MonWidgetPlusieursIntoOrdonne):
+
+ def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande):
+ MonWidgetPlusieursIntoOrdonne.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande)
+
+
+ def prepareListeResultat(self):
+ for i in self.listeLE: i.close()
+ self.listeLE=[]
+ self.vScrollBar = self.scrollArea.verticalScrollBar()
+ self.listeAAfficher = self.node.item.get_sd_avant_du_bon_type()
+
+ if len(self.listeAAfficher) == 0 :
+ self.ajoutLE(0)
+ return
+
+
+ if len(self.listeAAfficher)*20 > 400 : self.setMinimumHeight(400)
+ else : self.setMinimumHeight(len(self.listeAAfficher)*30)
+ self.politique=PolitiquePlusieurs(self.node,self.editor)
+ for i in range(1,len(self.listeAAfficher)+1): self.ajoutLE(i)
+ for i in range(len(self.listeAAfficher)):
+ nomLE="lineEditVal"+str(i+1)
+ courant=getattr(self,nomLE)
+ courant.setText(str(self.listeAAfficher[i]))
+ self.vScrollBar.triggerAction(QScrollBar.SliderToMinimum)
+
+
#print "MonWidgetPlusieursInto", nom, self
self.nomLine="LEResultat"
self.listeLE=[]
+ self.ouAjouter=0
Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande)
GereListe.__init__(self)
- self.parentQt.commandesLayout.insertWidget(-1,self)
try :
self.maCommande.listeAffichageWidget.append(self.lineEditVal1)
except :
# cas ou on ne peut rien ajouter
pass
- self.ouAjouter=0
self.prepareListeResultat()
self.adjustSize()
- self.vScrollBarRE = self.scrollAreaRE.verticalScrollBar()
if sys.platform[0:5]!="linux":
repIcon=self.node.editor.appliEficas.repIcon
fichier=os.path.join(repIcon, 'arrow_up.png')
fichier2=os.path.join(repIcon, 'arrow_down.png')
icon2 = QIcon(fichier2)
self.RBBas.setIcon(icon2)
+ self.parentQt.commandesLayout.insertWidget(-1,self)
- def setValeurs(self):
- for i in self.listeLE:
- i.close()
+ def prepareListeResultat(self):
+ for i in self.listeLE: i.close()
self.listeLE=[]
+ self.vScrollBar = self.scrollArea.verticalScrollBar()
listeValeursCourantes=self.node.item.GetListeValeurs()
if hasattr(self.node.item.definition.validators,'set_MCSimp'):
obj=self.node.item.getObject()
else:
self.listeAAfficher=self.node.item.get_liste_possible([])
else :
- self.listeAAfficher=self.node.item.get_liste_possible(listeValeursCourantes)
+ print self.node.item.get_liste_possible
+ self.listeAAfficher=self.node.item.get_liste_possible(listeValeursCourantes)
+ if self.listeAAfficher==[] :
+ self.ajoutLE(0)
+ return
+ print self.listeAAfficher
if len(self.listeAAfficher)*20 > 400 : self.setMinimumHeight(400)
else : self.setMinimumHeight(len(self.listeAAfficher)*30)
- self.vScrollBar = self.scrollArea.verticalScrollBar()
self.politique=PolitiquePlusieurs(self.node,self.editor)
for i in range(1,len(self.listeAAfficher)+1): self.ajoutLE(i)
for i in range(len(self.listeAAfficher)):
courant.setText(str(self.listeAAfficher[i]))
self.vScrollBar.triggerAction(QScrollBar.SliderToMinimum)
- def prepareListeResultat(self):
+
+ def setValeurs(self):
listeValeursCourantes=self.node.item.GetListeValeurs()
if self.monSimpDef.max == "**" : aConstruire=7
else : aConstruire=self.monSimpDef.max
nouveauLE.setReadOnly(True)
if index % 2 == 1 : nouveauLE.setStyleSheet("background:rgb(210,210,210)")
else : nouveauLE.setStyleSheet("background:rgb(240,240,240)")
- self.vScrollBar.triggerAction(QScrollBar.SliderToMaximum)
+ self.vScrollBarRE = self.scrollAreaRE.verticalScrollBar()
+ self.vScrollBarRE.triggerAction(QScrollBar.SliderToMaximum)
setattr(self,nomLE,nouveauLE)
self.estVisibleRE=nouveauLE
if valeur != None :
self.ficRecents={}
self.listeAEnlever=[]
self.ListeCode=['Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP','ZCracks', 'CarmelCND','MT']
- #self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'..','Editeur','icons')
if self.salome:
structure="symetrique"),
fr = "Matrice de correlation entre les variables d'entree",
ang = "Correlation matrix for input variables",
+ #val_max=1.0,
+ #val_min=-1.0
),
## #), # Fin BLOC Matrix
##
DIRECTORY = MACRO ( nom = 'DIRECTORY',
op=None,
- fr = "Chargement des generateurs et des charges",
- ang = "Physical model wrapper load",
+ fr = "Chargement des directoires et fichiers",
+ ang = "Load directories and files necessary to run PSEN",
sd_prod = opsPSEN.INCLUDE,
op_init = opsPSEN.INCLUDE_context,
#sd_prod=None,
fichier_ini = 1,
PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'),
- sav_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),),
+ sav_file=SIMP(statut="o", typ = ('Fichier', 'Network Case Files (*.sav);;All Files (*)',),),
results_folder=SIMP(statut="o",typ='Repertoire'),
#lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
#groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
# Type de distribution
#====
+ b_gener_level = BLOC (condition= "Type == 'Generator Power Level'",
Law = SIMP ( statut = "o", typ = "TXM",
into = ( "Exponential",
"Histogram",
"Normal",
- "Rayleigh",
+ #"Rayleigh",
"PDF_from_file",
"TruncatedNormal",
"TimeSeries_from_file",
FileName = SIMP ( statut = "o",
typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
- fr = "Nom du modele physique",
- ang = "Physical model identifier",
+ fr = "Nom du fichier .csv",
+ ang = ".csv file name",
),
),
Values = SIMP ( statut = 'o',
typ = Tuple(2),
max = '**',
- fr = "Liste de couples : (valeur, probabilite)",
- ang = "List of pairs : (value, probability)",
+ fr = "Liste de couples : (valeur, prob.)",
+ ang = "List of pairs : (value, prob.)",
validators=VerifTypeTuple(('R','R')),
),
Transfer_Function = FACT(statut='f',
- Input = SIMP ( statut='o',
+ TF_Input = SIMP ( statut='o',
typ = 'TXM',
fr = 'Entrer une fonction de transfert à partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \
ou entrer une liste de tuples (valeur tiree - puissance normalisee)',
or enter a generic list of (law output value, normalized power output) tuples',
into = ('.pow file', 'tuples list'),
),
- b_file = BLOC(condition = "Input == '.pow file'",
+ b_file = BLOC(condition = "TF_Input == '.pow file'",
File_Name = SIMP ( statut = "o",
typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',),
fr = "Nom du fichier de transfer .pow",
),
), #fin du bloc FileName
- b_tuples = BLOC(condition = "Input == 'tuples list'",
+ b_tuples = BLOC(condition = "TF_Input == 'tuples list'",
- Values = SIMP ( statut = 'o',
+ TF_Values = SIMP ( statut = 'o',
typ = Tuple(2),
max = '**',
min = 2,
), #fin du FACT Transfer Function
+ ), #fin du bloc generator level
+
+
+ b_gener_avail = BLOC (condition= "Type == 'Generator 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, prob.)",
+ ang = "List of pairs : (value, prob.)",
+ validators=VerifTypeTuple(('R','R')),
+ defaut=((0,0.0),(1,1.0)),
+ ),
+
+ ), # Fin BLOC USERDEFINED
+
+
+ ), #fin du bloc generator avail
+
+
), #fin du bloc generateur
b_charge = BLOC (condition = "ComponentType == 'Load'",
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",
"Normal",
- "Rayleigh",
+ #"Rayleigh",
"PDF_from_file",
"TruncatedNormal",
"TimeSeries_from_file",
FileName = SIMP ( statut = "o",
typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
- fr = "Nom du modele physique",
- ang = "Physical model identifier",
+ fr = "Nom du fichier .csv",
+ ang = ".csv file name",
),
),
), # Fin BLOC WEIBULL
+ ), #fin du block Load Level
+
+
+ b_charge_avail = BLOC (condition = "Type == 'Load 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 charge
#"Rayleigh",
#"PDF_from_file",
#"TruncatedNormal",
- #"TimeSeries_from_file",
+ "TimeSeries_from_file",
#"Uniform",
"UserDefined",
#"Weibull",
FileName = SIMP ( statut = "o",
typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
- fr = "Nom du modele physique",
- ang = "Physical model identifier",
+ fr = "Nom du fichier .csv",
+ ang = ".csv file name",
),
),
#"PDF_from_file",
#"Triangular",
#"TruncatedNormal",
- #"TimeSeries_from_file",
+ "TimeSeries_from_file",
#"Uniform",
"UserDefined",
#"Weibull",
FileName = SIMP ( statut = "o",
typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
- fr = "Nom du modele physique",
- ang = "Physical model identifier",
+ fr = "Nom du fichier .csv",
+ ang = ".csv file name",
),
),
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico
-from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico2
+from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico
+#from ExtractGeneratorLoadLineandTransfoDico import ExtractGeneratorLoadLineandTransfoDico2
def INCLUDE(self,PSSE_path,sav_file,**args):
"""
<rect>
<x>0</x>
<y>0</y>
- <width>1188</width>
+ <width>1244</width>
<height>652</height>
</rect>
</property>
<string notr="true">background-color : rgb(248,247,246)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
<item>
<widget class="QFrame" name="frameAffichage">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<property name="minimumSize">
<size>
<width>0</width>
- <height>116</height>
+ <height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
- <height>116</height>
+ <height>130</height>
</size>
</property>
<property name="styleSheet">
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>382</width>
- <height>18</height>
+ <width>109</width>
+ <height>20</height>
</size>
</property>
</spacer>
<property name="minimumSize">
<size>
<width>141</width>
- <height>40</height>
+ <height>35</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>35</height>
</size>
</property>
<property name="frameShape">
</widget>
</item>
<item>
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>306</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QRadioButton" name="radioButton">
+ <property name="text">
+ <string>Sensible à la casse</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="BImportTout">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:rgb(104,110,149);
+color :white;
+border-radius : 12px
+</string>
+ </property>
+ <property name="text">
+ <string>Effacer </string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</item>
<item>
- <spacer name="horizontalSpacer_3">
+ <spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
<property name="sizeHint" stdset="0">
<size>
- <width>48</width>
- <height>18</height>
+ <width>108</width>
+ <height>20</height>
</size>
</property>
</spacer>
</layout>
</item>
</layout>
- <zorder>horizontalSpacer</zorder>
- <zorder>horizontalSpacer_3</zorder>
</widget>
</item>
<item>
<rect>
<x>0</x>
<y>0</y>
- <width>1170</width>
- <height>530</height>
+ <width>1226</width>
+ <height>498</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
Convertit un objet MCSIMP en une liste de chaines de caracteres a la
syntaxe python
"""
- if obj.isInformation() : return ""
waitTuple=0
if type(obj.valeur) in (types.TupleType,types.ListType) :
s = ''