Salome HOME
merge PSEN
[tools/eficas.git] / PSEN_Eficas / PSEN_Cata.py
1 # -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013   EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # --------------------------------------------------
22 # debut entete
23 # --------------------------------------------------
24
25 #from Accas import ASSD, JDC_CATA, AU_MOINS_UN, PROC, SIMP, FACT, OPER, MACRO, BLOC, A_VALIDATOR
26 from Accas import *
27 import opsPSEN
28
29 class loi      ( ASSD ) : pass
30 class variable ( ASSD ) : pass
31 class sd_charge     ( ASSD ) : pass
32 class sd_generateur ( ASSD ) : pass
33 class sd_ligne     ( ASSD ) : pass
34 class sd_transfo ( ASSD ) : pass
35 #class sd_busbar ( sd_generateur,sd_charge ) : pass
36
37 import types
38 class Tuple:
39   def __init__(self,ntuple):
40     self.ntuple=ntuple
41
42   def __convert__(self,valeur):
43     if type(valeur) == types.StringType:
44       return None
45     if len(valeur) != self.ntuple:
46       return None
47     return valeur
48
49   def info(self):
50     return "Tuple de %s elements" % self.ntuple
51
52   __repr__=info
53   __str__=info
54
55 class Matrice:
56   def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None):
57       self.nbLigs=nbLigs
58       self.nbCols=nbCols
59       self.methodeCalculTaille=methodeCalculTaille
60       self.formatSortie=formatSortie
61       self.valSup=valSup
62       self.valMin=valMin
63       self.structure=structure
64
65   def __convert__(self,valeur):
66     # Attention ne verifie pas grand chose
67     if type(valeur) != types.ListType :
68       return None
69     return valeur
70
71   def info(self):
72       return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
73
74       __repr__=info
75       __str__=info
76
77
78 #CONTEXT.debug = 1
79 JdC = JDC_CATA ( code = 'PSEN',
80                  execmodul = None,
81                  regles = ( AU_MOINS_UN ( 'PSSE_PARAMETERS' ),
82                             AU_MOINS_UN ( 'DIRECTORY' ),
83                             AU_MOINS_UN ( 'DISTRIBUTION' ),
84                             AU_MOINS_UN ( 'SIMULATION' ),
85                             AU_PLUS_UN ( 'PSSE_PARAMETERS' ),
86                             AU_PLUS_UN ( 'DIRECTORY' ),
87                             AU_PLUS_UN ( 'SIMULATION' ),
88                             AU_PLUS_UN ( 'CORRELATION' ),
89                             AU_PLUS_UN ( 'N_1_GENERATORS' ),
90                             AU_PLUS_UN ( 'N_1_LINES' ),
91                             AU_PLUS_UN ( 'N_1_LOADS' ),
92                             AU_PLUS_UN ( 'N_1_TRANSFORMERS' ),
93                             
94                             ),
95                  ) # Fin JDC_CATA
96
97
98 # --------------------------------------------------
99 # fin entete
100 # --------------------------------------------------
101
102 MONGENER =  OPER ( nom = "MONGENER",
103             sd_prod = sd_generateur,
104             UIinfo = {"groupes": ("CACHE")},
105             op = None,
106             fr = "Generateur",
107             ang = "Generator",
108
109   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
110 )
111 MACHARGE =  OPER ( nom = "MACHARGE",
112             sd_prod = sd_charge,
113             UIinfo = {"groupes": ("CACHE")},
114             op = None,
115             fr = "Charge",
116             ang = "Load",
117
118   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom charge", ang = "load name",),
119 )
120 MALIGNE =  OPER ( nom = "MALIGNE",
121             sd_prod = sd_ligne,
122             UIinfo = {"groupes": ("CACHE")},
123             op = None,
124             fr = "Ligne",
125             ang = "Line",
126
127   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom ligne", ang = "line name",),
128 )
129 MONTRANSFO =  OPER ( nom = "MONTRANSFO",
130             sd_prod = sd_transfo,
131             UIinfo = {"groupes": ("CACHE")},
132             op = None,
133             fr = "Transformateur",
134             ang = "Transformer",
135
136   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom transformateur", ang = "transformer name",),
137 )
138
139
140
141 PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS",
142              op=None,
143              docu = "",
144   FUEL_COST = SIMP ( statut = "o",
145                      typ=bool,
146                      defaut=True,
147                      ),
148   LOADSHEDDING_COST = SIMP ( statut = "o",
149                      typ=bool,
150                      defaut=False,
151                      ),
152   MVAR_COST = SIMP ( statut = "o",
153                      typ=bool,
154                      defaut=False,
155                     ),
156   I_MAX = SIMP ( statut = "o",
157                      typ='TXM',
158                      into=['RateA','RateB','RateC'],
159                      defaut='RateA',
160                     ),
161   LOCK_TAPS = SIMP ( statut = "o",
162                      typ=bool,
163                      defaut=True,
164                      ),
165 ##  P_MIN= SIMP ( statut = "o",
166 ##                     typ=bool,
167 ##                     defaut=True,
168 ##                     ),
169 )
170
171 SIMULATION = PROC ( nom = "SIMULATION",
172              op = None,
173              docu = "",
174   regles             =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'),),
175                
176   SIZE_PACKAGE = SIMP ( statut = "o",
177                  typ = "I",
178                  val_min=10,
179                  defaut=100,
180                  ),
181   NUMBER_PACKAGE = SIMP ( statut = "f",
182                  typ = "I",
183                  val_min=1,
184                  ),
185   CONVERGENCE = SIMP ( statut = "f",
186                  typ="I",
187                  into=[1],
188                 ),
189
190 ##  STUDY = SIMP ( statut = "o",
191 ##                 typ = "TXM",
192 ##                 into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ),
193 ##                 max=5,
194 ##                 fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
195 ##                 ang = "Open TURNS library debug level print",
196 ##                 ), 
197
198
199
200 #================================
201 # Definition du modele physique
202 #================================
203
204
205
206 CORRELATION = PROC ( nom = 'CORRELATION',
207                      op = None,
208                      docu = "",
209                      fr = "Correlation entre variables",
210                      ang = "Variable correlation",
211
212 ####  Copula = SIMP ( statut = "o",
213 ####                  typ = 'TXM',
214 ####                  into = ( "Independent", "Normal" ),
215 ####                  defaut = "Independent",
216 ####                  fr = "Type de la copule",
217 ####                  ang = "Copula kind",
218 ####                  ),
219 ##
220 ## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
221 ##                  
222     CorrelationMatrix = SIMP ( statut = "o",
223                                typ = Matrice(nbLigs=None,
224                                              nbCols=None,
225                                              methodeCalculTaille='NbDeDistributions',
226                                              structure="symetrique"),
227                                fr = "Matrice de correlation entre les variables d'entree",
228                                ang = "Correlation matrix for input variables",
229                                ),
230 ##  #), # Fin BLOC Matrix
231 ##
232 ##
233
234
235 DIRECTORY = MACRO ( nom = 'DIRECTORY',
236         op=None,
237         fr = "Chargement des generateurs et des charges",
238         ang = "Physical model wrapper load",
239                 sd_prod = opsPSEN.INCLUDE,
240                 op_init = opsPSEN.INCLUDE_context,
241                 #sd_prod=None,
242                 fichier_ini = 1,
243
244         PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'),
245         sav_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),),
246         results_folder=SIMP(statut="o",typ='Repertoire'),
247         #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
248         #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
249         #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),        
250         
251
252
253
254
255 #================================
256 # Importation des fichiers csv N-1
257 #================================
258
259 N_1_LINES = PROC( nom="N_1_LINES",
260                      op = None,
261                      docu = "",
262                      fr = "N-1 lignes",
263                      ang = "N-1 lines",
264   Activated = SIMP ( statut='o', typ=bool, defaut=True),
265 ##  FileName = SIMP ( statut = "o",
266 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
267 ##                    fr = "chemin du fichier csv des probabilites des defauts lignes",
268 ##                    ang = "csv file path with probabilities of line outages",
269 ##                    ),
270   Probability = SIMP ( statut = 'o',
271                        typ = Tuple(2),
272                        max = '**',
273                        fr = "Probabilite d'indisponibilite de la ligne",
274                        ang = "Probability that the line is not available",
275                        validators=VerifTypeTuple((sd_ligne,'R')),),
276               )
277
278 N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS",
279                      op = None,
280                      docu = "",
281                      fr = "N-1 transformateurs",
282                      ang = "N-1 transformers",
283   Activated = SIMP ( statut='o', typ=bool, defaut=True),
284 ##  FileName = SIMP ( statut = "o",
285 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
286 ##                    fr = "chemin du fichier csv des probabilites des defauts transformateur",
287 ##                    ang = "csv file path with probabilities of transformer outages",
288 ##                    ),
289   Probability = SIMP ( statut = 'o',
290                        typ = Tuple(2),
291                        max = '**',
292                        fr = "Probabilite d'indisponibilite de la ligne",
293                        ang = "Probability that the line is not available",
294                        validators=VerifTypeTuple((sd_transfo,'R')),),
295               )
296 N_1_GENERATORS = PROC( nom="N_1_GENERATORS",
297                      op = None,
298                      docu = "",
299                      fr = "N-1 generateurs",
300                      ang = "N-1 generators",
301   Activated = SIMP ( statut='o', typ=bool, defaut=True),
302 ##  FileName = SIMP ( statut = "o",
303 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
304 ##                    fr = "chemin du fichier csv des probabilites des defauts generateurs",
305 ##                    ang = "csv file path with probabilities of generator outages",
306 ##                    ),
307   Probability = SIMP ( statut = 'o',
308                        typ = Tuple(2),
309                        max = '**',
310                        fr = "Probabilite d'indisponibilite du generateur",
311                        ang = "Probability that the generator is not available",
312                        validators=VerifTypeTuple((sd_generateur,'R')),),
313               )
314 N_1_LOADS = PROC( nom="N_1_LOADS",
315                      op = None,
316                      docu = "",
317                      fr = "N-1 charges",
318                      ang = "N-1 loads",
319   Activated = SIMP ( statut='o', typ=bool, defaut=True),
320 ##  FileName = SIMP ( statut = "o",
321 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
322 ##                    fr = "chemin du fichier csv des probabilites des defauts charges",
323 ##                    ang = "csv file path with probabilities of load outages",
324 ##                    ),
325   Probability = SIMP ( statut = 'o',
326                        typ = Tuple(2),
327                        max = '**',
328                        fr = "Probabilite d'indisponibilite du generateur",
329                        ang = "Probability that the generator is not available",
330                        validators=VerifTypeTuple((sd_charge,'R')),),
331               )
332
333
334
335
336 #================================
337 # Definition des LOIS
338 #================================
339
340 # Nota : les variables de type OPER doivent etre en majuscules !
341 # Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type)
342 DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
343                       sd_prod = loi,
344                       op = 68,
345                       fr = "Definitions des lois marginales utilisees par les variables d'entree", 
346
347 #====
348 # Choisir generateur ou charge
349 #====
350
351 ##  TypeMachine = SIMP ( statut='o', typ='TXM',
352 ##                      into = ('charge','vent1','vent2','pv','N-1',),
353 ##                      ),
354   Activated = SIMP ( statut='o', typ=bool, defaut=True),
355   ComponentType = SIMP (statut='o', typ='TXM',
356                       into = ('Generator','Load','Line','Transformer'),),
357   b_gener = BLOC (condition = "ComponentType == 'Generator'",
358         
359   Type = SIMP (statut= "o", typ = "TXM",
360                into = ("Generator Power Level", "Generator Availability"),
361                fr = "Choisir si c'est le niveau de puissance ou la disponibilité du generateur qui sera tiree",
362                ang= "Choose whether the power level or the availability of the generator will be set by the law",
363                defaut = "Generator Power Level",
364                ),
365                   
366   Generator   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon"),
367
368 #====
369 # Type de distribution
370 #====
371   
372
373   Law = SIMP ( statut = "o", typ = "TXM",
374                 into = ( "Exponential",
375                          "Histogram",
376                          "Normal",
377                          "Rayleigh",
378                          "PDF_from_file",
379                          "TruncatedNormal",
380                          "TimeSeries_from_file",
381                          "Uniform",
382                          "UserDefined",
383                          "Weibull",
384                          ),
385                 fr = "Choix du type de la loi marginale",
386                 ang = "1D marginal distribution",
387                 ),
388
389                       
390 #====
391 # Definition des parametres selon le type de la loi
392 #====
393
394
395   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
396
397                          Lambda = SIMP ( statut = "o",
398                                          typ = "R",
399                                          max = 1,
400                                          val_min = 0.,
401                                          fr = "Parametre Lambda | Lambda > 0",
402                                          ang = "Lambda parameter | Lambda > 0",
403                                          ),
404
405                          Gamma = SIMP ( statut = "o",
406                                         typ = "R",
407                                         max = 1,
408                                         fr = "Borne inferieure du support de la loi",
409                                         ang = "Support lower bound",
410                                         ),
411
412   ), # Fin BLOC EXPONENTIAL
413
414
415   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
416
417                        First = SIMP ( statut = "o",
418                                     typ = "R",
419                                     max = 1,
420                                     fr = "Borne inferieure du supoport de la loi",
421                                     ang = "Support lower bound",
422                                     ),
423
424                        # Il faut definir une collection de couples ( x,p ) 
425                        Values = SIMP ( statut = 'o',
426                                        typ = Tuple(2),
427                                        max = '**', 
428                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
429                                        ang = "Class bandwidth, class height couple list",
430                                        validators=VerifTypeTuple(('R','R')),
431                                        ),
432
433   ), # Fin BLOC HISTOGRAM
434
435
436    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
437
438                     Mu = SIMP ( statut = "o",
439                                 typ = "R",
440                                 max = 1,
441                                 fr = "Moyenne de la loi",
442                                 ang = "Mean value",
443                                 ),
444
445                    Sigma = SIMP ( statut = "o",
446                                   typ = "R",
447                                   max = 1,
448                                   val_min = 0.,
449                                   fr = "Ecart type de la loi",
450                                   ang = "Standard deviation",
451                                   ),
452
453    ), # Fin BLOC NORMAL
454
455
456   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
457
458                    Sigma = SIMP ( statut = "o",
459                                   typ = "R",
460                                   max = 1,
461                                   fr = "Parametre Sigma de la loi | Sigma > 0",
462                                   ang = "Sigma parameter | Sigma > 0",
463                                   ),
464
465                    Gamma = SIMP ( statut = "o",
466                                   typ = "R",
467                                   max = 1,
468                                   fr = "Borne inferieure du support de la loi",
469                                   ang = "Support lower bound",
470                                   ),
471  ), # Fin BLOC RAYLEIGH
472
473   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
474              
475   FileName = SIMP ( statut = "o",
476                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
477                     fr = "Nom du modele physique",
478                     ang = "Physical model identifier",
479                     ),
480               ),
481               
482
483
484    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
485
486                              MuN = SIMP ( statut = "o",
487                                           typ = "R",
488                                           max = 1,
489                                           fr = "Moyenne de la loi Normale non tronquée",
490                                           ang = "Mean value of the associated non truncated normal distribution",
491                                           ),
492
493                              SigmaN = SIMP ( statut = "o",
494                                              typ = "R",
495                                              max = 1,
496                                              val_min = 0.,
497                                              fr = "Ecart-type de la loi Normale non tronquée",
498                                              ang = "Standard deviation of the associated non truncated normal distribution",
499                                              ),
500
501                              A = SIMP ( statut = "o",
502                                         typ = "R",
503                                         max = 1,
504                                         fr = "Borne inferieure de la loi | A < B",
505                                         ang = "Lower bound | A < B",
506                                         ),
507
508                              B = SIMP ( statut = "o",
509                                         typ = "R",
510                                         max = 1,
511                                         fr = "Borne superieure de la loi | A < B",
512                                         ang = "Upper bound | A < B",
513                                         ),
514
515    ), # Fin BLOC TRUNCATEDNORMAL
516
517
518   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
519              
520   FileName = SIMP ( statut = "o",
521                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
522                     fr = "Fichier CSV d'une serie temporelle",
523                     ang = "CSV file of a time series",
524                     ),
525               ),
526
527
528    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
529
530                      A = SIMP ( statut = "o",
531                                 typ = "R",
532                                 max = 1,
533                                 fr = "Borne inferieure du support de la loi | A < B",
534                                 ang = "Support lower bound | A < B",
535                                 ),
536
537                      B = SIMP ( statut = "o",
538                                 typ = "R",
539                                 max = 1,
540                                 fr = "Borne superieure du support de la loi | A < B",
541                                 ang = "Support upper bound | A < B",
542                                 ),
543
544    ), # Fin BLOC UNIFORM
545
546
547    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
548
549                        # Il faut definir une collection de couples ( x,p ) 
550                        Values = SIMP ( statut = 'o',
551                                        typ = Tuple(2),
552                                        max = '**', 
553                                        fr = "Liste de couples : (valeur, probabilite)",
554                                        ang = "List of pairs : (value, probability)",
555                                        validators=VerifTypeTuple(('R','R')),
556                                        ),
557
558   ), # Fin BLOC USERDEFINED
559
560
561    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
562
563                      Settings = SIMP ( statut = "o",
564                                           typ = "TXM",
565                                           max = 1,
566                                           into = ( "AlphaBeta", "MuSigma" ),
567                                           defaut = "AlphaBeta",
568                                           fr = "Parametrage de la loi weibull",
569                                           ang = "Weibull distribution parameter set",
570                                           ),
571
572                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
573
574                                          Alpha = SIMP ( statut = "o",
575                                                         typ = "R",
576                                                         max = 1,
577                                                         val_min = 0.,
578                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
579                                                         ang = "Alpha parameter | Alpha > 0",
580                                                         ),
581
582                                          Beta = SIMP ( statut = "o",
583                                                        typ = "R",
584                                                        max = 1,
585                                                        val_min = 0.,
586                                                        fr = "Parametre Beta de la loi | Beta > 0",
587                                                        ang = "Beta parameter | Beta > 0",
588                                                        ),
589
590                                          ), # Fin BLOC AlphaBeta_Parameters
591
592
593                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
594
595                                          Mu = SIMP ( statut = "o",
596                                                      typ = "R",
597                                                      max = 1,
598                                                      fr = "Moyenne de la loi",
599                                                      ang = "Mean value",
600                                                      ),
601
602                                          Sigma = SIMP ( statut = "o",
603                                                         typ = "R",
604                                                         max = 1,
605                                                         val_min = 0.,
606                                                         fr = "Ecart type de la loi",
607                                                         ang = "Standard deviation",
608                                                         ),
609
610                                          ), # Fin BLOC MuSigma_Parameters
611
612                      Gamma = SIMP ( statut = "o",
613                                     typ = "R",
614                                     max = 1,
615                                     fr = "Borne inferieure du support de la loi",
616                                     ang = "Support lower bound",
617                                     ),
618
619     ), # Fin BLOC WEIBULL
620
621
622     Transfer_Function = FACT(statut='f',
623                 
624         Input = SIMP ( statut='o',
625                        typ = 'TXM',
626                        fr = 'Entrer une fonction de transfert à partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \
627                              ou entrer une liste de tuples (valeur tiree - puissance normalisee)',
628                        ang = 'Enter wind speed - turbine production transfer function as a .pow file, \n \
629                               or enter a generic list of (law output value, normalized power output) tuples',
630                        into = ('.pow file', 'tuples list'),
631                              ),
632         b_file = BLOC(condition = "Input == '.pow file'",
633                       File_Name = SIMP ( statut = "o",
634                                         typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',),
635                                         fr = "Nom du fichier de transfer .pow",
636                                         ang = ".pow file name",
637                                         ),
638                       Wind_Speed_Measurement_Height = SIMP ( statut = 'o',
639                                         typ = "R",
640                                         max = 1,
641                                         fr = 'Hauteur (en metres) a laquelle les mesures de vitesse du vent ont ete prises',
642                                         ang = 'Height of wind speed measurements (m)',
643                                         sug = 10,
644                                         val_min = 0, 
645                                         ),
646                       Hub_Height = SIMP (statut = 'o',
647                                          typ = "R",
648                                          fr = 'hauteur de moyeu de l''eolienne',
649                                          ang = 'wind turbine hub height',
650                                          sug = 80,
651                                          val_min = 0,),
652                       Alpha = SIMP (statut = 'o',
653                                          typ = "R",
654                                          fr = 'l''alpha pour extrapoler les mesures de vitesse du vent a la hauteur du moyeu ',
655                                          ang = 'alpha used to extrapolate wind speed measurements to hub height',
656                                          defaut = 1./7,
657                                          val_min = 0,
658                                          val_max = 1,
659                                             ),
660                       Percent_Losses = SIMP (statut = 'o',
661                                          typ = "R",
662                                          fr = 'pourcentage de pertes entre la sortie theorique d''une turbine et la sortie de la centrale',
663                                          ang = 'percent losses between theoretical power output of a single turbine and the output of the farm',
664                                          defaut = 5,
665                                          val_min = 0,
666                                          val_max = 100,
667                                              ),                      
668                       ), #fin du bloc FileName
669
670         b_tuples = BLOC(condition = "Input == 'tuples list'",
671
672                        Values = SIMP ( statut = 'o',
673                                        typ = Tuple(2),
674                                        max = '**',
675                                        min = 2,
676                                        fr = "Liste de couples : valeur tiree, puissance normalisee sortie",
677                                        ang = "List of couples : value set by law, normalized power output",
678                                        validators=VerifTypeTuple(('R','R')),
679                                        ),
680                       ), #fin du block Tuples List
681                             
682         ), #fin du FACT Transfer Function
683
684   ), #fin du bloc generateur
685                       
686   b_charge = BLOC (condition = "ComponentType == 'Load'",
687         
688
689 #====
690 # Type de distribution
691 #====
692   
693   Type = SIMP (statut= "o", typ = "TXM",
694                into = ("Load Level", "Load Availability"),
695                fr = "Choisir si c'est le niveau de charge ou la disponibilité de la charge qui sera tiree",
696                ang= "Choose whether the power level or the availability of the load will be set by the law",
697                defaut = "Load Level",
698                ),
699
700   Load       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",),
701
702   Law = SIMP ( statut = "o", typ = "TXM",
703                 into = ( "Exponential",
704                          "Histogram",
705                          "Normal",
706                          "Rayleigh",
707                          "PDF_from_file",
708                          "TruncatedNormal",
709                          "TimeSeries_from_file",
710                          "Uniform",
711                          "UserDefined",
712                          "Weibull",
713                          ),
714                 fr = "Choix du type de la loi marginale",
715                 ang = "1D marginal distribution",
716                 ),
717
718                       
719 #====
720 # Definition des parametres selon le type de la loi
721 #====
722
723
724   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
725
726                          Lambda = SIMP ( statut = "o",
727                                          typ = "R",
728                                          max = 1,
729                                          val_min = 0.,
730                                          fr = "Parametre Lambda | Lambda > 0",
731                                          ang = "Lambda parameter | Lambda > 0",
732                                          ),
733
734                          Gamma = SIMP ( statut = "o",
735                                         typ = "R",
736                                         max = 1,
737                                         fr = "Borne inferieure du support de la loi",
738                                         ang = "Support lower bound",
739                                         ),
740
741   ), # Fin BLOC EXPONENTIAL
742
743
744   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
745
746                        First = SIMP ( statut = "o",
747                                     typ = "R",
748                                     max = 1,
749                                     fr = "Borne inferieure du supoport de la loi",
750                                     ang = "Support lower bound",
751                                     ),
752
753                        # Il faut definir une collection de couples ( x,p ) 
754                        Values = SIMP ( statut = 'o',
755                                        typ = Tuple(2),
756                                        max = '**', 
757                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
758                                        ang = "Class bandwidth, class height couple list",
759                                        validators=VerifTypeTuple(('R','R')),
760                                        ),
761
762   ), # Fin BLOC HISTOGRAM
763
764
765    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
766
767                     Mu = SIMP ( statut = "o",
768                                 typ = "R",
769                                 max = 1,
770                                 fr = "Moyenne de la loi",
771                                 ang = "Mean value",
772                                 ),
773
774                    Sigma = SIMP ( statut = "o",
775                                   typ = "R",
776                                   max = 1,
777                                   val_min = 0.,
778                                   fr = "Ecart type de la loi",
779                                   ang = "Standard deviation",
780                                   ),
781
782    ), # Fin BLOC NORMAL
783
784
785   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
786
787                    Sigma = SIMP ( statut = "o",
788                                   typ = "R",
789                                   max = 1,
790                                   fr = "Parametre Sigma de la loi | Sigma > 0",
791                                   ang = "Sigma parameter | Sigma > 0",
792                                   ),
793
794                    Gamma = SIMP ( statut = "o",
795                                   typ = "R",
796                                   max = 1,
797                                   fr = "Borne inferieure du support de la loi",
798                                   ang = "Support lower bound",
799                                   ),
800  ), # Fin BLOC RAYLEIGH
801
802   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
803              
804   FileName = SIMP ( statut = "o",
805                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
806                     fr = "Nom du modele physique",
807                     ang = "Physical model identifier",
808                     ),
809               ),
810               
811
812
813    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
814
815                              MuN = SIMP ( statut = "o",
816                                           typ = "R",
817                                           max = 1,
818                                           fr = "Moyenne de la loi Normale non tronquée",
819                                           ang = "Mean value of the associated non truncated normal distribution",
820                                           ),
821
822                              SigmaN = SIMP ( statut = "o",
823                                              typ = "R",
824                                              max = 1,
825                                              val_min = 0.,
826                                              fr = "Ecart-type de la loi Normale non tronquée",
827                                              ang = "Standard deviation of the associated non truncated normal distribution",
828                                              ),
829
830                              A = SIMP ( statut = "o",
831                                         typ = "R",
832                                         max = 1,
833                                         fr = "Borne inferieure de la loi | A < B",
834                                         ang = "Lower bound | A < B",
835                                         ),
836
837                              B = SIMP ( statut = "o",
838                                         typ = "R",
839                                         max = 1,
840                                         fr = "Borne superieure de la loi | A < B",
841                                         ang = "Upper bound | A < B",
842                                         ),
843
844    ), # Fin BLOC TRUNCATEDNORMAL
845
846
847   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
848              
849   FileName = SIMP ( statut = "o",
850                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
851                     fr = "Fichier CSV d'une serie temporelle",
852                     ang = "CSV file of a time series",
853                     ),
854               ),
855
856
857    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
858
859                      A = SIMP ( statut = "o",
860                                 typ = "R",
861                                 max = 1,
862                                 fr = "Borne inferieure du support de la loi | A < B",
863                                 ang = "Support lower bound | A < B",
864                                 ),
865
866                      B = SIMP ( statut = "o",
867                                 typ = "R",
868                                 max = 1,
869                                 fr = "Borne superieure du support de la loi | A < B",
870                                 ang = "Support upper bound | A < B",
871                                 ),
872
873    ), # Fin BLOC UNIFORM
874
875
876    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
877
878                        # Il faut definir une collection de couples ( x,p ) 
879                        Values = SIMP ( statut = 'o',
880                                        typ = Tuple(2),
881                                        max = '**', 
882                                        fr = "Liste de couples : (valeur, probabilite)",
883                                        ang = "List of pairs : (value, probability)",
884                                        validators=VerifTypeTuple(('R','R')),
885                                        ),
886
887   ), # Fin BLOC USERDEFINED
888
889
890    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
891
892                      Settings = SIMP ( statut = "o",
893                                           typ = "TXM",
894                                           max = 1,
895                                           into = ( "AlphaBeta", "MuSigma" ),
896                                           defaut = "AlphaBeta",
897                                           fr = "Parametrage de la loi weibull",
898                                           ang = "Weibull distribution parameter set",
899                                           ),
900
901                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
902
903                                          Alpha = SIMP ( statut = "o",
904                                                         typ = "R",
905                                                         max = 1,
906                                                         val_min = 0.,
907                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
908                                                         ang = "Alpha parameter | Alpha > 0",
909                                                         ),
910
911                                          Beta = SIMP ( statut = "o",
912                                                        typ = "R",
913                                                        max = 1,
914                                                        val_min = 0.,
915                                                        fr = "Parametre Beta de la loi | Beta > 0",
916                                                        ang = "Beta parameter | Beta > 0",
917                                                        ),
918
919                                          ), # Fin BLOC AlphaBeta_Parameters
920
921
922                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
923
924                                          Mu = SIMP ( statut = "o",
925                                                      typ = "R",
926                                                      max = 1,
927                                                      fr = "Moyenne de la loi",
928                                                      ang = "Mean value",
929                                                      ),
930
931                                          Sigma = SIMP ( statut = "o",
932                                                         typ = "R",
933                                                         max = 1,
934                                                         val_min = 0.,
935                                                         fr = "Ecart type de la loi",
936                                                         ang = "Standard deviation",
937                                                         ),
938
939                                          ), # Fin BLOC MuSigma_Parameters
940
941                      Gamma = SIMP ( statut = "o",
942                                     typ = "R",
943                                     max = 1,
944                                     fr = "Borne inferieure du support de la loi",
945                                     ang = "Support lower bound",
946                                     ),
947
948     ), # Fin BLOC WEIBULL
949
950
951   ), #fin du bloc charge
952  
953
954   b_ligne = BLOC (condition = "ComponentType == 'Line'",
955         
956
957 #====
958 # Type de distribution
959 #====
960   
961   Type = SIMP (statut= "o", typ = "TXM",
962                into = ("Line Availability",),
963                fr = "La disponibilite de la ligne sera tiree",
964                ang= "Line availability will be set by the law",
965                defaut = "Line Availability",
966                ),
967
968   Line   = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"),
969
970   Law = SIMP ( statut = "o", typ = "TXM",
971                 into = ( #"Exponential",
972                          #"Histogram",
973                          #"Normal",
974                          #"Rayleigh",
975                          #"PDF_from_file",
976                          #"TruncatedNormal",
977                          #"TimeSeries_from_file",
978                          #"Uniform",
979                          "UserDefined",
980                          #"Weibull",
981                          ),
982                 defaut = "UserDefined",
983                 fr = "Choix du type de la loi marginale",
984                 ang = "1D marginal distribution",
985                 ),
986
987                       
988 #====
989 # Definition des parametres selon le type de la loi
990 #====
991
992
993   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
994
995                          Lambda = SIMP ( statut = "o",
996                                          typ = "R",
997                                          max = 1,
998                                          val_min = 0.,
999                                          fr = "Parametre Lambda | Lambda > 0",
1000                                          ang = "Lambda parameter | Lambda > 0",
1001                                          ),
1002
1003                          Gamma = SIMP ( statut = "o",
1004                                         typ = "R",
1005                                         max = 1,
1006                                         fr = "Borne inferieure du support de la loi",
1007                                         ang = "Support lower bound",
1008                                         ),
1009
1010   ), # Fin BLOC EXPONENTIAL
1011
1012
1013   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
1014
1015                        First = SIMP ( statut = "o",
1016                                     typ = "R",
1017                                     max = 1,
1018                                     fr = "Borne inferieure du supoport de la loi",
1019                                     ang = "Support lower bound",
1020                                     ),
1021
1022                        # Il faut definir une collection de couples ( x,p ) 
1023                        Values = SIMP ( statut = 'o',
1024                                        typ = Tuple(2),
1025                                        max = '**', 
1026                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
1027                                        ang = "Class bandwidth, class height couple list",
1028                                        validators=VerifTypeTuple(('R','R')),
1029                                        ),
1030
1031   ), # Fin BLOC HISTOGRAM
1032
1033
1034    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
1035
1036                     Mu = SIMP ( statut = "o",
1037                                 typ = "R",
1038                                 max = 1,
1039                                 fr = "Moyenne de la loi",
1040                                 ang = "Mean value",
1041                                 ),
1042
1043                    Sigma = SIMP ( statut = "o",
1044                                   typ = "R",
1045                                   max = 1,
1046                                   val_min = 0.,
1047                                   fr = "Ecart type de la loi",
1048                                   ang = "Standard deviation",
1049                                   ),
1050
1051    ), # Fin BLOC NORMAL
1052
1053
1054   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
1055
1056                    Sigma = SIMP ( statut = "o",
1057                                   typ = "R",
1058                                   max = 1,
1059                                   fr = "Parametre Sigma de la loi | Sigma > 0",
1060                                   ang = "Sigma parameter | Sigma > 0",
1061                                   ),
1062
1063                    Gamma = SIMP ( statut = "o",
1064                                   typ = "R",
1065                                   max = 1,
1066                                   fr = "Borne inferieure du support de la loi",
1067                                   ang = "Support lower bound",
1068                                   ),
1069  ), # Fin BLOC RAYLEIGH
1070
1071   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
1072              
1073   FileName = SIMP ( statut = "o",
1074                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1075                     fr = "Nom du modele physique",
1076                     ang = "Physical model identifier",
1077                     ),
1078               ),
1079               
1080
1081
1082    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
1083
1084                              MuN = SIMP ( statut = "o",
1085                                           typ = "R",
1086                                           max = 1,
1087                                           fr = "Moyenne de la loi Normale non tronquée",
1088                                           ang = "Mean value of the associated non truncated normal distribution",
1089                                           ),
1090
1091                              SigmaN = SIMP ( statut = "o",
1092                                              typ = "R",
1093                                              max = 1,
1094                                              val_min = 0.,
1095                                              fr = "Ecart-type de la loi Normale non tronquée",
1096                                              ang = "Standard deviation of the associated non truncated normal distribution",
1097                                              ),
1098
1099                              A = SIMP ( statut = "o",
1100                                         typ = "R",
1101                                         max = 1,
1102                                         fr = "Borne inferieure de la loi | A < B",
1103                                         ang = "Lower bound | A < B",
1104                                         ),
1105
1106                              B = SIMP ( statut = "o",
1107                                         typ = "R",
1108                                         max = 1,
1109                                         fr = "Borne superieure de la loi | A < B",
1110                                         ang = "Upper bound | A < B",
1111                                         ),
1112
1113    ), # Fin BLOC TRUNCATEDNORMAL
1114
1115
1116   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1117              
1118   FileName = SIMP ( statut = "o",
1119                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1120                     fr = "Fichier CSV d'une serie temporelle",
1121                     ang = "CSV file of a time series",
1122                     ),
1123               ),
1124
1125
1126    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
1127
1128                      A = SIMP ( statut = "o",
1129                                 typ = "R",
1130                                 max = 1,
1131                                 fr = "Borne inferieure du support de la loi | A < B",
1132                                 ang = "Support lower bound | A < B",
1133                                 ),
1134
1135                      B = SIMP ( statut = "o",
1136                                 typ = "R",
1137                                 max = 1,
1138                                 fr = "Borne superieure du support de la loi | A < B",
1139                                 ang = "Support upper bound | A < B",
1140                                 ),
1141
1142    ), # Fin BLOC UNIFORM
1143
1144
1145    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1146
1147                        # Il faut definir une collection de couples ( x,p ) 
1148                        Values = SIMP ( statut = 'o',
1149                                        typ = Tuple(2),
1150                                        max = '**', 
1151                                        fr = "Liste de couples : (valeur, probabilite)",
1152                                        ang = "List of pairs : (value, probability)",
1153                                        validators=VerifTypeTuple(('R','R')),
1154                                        defaut=((0,0.0),(1,1.0)),
1155                                        ),
1156
1157   ), # Fin BLOC USERDEFINED
1158
1159
1160    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
1161
1162                      Settings = SIMP ( statut = "o",
1163                                           typ = "TXM",
1164                                           max = 1,
1165                                           into = ( "AlphaBeta", "MuSigma" ),
1166                                           defaut = "AlphaBeta",
1167                                           fr = "Parametrage de la loi weibull",
1168                                           ang = "Weibull distribution parameter set",
1169                                           ),
1170
1171                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1172
1173                                          Alpha = SIMP ( statut = "o",
1174                                                         typ = "R",
1175                                                         max = 1,
1176                                                         val_min = 0.,
1177                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
1178                                                         ang = "Alpha parameter | Alpha > 0",
1179                                                         ),
1180
1181                                          Beta = SIMP ( statut = "o",
1182                                                        typ = "R",
1183                                                        max = 1,
1184                                                        val_min = 0.,
1185                                                        fr = "Parametre Beta de la loi | Beta > 0",
1186                                                        ang = "Beta parameter | Beta > 0",
1187                                                        ),
1188
1189                                          ), # Fin BLOC AlphaBeta_Parameters
1190
1191
1192                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1193
1194                                          Mu = SIMP ( statut = "o",
1195                                                      typ = "R",
1196                                                      max = 1,
1197                                                      fr = "Moyenne de la loi",
1198                                                      ang = "Mean value",
1199                                                      ),
1200
1201                                          Sigma = SIMP ( statut = "o",
1202                                                         typ = "R",
1203                                                         max = 1,
1204                                                         val_min = 0.,
1205                                                         fr = "Ecart type de la loi",
1206                                                         ang = "Standard deviation",
1207                                                         ),
1208
1209                                          ), # Fin BLOC MuSigma_Parameters
1210
1211                      Gamma = SIMP ( statut = "o",
1212                                     typ = "R",
1213                                     max = 1,
1214                                     fr = "Borne inferieure du support de la loi",
1215                                     ang = "Support lower bound",
1216                                     ),
1217
1218     ), # Fin BLOC WEIBULL
1219
1220   ), #fin du bloc ligne
1221                   
1222   b_transfo = BLOC (condition = "ComponentType == 'Transformer'",
1223         
1224
1225 #====
1226 # Type de distribution
1227 #====
1228   
1229   Type = SIMP (statut= "o", typ = "TXM",
1230                into = ("Transformer Availability",),
1231                fr = "La disponibilite du transformateur sera tiree",
1232                ang= "Transformer availability will be set by the law",
1233                defaut = "Transformer Availability"
1234                ),
1235
1236   Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"),
1237
1238   Law = SIMP ( statut = "o", typ = "TXM",
1239                 into = ( #"Beta", 
1240                          #"Exponential",
1241                          #"Gamma",
1242                          #"Geometric",
1243                          #"Gumbel",
1244                          #"Histogram",
1245                          #"Laplace",
1246                          #"Logistic",
1247                          #"LogNormal",
1248                          #"MultiNomial",
1249                          #"NonCentralStudent",
1250                          #"Normal",
1251                          #"Poisson",
1252                          #"Rayleigh",
1253                          #"Student",
1254                          #"PDF_from_file",
1255                          #"Triangular",
1256                          #"TruncatedNormal",
1257                          #"TimeSeries_from_file",
1258                          #"Uniform",
1259                          "UserDefined",
1260                          #"Weibull",
1261                          ),
1262                 defaut="UserDefined",
1263                 fr = "Choix du type de la loi marginale",
1264                 ang = "1D marginal distribution",
1265                 ),
1266
1267                       
1268 #====
1269 # Definition des parametres selon le type de la loi
1270 #====
1271
1272 ##  NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ",
1273 ##             
1274 ##  FileName = SIMP ( statut = "o",
1275 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1276 ##                    fr = "Nom du modele physique",
1277 ##                    ang = "Physical model identifier",
1278 ##                    ),
1279 ##              ),
1280
1281 #  BETA = BLOC ( condition = " Law in ( 'Beta', ) ",
1282 #
1283 #                  Settings = SIMP ( statut = "o",
1284 #                                       typ = "TXM",
1285 #                                       max = 1,
1286 #                                       into = ( "RT", "MuSigma" ),
1287 #                                       defaut = "RT",
1288 #                                       fr = "Parametrage de la loi beta",
1289 #                                       ang = "Beta distribution parameter set",
1290 #                                       ),
1291 #
1292 #                  RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ",
1293 #
1294 #                                      R = SIMP ( statut = "o",
1295 #                                                 typ = "R",
1296 #                                                 max = 1,
1297 #                                                 val_min = 0.,
1298 #                                                 fr = "Parametre R de la loi | R > 0",
1299 #                                                 ang = "R parameter | R > 0",
1300 #                                                 ),
1301 #
1302 #                                      # T > R
1303 #                                      T = SIMP ( statut = "o",
1304 #                                                 typ = "R",
1305 #                                                 max = 1,
1306 #                                                 val_min = 0.,
1307 #                                                 fr = "Parametre T de la loi | T > R",
1308 #                                                 ang = "T parameter | T > R",
1309 #                                                 ),
1310 #
1311 #                                      ), # Fin BLOC RT_Parameters
1312 #
1313 #
1314 #                  MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1315 #
1316 #                                      Mu = SIMP ( statut = "o",
1317 #                                                  typ = "R",
1318 #                                                  max = 1,
1319 #                                                  fr = "Moyenne de la loi",
1320 #                                                  ang = "Mean value",
1321 #                                                  ),
1322 #
1323 #                                      Sigma = SIMP ( statut = "o",
1324 #                                                     typ = "R",
1325 #                                                     max = 1,
1326 #                                                     val_min = 0.,
1327 #                                                     fr = "Ecart type de la loi",
1328 #                                                     ang = "Standard deviation",
1329 #                                                     ),
1330 #
1331 #                                      ), # Fin BLOC MuSigma_Parameters
1332 #
1333 #
1334 #                  A = SIMP ( statut = "o",
1335 #                             typ = "R",
1336 #                             max = 1,
1337 #                             fr = "Borne inferieure du support de la loi",
1338 #                             ang = "Support lower bound",
1339 #                             ),
1340 #
1341 #                  # B > A
1342 #                  B = SIMP ( statut = "o",
1343 #                             typ = "R",
1344 #                             max = 1,
1345 #                             fr = "Borne superieure du support de la loi",
1346 #                             ang = "Support upper bound",
1347 #                             ),
1348 #
1349 #  ), # Fin BLOC BETA
1350
1351
1352
1353   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
1354
1355                          Lambda = SIMP ( statut = "o",
1356                                          typ = "R",
1357                                          max = 1,
1358                                          val_min = 0.,
1359                                          fr = "Parametre Lambda | Lambda > 0",
1360                                          ang = "Lambda parameter | Lambda > 0",
1361                                          ),
1362
1363                          Gamma = SIMP ( statut = "o",
1364                                         typ = "R",
1365                                         max = 1,
1366                                         fr = "Borne inferieure du support de la loi",
1367                                         ang = "Support lower bound",
1368                                         ),
1369
1370   ), # Fin BLOC EXPONENTIAL
1371
1372
1373
1374 #  GAMMA = BLOC ( condition = " Law in ( 'Gamma', ) ",
1375 #
1376 #                   Settings = SIMP ( statut = "o",
1377 #                                        typ = "TXM",
1378 #                                        max = 1,
1379 #                                        into = ( "KLambda", "MuSigma" ),
1380 #                                        defaut = "KLambda",
1381 #                                        fr = "Parametrage de la loi gamma",
1382 #                                        ang = "Gamma distribution parameter set",
1383 #                                        ),
1384 #
1385 #                   KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ",
1386 #
1387 #                                       K = SIMP ( statut = "o",
1388 #                                                  typ = "R",
1389 #                                                  max = 1,
1390 #                                                  val_min = 0.,
1391 #                                                  fr = "Parametre K de la loi | K > 0",
1392 #                                                  ang = "K parameter | K > 0",
1393 #                                                  ),
1394 #
1395 #                                       Lambda = SIMP ( statut = "o",
1396 #                                                       typ = "R",
1397 #                                                       max = 1,
1398 #                                                       val_min = 0.,
1399 #                                                       fr = "Parametre Lambda de la loi | Lambda > 0",
1400 #                                                       ang = "Lambda parameter | Lambda > 0",
1401 #                                                       ),
1402 #
1403 #                                       ), # Fin BLOC KLambda_Parameters
1404 #
1405 #
1406 #                   MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1407 #
1408 #                                       Mu = SIMP ( statut = "o",
1409 #                                                   typ = "R",
1410 #                                                   max = 1,
1411 #                                                   fr = "Moyenne de la loi",
1412 #                                                   ang = "Mean value",
1413 #                                                   ),
1414 #
1415 #                                       Sigma = SIMP ( statut = "o",
1416 #                                                      typ = "R",
1417 #                                                      max = 1,
1418 #                                                      val_min = 0.,
1419 #                                                      fr = "Ecart type de la loi",
1420 #                                                      ang = "Standard deviation",
1421 #                                                      ),
1422 #
1423 #                                       ), # Fin BLOC MuSigma_Parameters
1424 #
1425 #                   Gamma = SIMP ( statut = "o",
1426 #                                  typ = "R",
1427 #                                  max = 1,
1428 #                                  fr = "Borne inferieure du supoport de la loi",
1429 #                                  ang = "Support lower bound",
1430 #                                  ),
1431 #
1432 #
1433 #  ), # Fin BLOC GAMMA
1434
1435
1436 #
1437 #  GEOMETRIC = BLOC ( condition = " Law in ( 'Geometric', ) ",
1438 #
1439 #                       P = SIMP ( statut = "o",
1440 #                                  typ = "R",
1441 #                                  max = 1,
1442 #                                  val_min = 0.,
1443 #                                  val_max = 1.,
1444 #                                  fr = "Parametre P | 0 < P < 1",
1445 #                                  ang = "P parameter | 0 < P < 1",
1446 #                                  ),
1447 #
1448 #  ), # Fin BLOC GEOMETRIC
1449 #
1450 #
1451 #
1452 #  GUMBEL = BLOC ( condition = " Law in ( 'Gumbel', ) ",
1453 #
1454 #                    Settings = SIMP ( statut = "o",
1455 #                                         typ = "TXM",
1456 #                                         max = 1,
1457 #                                         into = ( "AlphaBeta", "MuSigma" ),
1458 #                                         defaut = "AlphaBeta",
1459 #                                         fr = "Parametrage de la loi gumbel",
1460 #                                         ang = "Gumbel distribution parameter set",
1461 #                                         ),
1462 #
1463 #                    AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1464 #
1465 #                                        Alpha = SIMP ( statut = "o",
1466 #                                                       typ = "R",
1467 #                                                       max = 1,
1468 #                                                       val_min = 0.,
1469 #                                                       fr = "Parametre Alpha de la loi | Alpha > 0",
1470 #                                                       ang = "Alpha parameter | Alpha > 0",
1471 #                                                       ),
1472 #
1473 #                                        Beta = SIMP ( statut = "o",
1474 #                                                      typ = "R",
1475 #                                                      max = 1,
1476 #                                                      fr = "Parametre Beta de la loi",
1477 #                                                      ang = "Beta parameter",
1478 #                                                      ),
1479 #
1480 #                                        ), # Fin BLOC AlphaBeta_Parameters
1481 #
1482 #
1483 #                    MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1484 #
1485 #                                        Mu = SIMP ( statut = "o",
1486 #                                                    typ = "R",
1487 #                                                    max = 1,
1488 #                                                    fr = "Moyenne de la loi",
1489 #                                                    ang = "Mean value",
1490 #                                                    ),
1491 #
1492 #                                        Sigma = SIMP ( statut = "o",
1493 #                                                       typ = "R",
1494 #                                                       max = 1,
1495 #                                                       val_min = 0.,
1496 #                                                       fr = "Ecart type de la loi",
1497 #                                                       ang = "Standard deviation",
1498 #                                                       ),
1499 #
1500 #                                        ), # Fin BLOC MuSigma_Parameters
1501 #
1502 #  ), # Fin BLOC GUMBEL
1503
1504
1505
1506   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
1507
1508                        First = SIMP ( statut = "o",
1509                                     typ = "R",
1510                                     max = 1,
1511                                     fr = "Borne inferieure du supoport de la loi",
1512                                     ang = "Support lower bound",
1513                                     ),
1514
1515                        # Il faut definir une collection de couples ( x,p ) 
1516                        Values = SIMP ( statut = 'o',
1517                                        typ = Tuple(2),
1518                                        max = '**', 
1519                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
1520                                        ang = "Class bandwidth, class height couple list",
1521                                        validators=VerifTypeTuple(('R','R')),
1522                                        ),
1523
1524   ), # Fin BLOC HISTOGRAM
1525
1526
1527
1528 #  LAPLACE = BLOC ( condition = " Law in ( 'Laplace', ) ",
1529 #
1530 #                   Lambda = SIMP ( statut = "o",
1531 #                                   typ = "R",
1532 #                                   max = 1,
1533 #                                   val_min = 0.,
1534 #                                   fr = "Parametre Lambda | Lambda > 0",
1535 #                                   ang = "Lambda parameter | Lambda > 0",
1536 #                                   ),
1537 #                   
1538 #                   Mu = SIMP ( statut = "o",
1539 #                               typ = "R",
1540 #                               max = 1,
1541 #                               fr = "Moyenne de la loi",
1542 #                               ang = "Mean value",
1543 #                              ),
1544 #
1545 #  ), # Fin BLOC LAPLACE
1546 #
1547 #  LOGNORMAL = BLOC ( condition = " Law in ( 'LogNormal', ) ",
1548 #
1549 #                     Settings = SIMP ( statut = "o",
1550 #                                       typ = "TXM",
1551 #                                       max = 1,
1552 #                                       into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ),
1553 #                                       defaut = "MuSigmaLog",
1554 #                                       fr = "Parametrage de la loi lognormale",
1555 #                                       ang = "Lognormal distribution parameter set",
1556 #                                       ),
1557 #
1558 #                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1559 #
1560 #                                                 Mu = SIMP ( statut = "o",
1561 #                                                             typ = "R",
1562 #                                                             max = 1,
1563 #                                                             fr = "Moyenne de la loi",
1564 #                                                             ang = "Mean value",
1565 #                                                             ),
1566 #
1567 #                                                 Sigma = SIMP ( statut = "o",
1568 #                                                                typ = "R",
1569 #                                                                max = 1,
1570 #                                                                val_min = 0.,
1571 #                                                                fr = "Ecart type de la loi",
1572 #                                                                ang = "Standard deviation",
1573 #                                                                ),
1574 #
1575 #                                                 ), # Fin BLOC MuSigma_Parameters
1576 #
1577 #                     MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ",
1578 #
1579 #                                                 Mu = SIMP ( statut = "o",
1580 #                                                             typ = "R",
1581 #                                                             max = 1,
1582 #                                                             fr = "Moyenne de la loi",
1583 #                                                             ang = "Mean value",
1584 #                                                             ),
1585 #
1586 #                                                 SigmaOverMu = SIMP ( statut = "o",
1587 #                                                                typ = "R",
1588 #                                                                max = 1,
1589 #                                                                val_min = 0.,
1590 #                                                                fr = "Rapport ecart type / moyenne de la loi",
1591 #                                                                ang = "Standard deviation / mean value ratio",
1592 #                                                                ),
1593 #
1594 #                                                 ), # Fin BLOC MuSigmaOverMu_Parameters
1595 #
1596 #                     MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ",
1597 #
1598 #                                                    MuLog = SIMP ( statut = "o",
1599 #                                                                   typ = "R",
1600 #                                                                   max = 1,
1601 #                                                                   fr = "Moyenne du log",
1602 #                                                                   ang = "Log mean value",
1603 #                                                                   ),
1604 #
1605 #                                                    SigmaLog = SIMP ( statut = "o",
1606 #                                                                      typ = "R",
1607 #                                                                      max = 1,
1608 #                                                                      val_min = 0.,
1609 #                                                                      fr = "Ecart type du log",
1610 #                                                                      ang = "Log standard deviation",
1611 #                                                                      ),
1612 #                                            
1613 #                                                    ), # Fin BLOC MuSigmaLog_Parameters
1614 #
1615 #                     Gamma = SIMP ( statut = "o",
1616 #                                    typ = "R",
1617 #                                    max = 1,
1618 #                                    fr = "Borne inferieure du support de la loi",
1619 #                                    ang = "Support lower bound",
1620 #                                    ),
1621 #
1622 #   ), # Fin BLOC LOGNORMAL
1623 #
1624 #
1625 #
1626 #   LOGISTIC = BLOC ( condition = " Law in ( 'Logistic', ) ",
1627 #
1628 #                       Alpha = SIMP ( statut = "o",
1629 #                                      typ = "R",
1630 #                                      max = 1,
1631 #                                      fr = "Borne inferieure du supoport de la loi",
1632 #                                      ang = "Support lower bound",
1633 #                                      ),
1634 #
1635 #                       Beta = SIMP ( statut = "o",
1636 #                                     typ = "R",
1637 #                                     max = 1,
1638 #                                     val_min = 0.,
1639 #                                     fr = "Parametre Beta de la loi | Beta > 0",
1640 #                                     ang = "Beta parameter | Beta > 0",
1641 #                                     ),
1642 #
1643 #   ), # Fin BLOC LOGISTIC
1644 #
1645 #
1646 #
1647 #   MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ",
1648 #                         
1649 #                         N = SIMP ( statut = "o",
1650 #                                    typ = "I",
1651 #                                    max = 1,
1652 #                                    fr = "Parametre N de la loi | N > 0",
1653 #                                    ang = "N parameter | N > 0",
1654 #                                    ),
1655 #
1656 #                       # Il faut definir une collection de couples ( x,p ) 
1657 #                       Values = SIMP ( statut = 'o',
1658 #                                       typ = "R",
1659 #                                       max = '**',
1660 #                                       fr = "Liste de probabilités",
1661 #                                       ang = "Probability list",
1662 #                                       validators=VerifTypeTuple(('R','R')),
1663 #                                       ),
1664 #
1665 #   ), # Fin BLOC MULTINOMIAL
1666 #
1667 #
1668 #  NONCENTRALSTUDENT = BLOC ( condition = " Law in ( 'NonCentralStudent', ) ",
1669 #
1670 #                   Nu = SIMP ( statut = "o",
1671 #                               typ = "R",
1672 #                               max = 1,
1673 #                               fr = "Parametre Nu de la loi | Nu > 0",
1674 #                               ang = "Nu parameter | Nu > 0",
1675 #                              ),
1676 #
1677 #                   Delta = SIMP ( statut = "o",
1678 #                                  typ = "R",
1679 #                                  max = 1,
1680 #                                  fr = "Parametre Delta de la loi | Delta > 0",
1681 #                                  ang = "Delta parameter | Delta > 0",
1682 #                                  ),
1683 #                   
1684 #                   Gamma = SIMP ( statut = "o",
1685 #                                  typ = "R",
1686 #                                  max = 1,
1687 #                                  fr = "Parametre Gamma de centrage de la loi",
1688 #                                  ang = "Gamma parameter",
1689 #                                  ),
1690 #
1691 #  ), # Fin BLOC NONCENTRALSTUDENT
1692
1693
1694    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
1695
1696                     Mu = SIMP ( statut = "o",
1697                                 typ = "R",
1698                                 max = 1,
1699                                 fr = "Moyenne de la loi",
1700                                 ang = "Mean value",
1701                                 ),
1702
1703                    Sigma = SIMP ( statut = "o",
1704                                   typ = "R",
1705                                   max = 1,
1706                                   val_min = 0.,
1707                                   fr = "Ecart type de la loi",
1708                                   ang = "Standard deviation",
1709                                   ),
1710
1711    ), # Fin BLOC NORMAL
1712
1713
1714 #
1715 #   POISSON = BLOC ( condition = " Law in ( 'Poisson', ) ",
1716 #
1717 #                     Lambda = SIMP ( statut = "o",
1718 #                                     typ = "R",
1719 #                                     max = 1,
1720 #                                     val_min = 0.,
1721 #                                     fr = "Parametre Lambda de la loi | Lambda > 0",
1722 #                                     ang = "Lambda parameter | Lambda > 0",
1723 #                                     ),
1724 #
1725 #   ), # Fin BLOC POISSON
1726 #
1727 #
1728 #
1729 #  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
1730 #
1731 #                   Sigma = SIMP ( statut = "o",
1732 #                                  typ = "R",
1733 #                                  max = 1,
1734 #                                  fr = "Parametre Sigma de la loi | Sigma > 0",
1735 #                                  ang = "Sigma parameter | Sigma > 0",
1736 #                                  ),
1737 #
1738 #                   Gamma = SIMP ( statut = "o",
1739 #                                  typ = "R",
1740 #                                  max = 1,
1741 #                                  fr = "Borne inferieure du support de la loi",
1742 #                                  ang = "Support lower bound",
1743 #                                  ),
1744 # ), # Fin BLOC RAYLEIGH
1745
1746   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
1747              
1748   FileName = SIMP ( statut = "o",
1749                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1750                     fr = "Nom du modele physique",
1751                     ang = "Physical model identifier",
1752                     ),
1753               ),
1754               
1755 #   STUDENT = BLOC ( condition = " Law in ( 'Student', ) ",
1756 #
1757 #                     Mu = SIMP ( statut = "o",
1758 #                                 typ = "R",
1759 #                                 max = 1,
1760 #                                 fr = "Parametre Mu de la loi",
1761 #                                 ang = "Mu parameter",
1762 #                                 ),
1763 #
1764 #                     Nu = SIMP ( statut = "o",
1765 #                                 typ = "R",
1766 #                                 max = 1,
1767 #                                 val_min = 2.,
1768 #                                 fr = "Parametre Nu de la loi | Nu > 2",
1769 #                                 ang = "Nu parameter | Nu > 2",
1770 #                                 ),
1771 #
1772 #                   Sigma = SIMP ( statut = "o",
1773 #                                  typ = "R",
1774 #                                  max = 1,
1775 #                                  fr = "Parametre Sigma de la loi",
1776 #                                  ang = "Sigma parameter",
1777 #                                  ),
1778 #
1779 #   ), # Fin BLOC STUDENT
1780 #
1781 #
1782 #
1783 #   TRIANGULAR = BLOC ( condition = " Law in ( 'Triangular', ) ",
1784 #
1785 #                         A = SIMP ( statut = "o",
1786 #                                    typ = "R",
1787 #                                    max = 1,
1788 #                                    fr = "Borne inferieure du support de la loi | A < M < B",
1789 #                                    ang = "Support lower bound | A < M < B",
1790 #                                    ),
1791 #
1792 #                         M = SIMP ( statut = "o",
1793 #                                    typ = "R",
1794 #                                    max = 1,
1795 #                                    fr = "Mode de la loi | A < M < B",
1796 #                                    ang = "Mode | A < M < B",
1797 #                                    ),
1798 #
1799 #                         B = SIMP ( statut = "o",
1800 #                                    typ = "R",
1801 #                                    max = 1,
1802 #                                    fr = "Borne superieure du support de la loi | A < M < B",
1803 #                                    ang = "Support upper bound | A < M < B",
1804 #                                    ),
1805 #
1806 #   ), # Fin BLOC TRIANGULAR
1807 #
1808 #
1809
1810    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
1811
1812                              MuN = SIMP ( statut = "o",
1813                                           typ = "R",
1814                                           max = 1,
1815                                           fr = "Moyenne de la loi Normale non tronquée",
1816                                           ang = "Mean value of the associated non truncated normal distribution",
1817                                           ),
1818
1819                              SigmaN = SIMP ( statut = "o",
1820                                              typ = "R",
1821                                              max = 1,
1822                                              val_min = 0.,
1823                                              fr = "Ecart-type de la loi Normale non tronquée",
1824                                              ang = "Standard deviation of the associated non truncated normal distribution",
1825                                              ),
1826
1827                              A = SIMP ( statut = "o",
1828                                         typ = "R",
1829                                         max = 1,
1830                                         fr = "Borne inferieure de la loi | A < B",
1831                                         ang = "Lower bound | A < B",
1832                                         ),
1833
1834                              B = SIMP ( statut = "o",
1835                                         typ = "R",
1836                                         max = 1,
1837                                         fr = "Borne superieure de la loi | A < B",
1838                                         ang = "Upper bound | A < B",
1839                                         ),
1840
1841    ), # Fin BLOC TRUNCATEDNORMAL
1842
1843
1844   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1845              
1846   FileName = SIMP ( statut = "o",
1847                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1848                     fr = "Fichier CSV d'une serie temporelle",
1849                     ang = "CSV file of a time series",
1850                     ),
1851               ),
1852
1853
1854    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
1855
1856                      A = SIMP ( statut = "o",
1857                                 typ = "R",
1858                                 max = 1,
1859                                 fr = "Borne inferieure du support de la loi | A < B",
1860                                 ang = "Support lower bound | A < B",
1861                                 ),
1862
1863                      B = SIMP ( statut = "o",
1864                                 typ = "R",
1865                                 max = 1,
1866                                 fr = "Borne superieure du support de la loi | A < B",
1867                                 ang = "Support upper bound | A < B",
1868                                 ),
1869
1870    ), # Fin BLOC UNIFORM
1871
1872
1873    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1874
1875                        # Il faut definir une collection de couples ( x,p ) 
1876                        Values = SIMP ( statut = 'o',
1877                                        typ = Tuple(2),
1878                                        max = '**', 
1879                                        fr = "Liste de couples : (valeur, probabilite)",
1880                                        ang = "List of pairs : (value, probability)",
1881                                        validators=VerifTypeTuple(('R','R')),
1882                                        defaut=((0,0.0),(1,1.0)),
1883                                        ),
1884
1885   ), # Fin BLOC USERDEFINED
1886
1887
1888    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
1889
1890                      Settings = SIMP ( statut = "o",
1891                                           typ = "TXM",
1892                                           max = 1,
1893                                           into = ( "AlphaBeta", "MuSigma" ),
1894                                           defaut = "AlphaBeta",
1895                                           fr = "Parametrage de la loi weibull",
1896                                           ang = "Weibull distribution parameter set",
1897                                           ),
1898
1899                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1900
1901                                          Alpha = SIMP ( statut = "o",
1902                                                         typ = "R",
1903                                                         max = 1,
1904                                                         val_min = 0.,
1905                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
1906                                                         ang = "Alpha parameter | Alpha > 0",
1907                                                         ),
1908
1909                                          Beta = SIMP ( statut = "o",
1910                                                        typ = "R",
1911                                                        max = 1,
1912                                                        val_min = 0.,
1913                                                        fr = "Parametre Beta de la loi | Beta > 0",
1914                                                        ang = "Beta parameter | Beta > 0",
1915                                                        ),
1916
1917                                          ), # Fin BLOC AlphaBeta_Parameters
1918
1919
1920                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1921
1922                                          Mu = SIMP ( statut = "o",
1923                                                      typ = "R",
1924                                                      max = 1,
1925                                                      fr = "Moyenne de la loi",
1926                                                      ang = "Mean value",
1927                                                      ),
1928
1929                                          Sigma = SIMP ( statut = "o",
1930                                                         typ = "R",
1931                                                         max = 1,
1932                                                         val_min = 0.,
1933                                                         fr = "Ecart type de la loi",
1934                                                         ang = "Standard deviation",
1935                                                         ),
1936
1937                                          ), # Fin BLOC MuSigma_Parameters
1938
1939                      Gamma = SIMP ( statut = "o",
1940                                     typ = "R",
1941                                     max = 1,
1942                                     fr = "Borne inferieure du support de la loi",
1943                                     ang = "Support lower bound",
1944                                     ),
1945
1946     ), # Fin BLOC WEIBULL
1947
1948
1949
1950   ), #fin du bloc transformer 
1951                     
1952
1953
1954
1955 Classement_Commandes_Ds_Arbre=('DIRECTORY', 'DISTRIBUTION', 'CORRELATION',)
1956
1957 Ordre_Des_Commandes = ( 'DIRECTORY', 'PSSE_PARAMETERS', 'SIMULATION', 'DISTRIBUTION', 'CORRELATION',
1958                         'N_1_GENERATORS', 'N_1_LINES', 'N_1_TRANSFORMERS', 'N_1_LOADS',)
1959
1960
1961
1962
1963
1964
1965
1966
1967