Salome HOME
sauve du 20/12
[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_moteur (ASSD) : pass
36 #class sd_busbar ( sd_generateur,sd_charge ) : pass
37
38 import types
39 class Tuple:
40   def __init__(self,ntuple):
41     self.ntuple=ntuple
42
43   def __convert__(self,valeur):
44     if type(valeur) == types.StringType:
45       return None
46     if len(valeur) != self.ntuple:
47       return None
48     return valeur
49
50   def info(self):
51     return "Tuple de %s elements" % self.ntuple
52
53   __repr__=info
54   __str__=info
55
56 class Matrice:
57   def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None):
58       self.nbLigs=nbLigs
59       self.nbCols=nbCols
60       self.methodeCalculTaille=methodeCalculTaille
61       self.formatSortie=formatSortie
62       self.valSup=valSup
63       self.valMin=valMin
64       self.structure=structure
65
66   def __convert__(self,valeur):
67     # Attention ne verifie pas grand chose
68     if type(valeur) != types.ListType :
69       return None
70     return valeur
71
72   def info(self):
73       return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
74
75       __repr__=info
76       __str__=info
77
78
79 #CONTEXT.debug = 1
80 JdC = JDC_CATA ( code = 'PSEN',
81                  execmodul = None,
82                  regles = ( AU_MOINS_UN ( 'PSSE_PARAMETERS' ),
83                             AU_MOINS_UN ( 'DIRECTORY' ),
84                             AU_MOINS_UN ( 'DISTRIBUTION' ),
85                             AU_MOINS_UN ( 'SIMULATION' ),
86                             AU_PLUS_UN ( 'PSSE_PARAMETERS' ),
87                             AU_PLUS_UN ( 'DIRECTORY' ),
88                             AU_PLUS_UN ( 'SIMULATION' ),
89                             AU_PLUS_UN ( 'CORRELATION' ),
90                             AU_PLUS_UN ( 'N_1_GENERATORS' ),
91                             AU_PLUS_UN ( 'N_1_LINES' ),
92                             AU_PLUS_UN ( 'N_1_LOADS' ),
93                             AU_PLUS_UN ( 'N_1_MOTORS' ),
94                             AU_PLUS_UN ( 'N_1_TRANSFORMERS' ),
95
96                             ),
97                  ) # Fin JDC_CATA
98
99
100 # --------------------------------------------------
101 # fin entete
102 # --------------------------------------------------
103
104 MONGENER =  OPER ( nom = "MONGENER",
105             sd_prod = sd_generateur,
106             UIinfo = {"groupes": ("CACHE")},
107             op = None,
108             fr = "Generateur",
109             ang = "Generator",
110
111   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
112 )
113 MONMOTEUR =  OPER ( nom = "MONMOTEUR",
114             sd_prod = sd_moteur,
115             UIinfo = {"groupes": ("CACHE")},
116             op = None,
117             fr = "Moteur",
118             ang = "Motor",
119
120   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
121 )
122 MACHARGE =  OPER ( nom = "MACHARGE",
123             sd_prod = sd_charge,
124             UIinfo = {"groupes": ("CACHE")},
125             op = None,
126             fr = "Charge",
127             ang = "Load",
128
129   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom charge", ang = "load name",),
130 )
131 MALIGNE =  OPER ( nom = "MALIGNE",
132             sd_prod = sd_ligne,
133             UIinfo = {"groupes": ("CACHE")},
134             op = None,
135             fr = "Ligne",
136             ang = "Line",
137
138   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom ligne", ang = "line name",),
139 )
140 MONTRANSFO =  OPER ( nom = "MONTRANSFO",
141             sd_prod = sd_transfo,
142             UIinfo = {"groupes": ("CACHE")},
143             op = None,
144             fr = "Transformateur",
145             ang = "Transformer",
146
147   ID = SIMP ( statut = 'o', typ = "TXM", fr = "nom transformateur", ang = "transformer name",),
148 )
149
150
151
152 PSSE_PARAMETERS = PROC ( nom = "PSSE_PARAMETERS",
153              op=None,
154              docu = "",
155   ALGORITHM = SIMP ( statut = "o",
156                      typ='TXM',
157                      into=["Optimum Power Flow","Economic Dispatch and Power Flow"],
158                      defaut="Optimum Power Flow",
159                     ),
160   I_MAX = SIMP ( statut = "o",
161                      typ='TXM',
162                      into=['RateA','RateB','RateC'],
163                      defaut='RateA',
164                     ),
165   LOCK_TAPS = SIMP ( statut = "o",
166                      typ=bool,
167                      defaut=True,
168                      ),
169
170   b_OPF = BLOC (condition = "ALGORITHM == 'Optimum Power Flow'",
171   FUEL_COST = SIMP ( statut = "o",
172                      typ=bool,
173                      defaut=True,
174                      ),
175   LOADSHEDDING_COST = SIMP ( statut = "o",
176                      typ=bool,
177                      defaut=False,
178                      ),
179   MVAR_COST = SIMP ( statut = "o",
180                      typ=bool,
181                      defaut=False,
182                     ),
183   ITERATION_LIMIT = SIMP ( statut = "o",
184                  typ = "I",
185                  val_min=1,
186                  defaut=20,
187                  ),
188   QGEN_CONTROL = SIMP ( statut = "o",
189                         typ = bool,
190                         defaut = True,
191                         ),
192   b_QgenControl = BLOC (condition = "QGEN_CONTROL == True",
193   SAVE_CASE_BEFORE_QCONTROL = SIMP ( statut = "o",
194                         typ = bool,
195                         defaut = False,
196                         fr = "Sauvegarder des fichiers de cas avant d'avoir deconnecte les groupes ne produisant pas de la puissance active",
197                         ang = "Save network case files before having disconnected groups that dont generate active power.",
198                         ),
199   ),
200   ),
201
202   b_ECD = BLOC (condition = "ALGORITHM == 'Economic Dispatch and Power Flow'",
203   ecd_file=SIMP(statut="o", typ = ('Fichier', 'Economic Dispatch Files (*.ecd);;All Files (*)',),),
204   ),
205
206 ##  P_MIN= SIMP ( statut = "o",
207 ##                     typ=bool,
208 ##                     defaut=True,
209 ##                     ),
210 )
211
212 SIMULATION = PROC ( nom = "SIMULATION",
213              op = None,
214              docu = "",
215   regles             =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'), UN_PARMI('NUMBER_PACKAGE','CONVERGENCE'),),
216
217   SIZE_PACKAGE = SIMP ( statut = "o",
218                  typ = "I",
219                  val_min=10,
220                  defaut=100,
221                  ),
222   NUMBER_PACKAGE = SIMP ( statut = "f",
223                  typ = "I",
224                  val_min=1,
225                  ),
226   CONVERGENCE = SIMP ( statut = "f",
227                  typ="I",
228                  into=[1],
229                 ),
230
231 ##  STUDY = SIMP ( statut = "o",
232 ##                 typ = "TXM",
233 ##                 into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ),
234 ##                 max=5,
235 ##                 fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
236 ##                 ang = "Open TURNS library debug level print",
237 ##                 ),
238 )
239
240
241 #================================
242 # Definition du modele physique
243 #================================
244
245
246
247 CORRELATION = PROC ( nom = 'CORRELATION',
248                      op = None,
249                      docu = "",
250                      fr = "Correlation entre variables",
251                      ang = "Variable correlation",
252
253 ####  Copula = SIMP ( statut = "o",
254 ####                  typ = 'TXM',
255 ####                  into = ( "Independent", "Normal" ),
256 ####                  defaut = "Independent",
257 ####                  fr = "Type de la copule",
258 ####                  ang = "Copula kind",
259 ####                  ),
260 ##
261 ## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
262 ##
263     CorrelationMatrix = SIMP ( statut = "o",
264                                typ = Matrice(nbLigs=None,
265                                              nbCols=None,
266                                              methodeCalculTaille='NbDeDistributions',
267                                              structure="symetrique"),
268                                fr = "Matrice de correlation entre les variables d'entree",
269                                ang = "Correlation matrix for input variables",
270                                #val_max=1.0,
271                                #val_min=-1.0
272                                ),
273 ##  #), # Fin BLOC Matrix
274 ##
275 ##
276 )
277
278 DIRECTORY = MACRO ( nom = 'DIRECTORY',
279         op=None,
280         fr = "Chargement des directoires et fichiers",
281         ang = "Load directories and files necessary to run PSEN",
282                 sd_prod = opsPSEN.INCLUDE,
283                 op_init = opsPSEN.INCLUDE_context,
284                 #sd_prod=None,
285                 fichier_ini = 1,
286
287         PSSE_path=SIMP(statut="o",typ='Repertoire',defaut='C:\Program Files\PTI\PSSE33\PSSBIN'),
288         sav_file=SIMP(statut="o", typ = ('Fichier', 'Network Case Files (*.sav);;All Files (*)',),),
289         results_folder=SIMP(statut="o",typ='Repertoire'),
290         #lines_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
291         #groups_file=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
292         #generationsystem_file=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
293
294 )
295
296
297
298 #================================
299 # Importation des fichiers csv N-1
300 #================================
301
302 N_1_LINES = PROC( nom="N_1_LINES",
303                      op = None,
304                      docu = "",
305                      fr = "N-1 lignes",
306                      ang = "N-1 lines",
307   Activated = SIMP ( statut='o', typ=bool, defaut=True),
308 ##  FileName = SIMP ( statut = "o",
309 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
310 ##                    fr = "chemin du fichier csv des probabilites des defauts lignes",
311 ##                    ang = "csv file path with probabilities of line outages",
312 ##                    ),
313   Probability = SIMP ( statut = 'o',
314                        typ = Tuple(2),
315                        max = '**',
316                        fr = "Probabilite d'indisponibilite de la ligne",
317                        ang = "Probability that the line is not available",
318                        validators=VerifTypeTuple((sd_ligne,'R')),),
319               )
320
321 N_1_TRANSFORMERS = PROC( nom="N_1_TRANSFORMERS",
322                      op = None,
323                      docu = "",
324                      fr = "N-1 transformateurs",
325                      ang = "N-1 transformers",
326   Activated = SIMP ( statut='o', typ=bool, defaut=True),
327 ##  FileName = SIMP ( statut = "o",
328 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
329 ##                    fr = "chemin du fichier csv des probabilites des defauts transformateur",
330 ##                    ang = "csv file path with probabilities of transformer outages",
331 ##                    ),
332   Probability = SIMP ( statut = 'o',
333                        typ = Tuple(2),
334                        max = '**',
335                        fr = "Probabilite d'indisponibilite de la ligne",
336                        ang = "Probability that the line is not available",
337                        validators=VerifTypeTuple((sd_transfo,'R')),),
338               )
339 N_1_GENERATORS = PROC( nom="N_1_GENERATORS",
340                      op = None,
341                      docu = "",
342                      fr = "N-1 generateurs",
343                      ang = "N-1 generators",
344   Activated = SIMP ( statut='o', typ=bool, defaut=True),
345 ##  FileName = SIMP ( statut = "o",
346 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
347 ##                    fr = "chemin du fichier csv des probabilites des defauts generateurs",
348 ##                    ang = "csv file path with probabilities of generator outages",
349 ##                    ),
350   Probability = SIMP ( statut = 'o',
351                        typ = Tuple(2),
352                        max = '**',
353                        fr = "Probabilite d'indisponibilite du generateur",
354                        ang = "Probability that the generator is not available",
355                        validators=VerifTypeTuple((sd_generateur,'R')),),
356               )
357 N_1_MOTORS = PROC( nom="N_1_MOTORS",
358                      op = None,
359                      docu = "",
360                      fr = "N-1 moteurs",
361                      ang = "N-1 motors",
362   Activated = SIMP ( statut='o', typ=bool, defaut=True),
363 ##  FileName = SIMP ( statut = "o",
364 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
365 ##                    fr = "chemin du fichier csv des probabilites des defauts generateurs",
366 ##                    ang = "csv file path with probabilities of generator outages",
367 ##                    ),
368   Probability = SIMP ( statut = 'o',
369                        typ = Tuple(2),
370                        max = '**',
371                        fr = "Probabilite d'indisponibilite du moteur",
372                        ang = "Probability that the motor is not available",
373                        validators=VerifTypeTuple((sd_moteur,'R')),),
374               )
375 N_1_LOADS = PROC( nom="N_1_LOADS",
376                      op = None,
377                      docu = "",
378                      fr = "N-1 charges",
379                      ang = "N-1 loads",
380   Activated = SIMP ( statut='o', typ=bool, defaut=True),
381 ##  FileName = SIMP ( statut = "o",
382 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
383 ##                    fr = "chemin du fichier csv des probabilites des defauts charges",
384 ##                    ang = "csv file path with probabilities of load outages",
385 ##                    ),
386   Probability = SIMP ( statut = 'o',
387                        typ = Tuple(2),
388                        max = '**',
389                        fr = "Probabilite d'indisponibilite du generateur",
390                        ang = "Probability that the generator is not available",
391                        validators=VerifTypeTuple((sd_charge,'R')),),
392               )
393
394
395
396
397 #================================
398 # Definition des LOIS
399 #================================
400
401 # Nota : les variables de type OPER doivent etre en majuscules !
402 # Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type)
403 DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
404                       sd_prod = loi,
405                       op = 68,
406                       fr = "Definitions des lois marginales utilisees par les variables d'entree",
407
408 #====
409 # Choisir generateur ou charge
410 #====
411
412 ##  TypeMachine = SIMP ( statut='o', typ='TXM',
413 ##                      into = ('charge','vent1','vent2','pv','N-1',),
414 ##                      ),
415   Activated = SIMP ( statut='o', typ=bool, defaut=True),
416   ComponentType = SIMP (statut='o', typ='TXM',
417                       into = ('Generator','Load','Motor','Line','Transformer'),),
418   b_gener = BLOC (condition = "ComponentType == 'Generator'",
419
420   Type = SIMP (statut= "o", typ = "TXM",
421                into = ("Generator Power Level", "Generator Availability"),
422                fr = "Choisir si c'est le niveau de puissance ou la disponibilit� du generateur qui sera tiree",
423                ang= "Choose whether the power level or the availability of the generator will be set by the law",
424                defaut = "Generator Power Level",
425                ),
426
427   Sampling = SIMP (statut= "o", typ = "TXM",
428                into = ("Same sample for all generators", "One sample per generator"),
429                fr = "Choisir si une seule tirage sera fait pour tous les generateurs ou si des tirages differents seront faits pour chaque generateur",
430                ang= "Choose whether one drawing/sample will be performed for all of the generators or whether a different drawing/sample will be performed for each generator.",
431                defaut = "Same sample for all generators",
432                ),
433
434   Generator   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon",docu="sd_generateur"),
435
436 #====
437 # Type de distribution
438 #====
439
440   b_gener_level = BLOC (condition= "Type == 'Generator Power Level'",
441
442   Law = SIMP ( statut = "o", typ = "TXM",
443                 into = ( "Exponential",
444                          "Histogram",
445                          "Normal",
446                          #"Rayleigh",
447                          "PDF_from_file",
448                          "TruncatedNormal",
449                          "TimeSeries_from_file",
450                          "Uniform",
451                          "UserDefined",
452                          "Weibull",
453                          ),
454                 fr = "Choix du type de la loi marginale",
455                 ang = "1D marginal distribution",
456                 ),
457
458
459 #====
460 # Definition des parametres selon le type de la loi
461 #====
462
463
464   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
465
466                          Lambda = SIMP ( statut = "o",
467                                          typ = "R",
468                                          max = 1,
469                                          val_min = 0.,
470                                          fr = "Parametre Lambda | Lambda > 0",
471                                          ang = "Lambda parameter | Lambda > 0",
472                                          ),
473
474                          Gamma = SIMP ( statut = "o",
475                                         typ = "R",
476                                         max = 1,
477                                         fr = "Borne inferieure du support de la loi",
478                                         ang = "Support lower bound",
479                                         ),
480
481   ), # Fin BLOC EXPONENTIAL
482
483
484   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
485
486                        First = SIMP ( statut = "o",
487                                     typ = "R",
488                                     max = 1,
489                                     fr = "Borne inferieure du supoport de la loi",
490                                     ang = "Support lower bound",
491                                     ),
492
493                        # Il faut definir une collection de couples ( x,p )
494                        Values = SIMP ( statut = 'o',
495                                        typ = Tuple(2),
496                                        max = '**',
497                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
498                                        ang = "Class bandwidth, class height couple list",
499                                        validators=VerifTypeTuple(('R','R')),
500                                        ),
501
502   ), # Fin BLOC HISTOGRAM
503
504
505    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
506
507                     Mu = SIMP ( statut = "o",
508                                 typ = "R",
509                                 max = 1,
510                                 fr = "Moyenne de la loi",
511                                 ang = "Mean value",
512                                 ),
513
514                    Sigma = SIMP ( statut = "o",
515                                   typ = "R",
516                                   max = 1,
517                                   val_min = 0.,
518                                   fr = "Ecart type de la loi",
519                                   ang = "Standard deviation",
520                                   ),
521
522    ), # Fin BLOC NORMAL
523
524
525   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
526
527                    Sigma = SIMP ( statut = "o",
528                                   typ = "R",
529                                   max = 1,
530                                   fr = "Parametre Sigma de la loi | Sigma > 0",
531                                   ang = "Sigma parameter | Sigma > 0",
532                                   ),
533
534                    Gamma = SIMP ( statut = "o",
535                                   typ = "R",
536                                   max = 1,
537                                   fr = "Borne inferieure du support de la loi",
538                                   ang = "Support lower bound",
539                                   ),
540  ), # Fin BLOC RAYLEIGH
541
542   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
543
544   FileName = SIMP ( statut = "o",
545                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
546                     fr = "Nom du fichier .csv",
547                     ang = ".csv file name",
548                     ),
549               ),
550
551
552
553    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
554
555                              MuN = SIMP ( statut = "o",
556                                           typ = "R",
557                                           max = 1,
558                                           fr = "Moyenne de la loi Normale non tronqu�e",
559                                           ang = "Mean value of the associated non truncated normal distribution",
560                                           ),
561
562                              SigmaN = SIMP ( statut = "o",
563                                              typ = "R",
564                                              max = 1,
565                                              val_min = 0.,
566                                              fr = "Ecart-type de la loi Normale non tronqu�e",
567                                              ang = "Standard deviation of the associated non truncated normal distribution",
568                                              ),
569
570                              A = SIMP ( statut = "o",
571                                         typ = "R",
572                                         max = 1,
573                                         fr = "Borne inferieure de la loi | A < B",
574                                         ang = "Lower bound | A < B",
575                                         ),
576
577                              B = SIMP ( statut = "o",
578                                         typ = "R",
579                                         max = 1,
580                                         fr = "Borne superieure de la loi | A < B",
581                                         ang = "Upper bound | A < B",
582                                         ),
583
584    ), # Fin BLOC TRUNCATEDNORMAL
585
586
587   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
588
589   FileName = SIMP ( statut = "o",
590                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
591                     fr = "Fichier CSV d'une serie temporelle",
592                     ang = "CSV file of a time series",
593                     ),
594               ),
595
596
597    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
598
599                      A = SIMP ( statut = "o",
600                                 typ = "R",
601                                 max = 1,
602                                 fr = "Borne inferieure du support de la loi | A < B",
603                                 ang = "Support lower bound | A < B",
604                                 ),
605
606                      B = SIMP ( statut = "o",
607                                 typ = "R",
608                                 max = 1,
609                                 fr = "Borne superieure du support de la loi | A < B",
610                                 ang = "Support upper bound | A < B",
611                                 ),
612
613    ), # Fin BLOC UNIFORM
614
615
616    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
617
618                        # Il faut definir une collection de couples ( x,p )
619                        Values = SIMP ( statut = 'o',
620                                        typ = Tuple(2),
621                                        max = '**',
622                                        fr = "Liste de couples : (valeur, prob.)",
623                                        ang = "List of pairs : (value, prob.)",
624                                        validators=VerifTypeTuple(('R','R')),
625                                        ),
626
627   ), # Fin BLOC USERDEFINED
628
629
630    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
631
632                      Settings = SIMP ( statut = "o",
633                                           typ = "TXM",
634                                           max = 1,
635                                           into = ( "AlphaBeta", "MuSigma" ),
636                                           defaut = "AlphaBeta",
637                                           fr = "Parametrage de la loi weibull",
638                                           ang = "Weibull distribution parameter set",
639                                           ),
640
641                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
642
643                                          Alpha = SIMP ( statut = "o",
644                                                         typ = "R",
645                                                         max = 1,
646                                                         val_min = 0.,
647                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
648                                                         ang = "Alpha parameter | Alpha > 0",
649                                                         ),
650
651                                          Beta = SIMP ( statut = "o",
652                                                        typ = "R",
653                                                        max = 1,
654                                                        val_min = 0.,
655                                                        fr = "Parametre Beta de la loi | Beta > 0",
656                                                        ang = "Beta parameter | Beta > 0",
657                                                        ),
658
659                                          ), # Fin BLOC AlphaBeta_Parameters
660
661
662                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
663
664                                          Mu = SIMP ( statut = "o",
665                                                      typ = "R",
666                                                      max = 1,
667                                                      fr = "Moyenne de la loi",
668                                                      ang = "Mean value",
669                                                      ),
670
671                                          Sigma = SIMP ( statut = "o",
672                                                         typ = "R",
673                                                         max = 1,
674                                                         val_min = 0.,
675                                                         fr = "Ecart type de la loi",
676                                                         ang = "Standard deviation",
677                                                         ),
678
679                                          ), # Fin BLOC MuSigma_Parameters
680
681                      Gamma = SIMP ( statut = "o",
682                                     typ = "R",
683                                     max = 1,
684                                     fr = "Borne inferieure du support de la loi",
685                                     ang = "Support lower bound",
686                                     ),
687
688     ), # Fin BLOC WEIBULL
689
690
691     Transfer_Function = FACT(statut='f',
692
693         TF_Input = SIMP ( statut='o',
694                        typ = 'TXM',
695                        fr = 'Entrer une fonction de transfert � partir d''un fichier .pow (vitesse de vent - puissance eolienne)\n \
696                              ou entrer une liste de tuples (valeur tiree - puissance normalisee)',
697                        ang = 'Enter wind speed - turbine production transfer function as a .pow file, \n \
698                               or enter a generic list of (law output value, normalized power output) tuples',
699                        into = ('.pow file', 'tuples list'),
700                              ),
701         b_file = BLOC(condition = "TF_Input == '.pow file'",
702                       File_Name = SIMP ( statut = "o",
703                                         typ = ('Fichier', 'Pow files (*.pow);;All Files (*)',),
704                                         fr = "Nom du fichier de transfer .pow",
705                                         ang = ".pow file name",
706                                         ),
707                       Wind_Speed_Measurement_Height = SIMP ( statut = 'o',
708                                         typ = "R",
709                                         max = 1,
710                                         fr = 'Hauteur (en metres) a laquelle les mesures de vitesse du vent ont ete prises',
711                                         ang = 'Height of wind speed measurements (m)',
712                                         sug = 10,
713                                         val_min = 0,
714                                         ),
715                       Hub_Height = SIMP (statut = 'o',
716                                          typ = "R",
717                                          fr = 'hauteur de moyeu de l''eolienne',
718                                          ang = 'wind turbine hub height',
719                                          sug = 80,
720                                          val_min = 0,),
721                       AlphaWS = SIMP (statut = 'o',
722                                          typ = "R",
723                                          fr = 'l''alpha pour extrapoler les mesures de vitesse du vent a la hauteur du moyeu ',
724                                          ang = 'alpha used to extrapolate wind speed measurements to hub height',
725                                          defaut = 1./7,
726                                          val_min = 0,
727                                          val_max = 1,
728                                             ),
729                       Percent_Losses = SIMP (statut = 'o',
730                                          typ = "R",
731                                          fr = 'pourcentage de pertes entre la sortie theorique d''une turbine et la sortie de la centrale',
732                                          ang = 'percent losses between theoretical power output of a single turbine and the output of the farm',
733                                          defaut = 5,
734                                          val_min = 0,
735                                          val_max = 100,
736                                              ),
737                       ), #fin du bloc FileName
738
739         b_tuples = BLOC(condition = "TF_Input == 'tuples list'",
740
741                        TF_Values = SIMP ( statut = 'o',
742                                        typ = Tuple(2),
743                                        max = '**',
744                                        min = 2,
745                                        fr = "Liste de couples : valeur tiree, puissance normalisee sortie",
746                                        ang = "List of couples : value set by law, normalized power output",
747                                        validators=VerifTypeTuple(('R','R')),
748                                        ),
749                       ), #fin du block Tuples List
750
751         ), #fin du FACT Transfer Function
752
753   ), #fin du bloc generator level
754
755
756   b_gener_avail = BLOC (condition= "Type == 'Generator Availability'",
757
758   Law = SIMP ( statut = "o", typ = "TXM",
759                 into = ( #"Exponential",
760                          #"Histogram",
761                          #"Normal",
762                          #"Rayleigh",
763                          #"PDF_from_file",
764                          #"TruncatedNormal",
765                          "TimeSeries_from_file",
766                          #"Uniform",
767                          "UserDefined",
768                          #"Weibull",
769                          ),
770                 fr = "Choix du type de la loi marginale",
771                 ang = "1D marginal distribution",
772                 defaut="UserDefined",
773                 ),
774
775
776 #====
777 # Definition des parametres selon le type de la loi
778 #====
779
780
781   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
782
783   FileName = SIMP ( statut = "o",
784                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
785                     fr = "Fichier CSV d'une serie temporelle",
786                     ang = "CSV file of a time series",
787                     ),
788               ),
789
790
791    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
792
793                        # Il faut definir une collection de couples ( x,p )
794                        Values = SIMP ( statut = 'o',
795                                        typ = Tuple(2),
796                                        max = '**',
797                                        fr = "Liste de couples : (valeur, prob.)",
798                                        ang = "List of pairs : (value, prob.)",
799                                        validators=VerifTypeTuple(('R','R')),
800                                        defaut=((0,0.0),(1,1.0)),
801                                        ),
802
803   ), # Fin BLOC USERDEFINED
804
805
806   ), #fin du bloc generator avail
807
808
809   ), #fin du bloc generateur
810
811 #Bloc Charge
812   b_charge = BLOC (condition = "ComponentType == 'Load'",
813
814
815 #====
816 # Type de distribution
817 #====
818
819   Type = SIMP (statut= "o", typ = "TXM",
820                into = ("Load Level", "Load Availability"),
821                fr = "Choisir si c'est le niveau de charge ou la disponibilit� de la charge qui sera tiree",
822                ang= "Choose whether the power level or the availability of the load will be set by the law",
823                defaut = "Load Level",
824                ),
825
826   Sampling = SIMP (statut= "o", typ = "TXM",
827                into = ("Same sample for all loads", "One sample per load"),
828                fr = "Choisir si une seule tirage sera fait pour tous les charges ou si des tirages differents seront faits pour chaque charge",
829                ang= "Choose whether one drawing/sample will be performed for all of the loads or whether a different drawing/sample will be performed for each load.",
830                defaut = "Same sample for all loads",
831                ),
832
833   Load       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon",),
834
835
836   b_charge_level = BLOC (condition = "Type == 'Load Level'",
837
838   Law = SIMP ( statut = "o", typ = "TXM",
839                 into = ( "Exponential",
840                          "Histogram",
841                          "Normal",
842                          #"Rayleigh",
843                          "PDF_from_file",
844                          "TruncatedNormal",
845                          "TimeSeries_from_file",
846                          "Uniform",
847                          "UserDefined",
848                          "Weibull",
849                          ),
850                 fr = "Choix du type de la loi marginale",
851                 ang = "1D marginal distribution",
852                 ),
853
854
855 #====
856 # Definition des parametres selon le type de la loi
857 #====
858
859
860   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
861
862                          Lambda = SIMP ( statut = "o",
863                                          typ = "R",
864                                          max = 1,
865                                          val_min = 0.,
866                                          fr = "Parametre Lambda | Lambda > 0",
867                                          ang = "Lambda parameter | Lambda > 0",
868                                          ),
869
870                          Gamma = SIMP ( statut = "o",
871                                         typ = "R",
872                                         max = 1,
873                                         fr = "Borne inferieure du support de la loi",
874                                         ang = "Support lower bound",
875                                         ),
876
877   ), # Fin BLOC EXPONENTIAL
878
879
880   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
881
882                        First = SIMP ( statut = "o",
883                                     typ = "R",
884                                     max = 1,
885                                     fr = "Borne inferieure du supoport de la loi",
886                                     ang = "Support lower bound",
887                                     ),
888
889                        # Il faut definir une collection de couples ( x,p )
890                        Values = SIMP ( statut = 'o',
891                                        typ = Tuple(2),
892                                        max = '**',
893                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
894                                        ang = "Class bandwidth, class height couple list",
895                                        validators=VerifTypeTuple(('R','R')),
896                                        ),
897
898   ), # Fin BLOC HISTOGRAM
899
900
901    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
902
903                     Mu = SIMP ( statut = "o",
904                                 typ = "R",
905                                 max = 1,
906                                 fr = "Moyenne de la loi",
907                                 ang = "Mean value",
908                                 ),
909
910                    Sigma = SIMP ( statut = "o",
911                                   typ = "R",
912                                   max = 1,
913                                   val_min = 0.,
914                                   fr = "Ecart type de la loi",
915                                   ang = "Standard deviation",
916                                   ),
917
918    ), # Fin BLOC NORMAL
919
920
921   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
922
923                    Sigma = SIMP ( statut = "o",
924                                   typ = "R",
925                                   max = 1,
926                                   fr = "Parametre Sigma de la loi | Sigma > 0",
927                                   ang = "Sigma parameter | Sigma > 0",
928                                   ),
929
930                    Gamma = SIMP ( statut = "o",
931                                   typ = "R",
932                                   max = 1,
933                                   fr = "Borne inferieure du support de la loi",
934                                   ang = "Support lower bound",
935                                   ),
936  ), # Fin BLOC RAYLEIGH
937
938   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
939
940   FileName = SIMP ( statut = "o",
941                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
942                     fr = "Nom du fichier .csv",
943                     ang = ".csv file name",
944                     ),
945               ),
946
947
948
949    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
950
951                              MuN = SIMP ( statut = "o",
952                                           typ = "R",
953                                           max = 1,
954                                           fr = "Moyenne de la loi Normale non tronqu�e",
955                                           ang = "Mean value of the associated non truncated normal distribution",
956                                           ),
957
958                              SigmaN = SIMP ( statut = "o",
959                                              typ = "R",
960                                              max = 1,
961                                              val_min = 0.,
962                                              fr = "Ecart-type de la loi Normale non tronqu�e",
963                                              ang = "Standard deviation of the associated non truncated normal distribution",
964                                              ),
965
966                              A = SIMP ( statut = "o",
967                                         typ = "R",
968                                         max = 1,
969                                         fr = "Borne inferieure de la loi | A < B",
970                                         ang = "Lower bound | A < B",
971                                         ),
972
973                              B = SIMP ( statut = "o",
974                                         typ = "R",
975                                         max = 1,
976                                         fr = "Borne superieure de la loi | A < B",
977                                         ang = "Upper bound | A < B",
978                                         ),
979
980    ), # Fin BLOC TRUNCATEDNORMAL
981
982
983   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
984
985   FileName = SIMP ( statut = "o",
986                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
987                     fr = "Fichier CSV d'une serie temporelle",
988                     ang = "CSV file of a time series",
989                     ),
990               ),
991
992
993    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
994
995                      A = SIMP ( statut = "o",
996                                 typ = "R",
997                                 max = 1,
998                                 fr = "Borne inferieure du support de la loi | A < B",
999                                 ang = "Support lower bound | A < B",
1000                                 ),
1001
1002                      B = SIMP ( statut = "o",
1003                                 typ = "R",
1004                                 max = 1,
1005                                 fr = "Borne superieure du support de la loi | A < B",
1006                                 ang = "Support upper bound | A < B",
1007                                 ),
1008
1009    ), # Fin BLOC UNIFORM
1010
1011
1012    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1013
1014                        # Il faut definir une collection de couples ( x,p )
1015                        Values = SIMP ( statut = 'o',
1016                                        typ = Tuple(2),
1017                                        max = '**',
1018                                        fr = "Liste de couples : (valeur, probabilite)",
1019                                        ang = "List of pairs : (value, probability)",
1020                                        validators=VerifTypeTuple(('R','R')),
1021                                        ),
1022
1023   ), # Fin BLOC USERDEFINED
1024
1025
1026    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
1027
1028                      Settings = SIMP ( statut = "o",
1029                                           typ = "TXM",
1030                                           max = 1,
1031                                           into = ( "AlphaBeta", "MuSigma" ),
1032                                           defaut = "AlphaBeta",
1033                                           fr = "Parametrage de la loi weibull",
1034                                           ang = "Weibull distribution parameter set",
1035                                           ),
1036
1037                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1038
1039                                          Alpha = SIMP ( statut = "o",
1040                                                         typ = "R",
1041                                                         max = 1,
1042                                                         val_min = 0.,
1043                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
1044                                                         ang = "Alpha parameter | Alpha > 0",
1045                                                         ),
1046
1047                                          Beta = SIMP ( statut = "o",
1048                                                        typ = "R",
1049                                                        max = 1,
1050                                                        val_min = 0.,
1051                                                        fr = "Parametre Beta de la loi | Beta > 0",
1052                                                        ang = "Beta parameter | Beta > 0",
1053                                                        ),
1054
1055                                          ), # Fin BLOC AlphaBeta_Parameters
1056
1057
1058                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1059
1060                                          Mu = SIMP ( statut = "o",
1061                                                      typ = "R",
1062                                                      max = 1,
1063                                                      fr = "Moyenne de la loi",
1064                                                      ang = "Mean value",
1065                                                      ),
1066
1067                                          Sigma = SIMP ( statut = "o",
1068                                                         typ = "R",
1069                                                         max = 1,
1070                                                         val_min = 0.,
1071                                                         fr = "Ecart type de la loi",
1072                                                         ang = "Standard deviation",
1073                                                         ),
1074
1075                                          ), # Fin BLOC MuSigma_Parameters
1076
1077                      Gamma = SIMP ( statut = "o",
1078                                     typ = "R",
1079                                     max = 1,
1080                                     fr = "Borne inferieure du support de la loi",
1081                                     ang = "Support lower bound",
1082                                     ),
1083
1084     ), # Fin BLOC WEIBULL
1085
1086   ), #fin du block Load Level
1087
1088
1089   b_charge_avail = BLOC (condition = "Type == 'Load Availability'",
1090
1091   Law = SIMP ( statut = "o", typ = "TXM",
1092                 into = ( #"Exponential",
1093                          #"Histogram",
1094                          #"Normal",
1095                          #"Rayleigh",
1096                          #"PDF_from_file",
1097                          #"TruncatedNormal",
1098                          "TimeSeries_from_file",
1099                          #"Uniform",
1100                          "UserDefined",
1101                          #"Weibull",
1102                          ),
1103                 fr = "Choix du type de la loi marginale",
1104                 ang = "1D marginal distribution",
1105                 defaut = "UserDefined",
1106                 ),
1107
1108
1109 #====
1110 # Definition des parametres selon le type de la loi
1111 #====
1112
1113   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1114
1115   FileName = SIMP ( statut = "o",
1116                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1117                     fr = "Fichier CSV d'une serie temporelle",
1118                     ang = "CSV file of a time series",
1119                     ),
1120               ),
1121
1122
1123
1124    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1125
1126                        # Il faut definir une collection de couples ( x,p )
1127                        Values = SIMP ( statut = 'o',
1128                                        typ = Tuple(2),
1129                                        max = '**',
1130                                        fr = "Liste de couples : (valeur, probabilite)",
1131                                        ang = "List of pairs : (value, probability)",
1132                                        validators=VerifTypeTuple(('R','R')),
1133                                        defaut=((0,0.0),(1,1.0)),
1134                                        ),
1135
1136   ), # Fin BLOC USERDEFINED
1137
1138
1139   ), #fin du block Load Avail
1140
1141
1142   ), #fin du bloc charge
1143
1144
1145
1146 #Bloc Moteur
1147   b_moteur = BLOC (condition = "ComponentType == 'Motor'",
1148
1149
1150 #====
1151 # Type de distribution
1152 #====
1153
1154   Type = SIMP (statut= "o", typ = "TXM",
1155                into = ("Motor Level", "Motor Availability"),
1156                fr = "Choisir si c'est le niveau de charge du moteur ou la disponibilit� du moteur qui sera tiree",
1157                ang= "Choose whether the power level or the availability of the motor will be set by the law",
1158                defaut = "Motor Level",
1159                ),
1160
1161   Sampling = SIMP (statut= "o", typ = "TXM",
1162                into = ("Same sample for all motors", "One sample per motor"),
1163                fr = "Choisir si une seule tirage sera fait pour tous les moteurs ou si des tirages differents seront faits pour chaque moteur",
1164                ang= "Choose whether one drawing/sample will be performed for all of the motors or whether a different drawing/sample will be performed for each motor.",
1165                defaut = "Same sample for all motors",
1166                ),
1167
1168   Motor       = SIMP(statut='o',typ=sd_moteur,max="**", homo="SansOrdreNiDoublon",),
1169
1170
1171   b_moteur_level = BLOC (condition = "Type == 'Motor Level'",
1172
1173   Law = SIMP ( statut = "o", typ = "TXM",
1174                 into = ( "Exponential",
1175                          "Histogram",
1176                          "Normal",
1177                          #"Rayleigh",
1178                          "PDF_from_file",
1179                          "TruncatedNormal",
1180                          "TimeSeries_from_file",
1181                          "Uniform",
1182                          "UserDefined",
1183                          "Weibull",
1184                          ),
1185                 fr = "Choix du type de la loi marginale",
1186                 ang = "1D marginal distribution",
1187                 ),
1188
1189
1190 #====
1191 # Definition des parametres selon le type de la loi
1192 #====
1193
1194
1195   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
1196
1197                          Lambda = SIMP ( statut = "o",
1198                                          typ = "R",
1199                                          max = 1,
1200                                          val_min = 0.,
1201                                          fr = "Parametre Lambda | Lambda > 0",
1202                                          ang = "Lambda parameter | Lambda > 0",
1203                                          ),
1204
1205                          Gamma = SIMP ( statut = "o",
1206                                         typ = "R",
1207                                         max = 1,
1208                                         fr = "Borne inferieure du support de la loi",
1209                                         ang = "Support lower bound",
1210                                         ),
1211
1212   ), # Fin BLOC EXPONENTIAL
1213
1214
1215   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
1216
1217                        First = SIMP ( statut = "o",
1218                                     typ = "R",
1219                                     max = 1,
1220                                     fr = "Borne inferieure du supoport de la loi",
1221                                     ang = "Support lower bound",
1222                                     ),
1223
1224                        # Il faut definir une collection de couples ( x,p )
1225                        Values = SIMP ( statut = 'o',
1226                                        typ = Tuple(2),
1227                                        max = '**',
1228                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
1229                                        ang = "Class bandwidth, class height couple list",
1230                                        validators=VerifTypeTuple(('R','R')),
1231                                        ),
1232
1233   ), # Fin BLOC HISTOGRAM
1234
1235
1236    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
1237
1238                     Mu = SIMP ( statut = "o",
1239                                 typ = "R",
1240                                 max = 1,
1241                                 fr = "Moyenne de la loi",
1242                                 ang = "Mean value",
1243                                 ),
1244
1245                    Sigma = SIMP ( statut = "o",
1246                                   typ = "R",
1247                                   max = 1,
1248                                   val_min = 0.,
1249                                   fr = "Ecart type de la loi",
1250                                   ang = "Standard deviation",
1251                                   ),
1252
1253    ), # Fin BLOC NORMAL
1254
1255
1256   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
1257
1258                    Sigma = SIMP ( statut = "o",
1259                                   typ = "R",
1260                                   max = 1,
1261                                   fr = "Parametre Sigma de la loi | Sigma > 0",
1262                                   ang = "Sigma parameter | Sigma > 0",
1263                                   ),
1264
1265                    Gamma = SIMP ( statut = "o",
1266                                   typ = "R",
1267                                   max = 1,
1268                                   fr = "Borne inferieure du support de la loi",
1269                                   ang = "Support lower bound",
1270                                   ),
1271  ), # Fin BLOC RAYLEIGH
1272
1273   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
1274
1275   FileName = SIMP ( statut = "o",
1276                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1277                     fr = "Nom du fichier .csv",
1278                     ang = ".csv file name",
1279                     ),
1280               ),
1281
1282
1283
1284    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
1285
1286                              MuN = SIMP ( statut = "o",
1287                                           typ = "R",
1288                                           max = 1,
1289                                           fr = "Moyenne de la loi Normale non tronqu�e",
1290                                           ang = "Mean value of the associated non truncated normal distribution",
1291                                           ),
1292
1293                              SigmaN = SIMP ( statut = "o",
1294                                              typ = "R",
1295                                              max = 1,
1296                                              val_min = 0.,
1297                                              fr = "Ecart-type de la loi Normale non tronqu�e",
1298                                              ang = "Standard deviation of the associated non truncated normal distribution",
1299                                              ),
1300
1301                              A = SIMP ( statut = "o",
1302                                         typ = "R",
1303                                         max = 1,
1304                                         fr = "Borne inferieure de la loi | A < B",
1305                                         ang = "Lower bound | A < B",
1306                                         ),
1307
1308                              B = SIMP ( statut = "o",
1309                                         typ = "R",
1310                                         max = 1,
1311                                         fr = "Borne superieure de la loi | A < B",
1312                                         ang = "Upper bound | A < B",
1313                                         ),
1314
1315    ), # Fin BLOC TRUNCATEDNORMAL
1316
1317
1318   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1319
1320   FileName = SIMP ( statut = "o",
1321                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1322                     fr = "Fichier CSV d'une serie temporelle",
1323                     ang = "CSV file of a time series",
1324                     ),
1325               ),
1326
1327
1328    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
1329
1330                      A = SIMP ( statut = "o",
1331                                 typ = "R",
1332                                 max = 1,
1333                                 fr = "Borne inferieure du support de la loi | A < B",
1334                                 ang = "Support lower bound | A < B",
1335                                 ),
1336
1337                      B = SIMP ( statut = "o",
1338                                 typ = "R",
1339                                 max = 1,
1340                                 fr = "Borne superieure du support de la loi | A < B",
1341                                 ang = "Support upper bound | A < B",
1342                                 ),
1343
1344    ), # Fin BLOC UNIFORM
1345
1346
1347    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1348
1349                        # Il faut definir une collection de couples ( x,p )
1350                        Values = SIMP ( statut = 'o',
1351                                        typ = Tuple(2),
1352                                        max = '**',
1353                                        fr = "Liste de couples : (valeur, probabilite)",
1354                                        ang = "List of pairs : (value, probability)",
1355                                        validators=VerifTypeTuple(('R','R')),
1356                                        ),
1357
1358   ), # Fin BLOC USERDEFINED
1359
1360
1361    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
1362
1363                      Settings = SIMP ( statut = "o",
1364                                           typ = "TXM",
1365                                           max = 1,
1366                                           into = ( "AlphaBeta", "MuSigma" ),
1367                                           defaut = "AlphaBeta",
1368                                           fr = "Parametrage de la loi weibull",
1369                                           ang = "Weibull distribution parameter set",
1370                                           ),
1371
1372                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1373
1374                                          Alpha = SIMP ( statut = "o",
1375                                                         typ = "R",
1376                                                         max = 1,
1377                                                         val_min = 0.,
1378                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
1379                                                         ang = "Alpha parameter | Alpha > 0",
1380                                                         ),
1381
1382                                          Beta = SIMP ( statut = "o",
1383                                                        typ = "R",
1384                                                        max = 1,
1385                                                        val_min = 0.,
1386                                                        fr = "Parametre Beta de la loi | Beta > 0",
1387                                                        ang = "Beta parameter | Beta > 0",
1388                                                        ),
1389
1390                                          ), # Fin BLOC AlphaBeta_Parameters
1391
1392
1393                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1394
1395                                          Mu = SIMP ( statut = "o",
1396                                                      typ = "R",
1397                                                      max = 1,
1398                                                      fr = "Moyenne de la loi",
1399                                                      ang = "Mean value",
1400                                                      ),
1401
1402                                          Sigma = SIMP ( statut = "o",
1403                                                         typ = "R",
1404                                                         max = 1,
1405                                                         val_min = 0.,
1406                                                         fr = "Ecart type de la loi",
1407                                                         ang = "Standard deviation",
1408                                                         ),
1409
1410                                          ), # Fin BLOC MuSigma_Parameters
1411
1412                      Gamma = SIMP ( statut = "o",
1413                                     typ = "R",
1414                                     max = 1,
1415                                     fr = "Borne inferieure du support de la loi",
1416                                     ang = "Support lower bound",
1417                                     ),
1418
1419     ), # Fin BLOC WEIBULL
1420
1421   ), #fin du block Load Level
1422
1423
1424   b_moteur_avail = BLOC (condition = "Type == 'Motor Availability'",
1425
1426   Law = SIMP ( statut = "o", typ = "TXM",
1427                 into = ( #"Exponential",
1428                          #"Histogram",
1429                          #"Normal",
1430                          #"Rayleigh",
1431                          #"PDF_from_file",
1432                          #"TruncatedNormal",
1433                          "TimeSeries_from_file",
1434                          #"Uniform",
1435                          "UserDefined",
1436                          #"Weibull",
1437                          ),
1438                 fr = "Choix du type de la loi marginale",
1439                 ang = "1D marginal distribution",
1440                 defaut = "UserDefined",
1441                 ),
1442
1443
1444 #====
1445 # Definition des parametres selon le type de la loi
1446 #====
1447
1448   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1449
1450   FileName = SIMP ( statut = "o",
1451                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1452                     fr = "Fichier CSV d'une serie temporelle",
1453                     ang = "CSV file of a time series",
1454                     ),
1455               ),
1456
1457
1458
1459    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1460
1461                        # Il faut definir une collection de couples ( x,p )
1462                        Values = SIMP ( statut = 'o',
1463                                        typ = Tuple(2),
1464                                        max = '**',
1465                                        fr = "Liste de couples : (valeur, probabilite)",
1466                                        ang = "List of pairs : (value, probability)",
1467                                        validators=VerifTypeTuple(('R','R')),
1468                                        defaut=((0,0.0),(1,1.0)),
1469                                        ),
1470
1471   ), # Fin BLOC USERDEFINED
1472
1473
1474   ), #fin du block Load Avail
1475
1476
1477   ), #fin du bloc moteur
1478
1479
1480   b_ligne = BLOC (condition = "ComponentType == 'Line'",
1481
1482
1483 #====
1484 # Type de distribution
1485 #====
1486
1487   Type = SIMP (statut= "o", typ = "TXM",
1488                into = ("Line Availability",),
1489                fr = "La disponibilite de la ligne sera tiree",
1490                ang= "Line availability will be set by the law",
1491                defaut = "Line Availability",
1492                ),
1493
1494   Sampling = SIMP (statut= "o", typ = "TXM",
1495                into = ("Same sample for all lines", "One sample per line"),
1496                fr = "Choisir si une seule tirage sera fait pour tous les lignes ou si des tirages differents seront faits pour chaque ligne",
1497                ang= "Choose whether one drawing/sample will be performed for all of the lines or whether a different drawing/sample will be performed for each line.",
1498                defaut = "Same sample for all lines",
1499                ),
1500
1501   Line   = SIMP(statut='o',typ=sd_ligne,max="**", homo="SansOrdreNiDoublon"),
1502
1503   Law = SIMP ( statut = "o", typ = "TXM",
1504                 into = ( #"Exponential",
1505                          #"Histogram",
1506                          #"Normal",
1507                          #"Rayleigh",
1508                          #"PDF_from_file",
1509                          #"TruncatedNormal",
1510                          "TimeSeries_from_file",
1511                          #"Uniform",
1512                          "UserDefined",
1513                          #"Weibull",
1514                          ),
1515                 defaut = "UserDefined",
1516                 fr = "Choix du type de la loi marginale",
1517                 ang = "1D marginal distribution",
1518                 ),
1519
1520
1521 #====
1522 # Definition des parametres selon le type de la loi
1523 #====
1524
1525
1526   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
1527
1528                          Lambda = SIMP ( statut = "o",
1529                                          typ = "R",
1530                                          max = 1,
1531                                          val_min = 0.,
1532                                          fr = "Parametre Lambda | Lambda > 0",
1533                                          ang = "Lambda parameter | Lambda > 0",
1534                                          ),
1535
1536                          Gamma = SIMP ( statut = "o",
1537                                         typ = "R",
1538                                         max = 1,
1539                                         fr = "Borne inferieure du support de la loi",
1540                                         ang = "Support lower bound",
1541                                         ),
1542
1543   ), # Fin BLOC EXPONENTIAL
1544
1545
1546   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
1547
1548                        First = SIMP ( statut = "o",
1549                                     typ = "R",
1550                                     max = 1,
1551                                     fr = "Borne inferieure du supoport de la loi",
1552                                     ang = "Support lower bound",
1553                                     ),
1554
1555                        # Il faut definir une collection de couples ( x,p )
1556                        Values = SIMP ( statut = 'o',
1557                                        typ = Tuple(2),
1558                                        max = '**',
1559                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
1560                                        ang = "Class bandwidth, class height couple list",
1561                                        validators=VerifTypeTuple(('R','R')),
1562                                        ),
1563
1564   ), # Fin BLOC HISTOGRAM
1565
1566
1567    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
1568
1569                     Mu = SIMP ( statut = "o",
1570                                 typ = "R",
1571                                 max = 1,
1572                                 fr = "Moyenne de la loi",
1573                                 ang = "Mean value",
1574                                 ),
1575
1576                    Sigma = SIMP ( statut = "o",
1577                                   typ = "R",
1578                                   max = 1,
1579                                   val_min = 0.,
1580                                   fr = "Ecart type de la loi",
1581                                   ang = "Standard deviation",
1582                                   ),
1583
1584    ), # Fin BLOC NORMAL
1585
1586
1587   RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
1588
1589                    Sigma = SIMP ( statut = "o",
1590                                   typ = "R",
1591                                   max = 1,
1592                                   fr = "Parametre Sigma de la loi | Sigma > 0",
1593                                   ang = "Sigma parameter | Sigma > 0",
1594                                   ),
1595
1596                    Gamma = SIMP ( statut = "o",
1597                                   typ = "R",
1598                                   max = 1,
1599                                   fr = "Borne inferieure du support de la loi",
1600                                   ang = "Support lower bound",
1601                                   ),
1602  ), # Fin BLOC RAYLEIGH
1603
1604   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
1605
1606   FileName = SIMP ( statut = "o",
1607                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1608                     fr = "Nom du fichier .csv",
1609                     ang = ".csv file name",
1610                     ),
1611               ),
1612
1613
1614
1615    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
1616
1617                              MuN = SIMP ( statut = "o",
1618                                           typ = "R",
1619                                           max = 1,
1620                                           fr = "Moyenne de la loi Normale non tronqu�e",
1621                                           ang = "Mean value of the associated non truncated normal distribution",
1622                                           ),
1623
1624                              SigmaN = SIMP ( statut = "o",
1625                                              typ = "R",
1626                                              max = 1,
1627                                              val_min = 0.,
1628                                              fr = "Ecart-type de la loi Normale non tronqu�e",
1629                                              ang = "Standard deviation of the associated non truncated normal distribution",
1630                                              ),
1631
1632                              A = SIMP ( statut = "o",
1633                                         typ = "R",
1634                                         max = 1,
1635                                         fr = "Borne inferieure de la loi | A < B",
1636                                         ang = "Lower bound | A < B",
1637                                         ),
1638
1639                              B = SIMP ( statut = "o",
1640                                         typ = "R",
1641                                         max = 1,
1642                                         fr = "Borne superieure de la loi | A < B",
1643                                         ang = "Upper bound | A < B",
1644                                         ),
1645
1646    ), # Fin BLOC TRUNCATEDNORMAL
1647
1648
1649   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
1650
1651   FileName = SIMP ( statut = "o",
1652                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1653                     fr = "Fichier CSV d'une serie temporelle",
1654                     ang = "CSV file of a time series",
1655                     ),
1656               ),
1657
1658
1659    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
1660
1661                      A = SIMP ( statut = "o",
1662                                 typ = "R",
1663                                 max = 1,
1664                                 fr = "Borne inferieure du support de la loi | A < B",
1665                                 ang = "Support lower bound | A < B",
1666                                 ),
1667
1668                      B = SIMP ( statut = "o",
1669                                 typ = "R",
1670                                 max = 1,
1671                                 fr = "Borne superieure du support de la loi | A < B",
1672                                 ang = "Support upper bound | A < B",
1673                                 ),
1674
1675    ), # Fin BLOC UNIFORM
1676
1677
1678    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
1679
1680                        # Il faut definir une collection de couples ( x,p )
1681                        Values = SIMP ( statut = 'o',
1682                                        typ = Tuple(2),
1683                                        max = '**',
1684                                        fr = "Liste de couples : (valeur, probabilite)",
1685                                        ang = "List of pairs : (value, probability)",
1686                                        validators=VerifTypeTuple(('R','R')),
1687                                        defaut=((0,0.0),(1,1.0)),
1688                                        ),
1689
1690   ), # Fin BLOC USERDEFINED
1691
1692
1693    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
1694
1695                      Settings = SIMP ( statut = "o",
1696                                           typ = "TXM",
1697                                           max = 1,
1698                                           into = ( "AlphaBeta", "MuSigma" ),
1699                                           defaut = "AlphaBeta",
1700                                           fr = "Parametrage de la loi weibull",
1701                                           ang = "Weibull distribution parameter set",
1702                                           ),
1703
1704                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
1705
1706                                          Alpha = SIMP ( statut = "o",
1707                                                         typ = "R",
1708                                                         max = 1,
1709                                                         val_min = 0.,
1710                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
1711                                                         ang = "Alpha parameter | Alpha > 0",
1712                                                         ),
1713
1714                                          Beta = SIMP ( statut = "o",
1715                                                        typ = "R",
1716                                                        max = 1,
1717                                                        val_min = 0.,
1718                                                        fr = "Parametre Beta de la loi | Beta > 0",
1719                                                        ang = "Beta parameter | Beta > 0",
1720                                                        ),
1721
1722                                          ), # Fin BLOC AlphaBeta_Parameters
1723
1724
1725                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1726
1727                                          Mu = SIMP ( statut = "o",
1728                                                      typ = "R",
1729                                                      max = 1,
1730                                                      fr = "Moyenne de la loi",
1731                                                      ang = "Mean value",
1732                                                      ),
1733
1734                                          Sigma = SIMP ( statut = "o",
1735                                                         typ = "R",
1736                                                         max = 1,
1737                                                         val_min = 0.,
1738                                                         fr = "Ecart type de la loi",
1739                                                         ang = "Standard deviation",
1740                                                         ),
1741
1742                                          ), # Fin BLOC MuSigma_Parameters
1743
1744                      Gamma = SIMP ( statut = "o",
1745                                     typ = "R",
1746                                     max = 1,
1747                                     fr = "Borne inferieure du support de la loi",
1748                                     ang = "Support lower bound",
1749                                     ),
1750
1751     ), # Fin BLOC WEIBULL
1752
1753   ), #fin du bloc ligne
1754
1755   b_transfo = BLOC (condition = "ComponentType == 'Transformer'",
1756
1757
1758 #====
1759 # Type de distribution
1760 #====
1761
1762   Type = SIMP (statut= "o", typ = "TXM",
1763                into = ("Transformer Availability",),
1764                fr = "La disponibilite du transformateur sera tiree",
1765                ang= "Transformer availability will be set by the law",
1766                defaut = "Transformer Availability"
1767                ),
1768
1769   Sampling = SIMP (statut= "o", typ = "TXM",
1770                into = ("Same sample for all transformers", "One sample per transformer"),
1771                fr = "Choisir si une seule tirage sera fait pour tous les transforamteurs ou si des tirages differents seront faits pour chaque transformateur",
1772                ang= "Choose whether one drawing/sample will be performed for all of the tranformers or whether a different drawing/sample will be performed for each transformer.",
1773                defaut = "Same sample for all transformers",
1774                ),
1775
1776   Transformer = SIMP(statut='o',typ=sd_transfo,max="**", homo="SansOrdreNiDoublon"),
1777
1778   Law = SIMP ( statut = "o", typ = "TXM",
1779                 into = ( #"Beta",
1780                          #"Exponential",
1781                          #"Gamma",
1782                          #"Geometric",
1783                          #"Gumbel",
1784                          #"Histogram",
1785                          #"Laplace",
1786                          #"Logistic",
1787                          #"LogNormal",
1788                          #"MultiNomial",
1789                          #"NonCentralStudent",
1790                          #"Normal",
1791                          #"Poisson",
1792                          #"Rayleigh",
1793                          #"Student",
1794                          #"PDF_from_file",
1795                          #"Triangular",
1796                          #"TruncatedNormal",
1797                          "TimeSeries_from_file",
1798                          #"Uniform",
1799                          "UserDefined",
1800                          #"Weibull",
1801                          ),
1802                 defaut="UserDefined",
1803                 fr = "Choix du type de la loi marginale",
1804                 ang = "1D marginal distribution",
1805                 ),
1806
1807
1808 #====
1809 # Definition des parametres selon le type de la loi
1810 #====
1811
1812 ##  NONPARAM = BLOC ( condition = " Law in ( 'NonParametrique', ) ",
1813 ##
1814 ##  FileName = SIMP ( statut = "o",
1815 ##                    typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
1816 ##                    fr = "Nom du modele physique",
1817 ##                    ang = "Physical model identifier",
1818 ##                    ),
1819 ##              ),
1820
1821 #  BETA = BLOC ( condition = " Law in ( 'Beta', ) ",
1822 #
1823 #                  Settings = SIMP ( statut = "o",
1824 #                                       typ = "TXM",
1825 #                                       max = 1,
1826 #                                       into = ( "RT", "MuSigma" ),
1827 #                                       defaut = "RT",
1828 #                                       fr = "Parametrage de la loi beta",
1829 #                                       ang = "Beta distribution parameter set",
1830 #                                       ),
1831 #
1832 #                  RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ",
1833 #
1834 #                                      R = SIMP ( statut = "o",
1835 #                                                 typ = "R",
1836 #                                                 max = 1,
1837 #                                                 val_min = 0.,
1838 #                                                 fr = "Parametre R de la loi | R > 0",
1839 #                                                 ang = "R parameter | R > 0",
1840 #                                                 ),
1841 #
1842 #                                      # T > R
1843 #                                      T = SIMP ( statut = "o",
1844 #                                                 typ = "R",
1845 #                                                 max = 1,
1846 #                                                 val_min = 0.,
1847 #                                                 fr = "Parametre T de la loi | T > R",
1848 #                                                 ang = "T parameter | T > R",
1849 #                                                 ),
1850 #
1851 #                                      ), # Fin BLOC RT_Parameters
1852 #
1853 #
1854 #                  MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1855 #
1856 #                                      Mu = SIMP ( statut = "o",
1857 #                                                  typ = "R",
1858 #                                                  max = 1,
1859 #                                                  fr = "Moyenne de la loi",
1860 #                                                  ang = "Mean value",
1861 #                                                  ),
1862 #
1863 #                                      Sigma = SIMP ( statut = "o",
1864 #                                                     typ = "R",
1865 #                                                     max = 1,
1866 #                                                     val_min = 0.,
1867 #                                                     fr = "Ecart type de la loi",
1868 #                                                     ang = "Standard deviation",
1869 #                                                     ),
1870 #
1871 #                                      ), # Fin BLOC MuSigma_Parameters
1872 #
1873 #
1874 #                  A = SIMP ( statut = "o",
1875 #                             typ = "R",
1876 #                             max = 1,
1877 #                             fr = "Borne inferieure du support de la loi",
1878 #                             ang = "Support lower bound",
1879 #                             ),
1880 #
1881 #                  # B > A
1882 #                  B = SIMP ( statut = "o",
1883 #                             typ = "R",
1884 #                             max = 1,
1885 #                             fr = "Borne superieure du support de la loi",
1886 #                             ang = "Support upper bound",
1887 #                             ),
1888 #
1889 #  ), # Fin BLOC BETA
1890
1891
1892
1893   EXPONENTIAL = BLOC ( condition = " Law in ( 'Exponential', ) ",
1894
1895                          Lambda = SIMP ( statut = "o",
1896                                          typ = "R",
1897                                          max = 1,
1898                                          val_min = 0.,
1899                                          fr = "Parametre Lambda | Lambda > 0",
1900                                          ang = "Lambda parameter | Lambda > 0",
1901                                          ),
1902
1903                          Gamma = SIMP ( statut = "o",
1904                                         typ = "R",
1905                                         max = 1,
1906                                         fr = "Borne inferieure du support de la loi",
1907                                         ang = "Support lower bound",
1908                                         ),
1909
1910   ), # Fin BLOC EXPONENTIAL
1911
1912
1913
1914 #  GAMMA = BLOC ( condition = " Law in ( 'Gamma', ) ",
1915 #
1916 #                   Settings = SIMP ( statut = "o",
1917 #                                        typ = "TXM",
1918 #                                        max = 1,
1919 #                                        into = ( "KLambda", "MuSigma" ),
1920 #                                        defaut = "KLambda",
1921 #                                        fr = "Parametrage de la loi gamma",
1922 #                                        ang = "Gamma distribution parameter set",
1923 #                                        ),
1924 #
1925 #                   KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ",
1926 #
1927 #                                       K = SIMP ( statut = "o",
1928 #                                                  typ = "R",
1929 #                                                  max = 1,
1930 #                                                  val_min = 0.,
1931 #                                                  fr = "Parametre K de la loi | K > 0",
1932 #                                                  ang = "K parameter | K > 0",
1933 #                                                  ),
1934 #
1935 #                                       Lambda = SIMP ( statut = "o",
1936 #                                                       typ = "R",
1937 #                                                       max = 1,
1938 #                                                       val_min = 0.,
1939 #                                                       fr = "Parametre Lambda de la loi | Lambda > 0",
1940 #                                                       ang = "Lambda parameter | Lambda > 0",
1941 #                                                       ),
1942 #
1943 #                                       ), # Fin BLOC KLambda_Parameters
1944 #
1945 #
1946 #                   MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
1947 #
1948 #                                       Mu = SIMP ( statut = "o",
1949 #                                                   typ = "R",
1950 #                                                   max = 1,
1951 #                                                   fr = "Moyenne de la loi",
1952 #                                                   ang = "Mean value",
1953 #                                                   ),
1954 #
1955 #                                       Sigma = SIMP ( statut = "o",
1956 #                                                      typ = "R",
1957 #                                                      max = 1,
1958 #                                                      val_min = 0.,
1959 #                                                      fr = "Ecart type de la loi",
1960 #                                                      ang = "Standard deviation",
1961 #                                                      ),
1962 #
1963 #                                       ), # Fin BLOC MuSigma_Parameters
1964 #
1965 #                   Gamma = SIMP ( statut = "o",
1966 #                                  typ = "R",
1967 #                                  max = 1,
1968 #                                  fr = "Borne inferieure du supoport de la loi",
1969 #                                  ang = "Support lower bound",
1970 #                                  ),
1971 #
1972 #
1973 #  ), # Fin BLOC GAMMA
1974
1975
1976 #
1977 #  GEOMETRIC = BLOC ( condition = " Law in ( 'Geometric', ) ",
1978 #
1979 #                       P = SIMP ( statut = "o",
1980 #                                  typ = "R",
1981 #                                  max = 1,
1982 #                                  val_min = 0.,
1983 #                                  val_max = 1.,
1984 #                                  fr = "Parametre P | 0 < P < 1",
1985 #                                  ang = "P parameter | 0 < P < 1",
1986 #                                  ),
1987 #
1988 #  ), # Fin BLOC GEOMETRIC
1989 #
1990 #
1991 #
1992 #  GUMBEL = BLOC ( condition = " Law in ( 'Gumbel', ) ",
1993 #
1994 #                    Settings = SIMP ( statut = "o",
1995 #                                         typ = "TXM",
1996 #                                         max = 1,
1997 #                                         into = ( "AlphaBeta", "MuSigma" ),
1998 #                                         defaut = "AlphaBeta",
1999 #                                         fr = "Parametrage de la loi gumbel",
2000 #                                         ang = "Gumbel distribution parameter set",
2001 #                                         ),
2002 #
2003 #                    AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
2004 #
2005 #                                        Alpha = SIMP ( statut = "o",
2006 #                                                       typ = "R",
2007 #                                                       max = 1,
2008 #                                                       val_min = 0.,
2009 #                                                       fr = "Parametre Alpha de la loi | Alpha > 0",
2010 #                                                       ang = "Alpha parameter | Alpha > 0",
2011 #                                                       ),
2012 #
2013 #                                        Beta = SIMP ( statut = "o",
2014 #                                                      typ = "R",
2015 #                                                      max = 1,
2016 #                                                      fr = "Parametre Beta de la loi",
2017 #                                                      ang = "Beta parameter",
2018 #                                                      ),
2019 #
2020 #                                        ), # Fin BLOC AlphaBeta_Parameters
2021 #
2022 #
2023 #                    MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
2024 #
2025 #                                        Mu = SIMP ( statut = "o",
2026 #                                                    typ = "R",
2027 #                                                    max = 1,
2028 #                                                    fr = "Moyenne de la loi",
2029 #                                                    ang = "Mean value",
2030 #                                                    ),
2031 #
2032 #                                        Sigma = SIMP ( statut = "o",
2033 #                                                       typ = "R",
2034 #                                                       max = 1,
2035 #                                                       val_min = 0.,
2036 #                                                       fr = "Ecart type de la loi",
2037 #                                                       ang = "Standard deviation",
2038 #                                                       ),
2039 #
2040 #                                        ), # Fin BLOC MuSigma_Parameters
2041 #
2042 #  ), # Fin BLOC GUMBEL
2043
2044
2045
2046   HISTOGRAM = BLOC ( condition = " Law in ( 'Histogram', ) ",
2047
2048                        First = SIMP ( statut = "o",
2049                                     typ = "R",
2050                                     max = 1,
2051                                     fr = "Borne inferieure du supoport de la loi",
2052                                     ang = "Support lower bound",
2053                                     ),
2054
2055                        # Il faut definir une collection de couples ( x,p )
2056                        Values = SIMP ( statut = 'o',
2057                                        typ = Tuple(2),
2058                                        max = '**',
2059                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
2060                                        ang = "Class bandwidth, class height couple list",
2061                                        validators=VerifTypeTuple(('R','R')),
2062                                        ),
2063
2064   ), # Fin BLOC HISTOGRAM
2065
2066
2067
2068 #  LAPLACE = BLOC ( condition = " Law in ( 'Laplace', ) ",
2069 #
2070 #                   Lambda = SIMP ( statut = "o",
2071 #                                   typ = "R",
2072 #                                   max = 1,
2073 #                                   val_min = 0.,
2074 #                                   fr = "Parametre Lambda | Lambda > 0",
2075 #                                   ang = "Lambda parameter | Lambda > 0",
2076 #                                   ),
2077 #
2078 #                   Mu = SIMP ( statut = "o",
2079 #                               typ = "R",
2080 #                               max = 1,
2081 #                               fr = "Moyenne de la loi",
2082 #                               ang = "Mean value",
2083 #                              ),
2084 #
2085 #  ), # Fin BLOC LAPLACE
2086 #
2087 #  LOGNORMAL = BLOC ( condition = " Law in ( 'LogNormal', ) ",
2088 #
2089 #                     Settings = SIMP ( statut = "o",
2090 #                                       typ = "TXM",
2091 #                                       max = 1,
2092 #                                       into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ),
2093 #                                       defaut = "MuSigmaLog",
2094 #                                       fr = "Parametrage de la loi lognormale",
2095 #                                       ang = "Lognormal distribution parameter set",
2096 #                                       ),
2097 #
2098 #                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
2099 #
2100 #                                                 Mu = SIMP ( statut = "o",
2101 #                                                             typ = "R",
2102 #                                                             max = 1,
2103 #                                                             fr = "Moyenne de la loi",
2104 #                                                             ang = "Mean value",
2105 #                                                             ),
2106 #
2107 #                                                 Sigma = SIMP ( statut = "o",
2108 #                                                                typ = "R",
2109 #                                                                max = 1,
2110 #                                                                val_min = 0.,
2111 #                                                                fr = "Ecart type de la loi",
2112 #                                                                ang = "Standard deviation",
2113 #                                                                ),
2114 #
2115 #                                                 ), # Fin BLOC MuSigma_Parameters
2116 #
2117 #                     MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ",
2118 #
2119 #                                                 Mu = SIMP ( statut = "o",
2120 #                                                             typ = "R",
2121 #                                                             max = 1,
2122 #                                                             fr = "Moyenne de la loi",
2123 #                                                             ang = "Mean value",
2124 #                                                             ),
2125 #
2126 #                                                 SigmaOverMu = SIMP ( statut = "o",
2127 #                                                                typ = "R",
2128 #                                                                max = 1,
2129 #                                                                val_min = 0.,
2130 #                                                                fr = "Rapport ecart type / moyenne de la loi",
2131 #                                                                ang = "Standard deviation / mean value ratio",
2132 #                                                                ),
2133 #
2134 #                                                 ), # Fin BLOC MuSigmaOverMu_Parameters
2135 #
2136 #                     MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ",
2137 #
2138 #                                                    MuLog = SIMP ( statut = "o",
2139 #                                                                   typ = "R",
2140 #                                                                   max = 1,
2141 #                                                                   fr = "Moyenne du log",
2142 #                                                                   ang = "Log mean value",
2143 #                                                                   ),
2144 #
2145 #                                                    SigmaLog = SIMP ( statut = "o",
2146 #                                                                      typ = "R",
2147 #                                                                      max = 1,
2148 #                                                                      val_min = 0.,
2149 #                                                                      fr = "Ecart type du log",
2150 #                                                                      ang = "Log standard deviation",
2151 #                                                                      ),
2152 #
2153 #                                                    ), # Fin BLOC MuSigmaLog_Parameters
2154 #
2155 #                     Gamma = SIMP ( statut = "o",
2156 #                                    typ = "R",
2157 #                                    max = 1,
2158 #                                    fr = "Borne inferieure du support de la loi",
2159 #                                    ang = "Support lower bound",
2160 #                                    ),
2161 #
2162 #   ), # Fin BLOC LOGNORMAL
2163 #
2164 #
2165 #
2166 #   LOGISTIC = BLOC ( condition = " Law in ( 'Logistic', ) ",
2167 #
2168 #                       Alpha = SIMP ( statut = "o",
2169 #                                      typ = "R",
2170 #                                      max = 1,
2171 #                                      fr = "Borne inferieure du supoport de la loi",
2172 #                                      ang = "Support lower bound",
2173 #                                      ),
2174 #
2175 #                       Beta = SIMP ( statut = "o",
2176 #                                     typ = "R",
2177 #                                     max = 1,
2178 #                                     val_min = 0.,
2179 #                                     fr = "Parametre Beta de la loi | Beta > 0",
2180 #                                     ang = "Beta parameter | Beta > 0",
2181 #                                     ),
2182 #
2183 #   ), # Fin BLOC LOGISTIC
2184 #
2185 #
2186 #
2187 #   MULTINOMIAL = BLOC ( condition = " Law in ( 'MultiNomial', ) ",
2188 #
2189 #                         N = SIMP ( statut = "o",
2190 #                                    typ = "I",
2191 #                                    max = 1,
2192 #                                    fr = "Parametre N de la loi | N > 0",
2193 #                                    ang = "N parameter | N > 0",
2194 #                                    ),
2195 #
2196 #                       # Il faut definir une collection de couples ( x,p )
2197 #                       Values = SIMP ( statut = 'o',
2198 #                                       typ = "R",
2199 #                                       max = '**',
2200 #                                       fr = "Liste de probabilit�s",
2201 #                                       ang = "Probability list",
2202 #                                       validators=VerifTypeTuple(('R','R')),
2203 #                                       ),
2204 #
2205 #   ), # Fin BLOC MULTINOMIAL
2206 #
2207 #
2208 #  NONCENTRALSTUDENT = BLOC ( condition = " Law in ( 'NonCentralStudent', ) ",
2209 #
2210 #                   Nu = SIMP ( statut = "o",
2211 #                               typ = "R",
2212 #                               max = 1,
2213 #                               fr = "Parametre Nu de la loi | Nu > 0",
2214 #                               ang = "Nu parameter | Nu > 0",
2215 #                              ),
2216 #
2217 #                   Delta = SIMP ( statut = "o",
2218 #                                  typ = "R",
2219 #                                  max = 1,
2220 #                                  fr = "Parametre Delta de la loi | Delta > 0",
2221 #                                  ang = "Delta parameter | Delta > 0",
2222 #                                  ),
2223 #
2224 #                   Gamma = SIMP ( statut = "o",
2225 #                                  typ = "R",
2226 #                                  max = 1,
2227 #                                  fr = "Parametre Gamma de centrage de la loi",
2228 #                                  ang = "Gamma parameter",
2229 #                                  ),
2230 #
2231 #  ), # Fin BLOC NONCENTRALSTUDENT
2232
2233
2234    NORMAL = BLOC ( condition = " Law in ( 'Normal', ) ",
2235
2236                     Mu = SIMP ( statut = "o",
2237                                 typ = "R",
2238                                 max = 1,
2239                                 fr = "Moyenne de la loi",
2240                                 ang = "Mean value",
2241                                 ),
2242
2243                    Sigma = SIMP ( statut = "o",
2244                                   typ = "R",
2245                                   max = 1,
2246                                   val_min = 0.,
2247                                   fr = "Ecart type de la loi",
2248                                   ang = "Standard deviation",
2249                                   ),
2250
2251    ), # Fin BLOC NORMAL
2252
2253
2254 #
2255 #   POISSON = BLOC ( condition = " Law in ( 'Poisson', ) ",
2256 #
2257 #                     Lambda = SIMP ( statut = "o",
2258 #                                     typ = "R",
2259 #                                     max = 1,
2260 #                                     val_min = 0.,
2261 #                                     fr = "Parametre Lambda de la loi | Lambda > 0",
2262 #                                     ang = "Lambda parameter | Lambda > 0",
2263 #                                     ),
2264 #
2265 #   ), # Fin BLOC POISSON
2266 #
2267 #
2268 #
2269 #  RAYLEIGH = BLOC ( condition = " Law in ( 'Rayleigh', ) ",
2270 #
2271 #                   Sigma = SIMP ( statut = "o",
2272 #                                  typ = "R",
2273 #                                  max = 1,
2274 #                                  fr = "Parametre Sigma de la loi | Sigma > 0",
2275 #                                  ang = "Sigma parameter | Sigma > 0",
2276 #                                  ),
2277 #
2278 #                   Gamma = SIMP ( statut = "o",
2279 #                                  typ = "R",
2280 #                                  max = 1,
2281 #                                  fr = "Borne inferieure du support de la loi",
2282 #                                  ang = "Support lower bound",
2283 #                                  ),
2284 # ), # Fin BLOC RAYLEIGH
2285
2286   PDF = BLOC ( condition = " Law in ( 'PDF_from_file', ) ",
2287
2288   FileName = SIMP ( statut = "o",
2289                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
2290                     fr = "Nom du fichier .csv",
2291                     ang = ".csv file name",
2292                     ),
2293               ),
2294
2295 #   STUDENT = BLOC ( condition = " Law in ( 'Student', ) ",
2296 #
2297 #                     Mu = SIMP ( statut = "o",
2298 #                                 typ = "R",
2299 #                                 max = 1,
2300 #                                 fr = "Parametre Mu de la loi",
2301 #                                 ang = "Mu parameter",
2302 #                                 ),
2303 #
2304 #                     Nu = SIMP ( statut = "o",
2305 #                                 typ = "R",
2306 #                                 max = 1,
2307 #                                 val_min = 2.,
2308 #                                 fr = "Parametre Nu de la loi | Nu > 2",
2309 #                                 ang = "Nu parameter | Nu > 2",
2310 #                                 ),
2311 #
2312 #                   Sigma = SIMP ( statut = "o",
2313 #                                  typ = "R",
2314 #                                  max = 1,
2315 #                                  fr = "Parametre Sigma de la loi",
2316 #                                  ang = "Sigma parameter",
2317 #                                  ),
2318 #
2319 #   ), # Fin BLOC STUDENT
2320 #
2321 #
2322 #
2323 #   TRIANGULAR = BLOC ( condition = " Law in ( 'Triangular', ) ",
2324 #
2325 #                         A = SIMP ( statut = "o",
2326 #                                    typ = "R",
2327 #                                    max = 1,
2328 #                                    fr = "Borne inferieure du support de la loi | A < M < B",
2329 #                                    ang = "Support lower bound | A < M < B",
2330 #                                    ),
2331 #
2332 #                         M = SIMP ( statut = "o",
2333 #                                    typ = "R",
2334 #                                    max = 1,
2335 #                                    fr = "Mode de la loi | A < M < B",
2336 #                                    ang = "Mode | A < M < B",
2337 #                                    ),
2338 #
2339 #                         B = SIMP ( statut = "o",
2340 #                                    typ = "R",
2341 #                                    max = 1,
2342 #                                    fr = "Borne superieure du support de la loi | A < M < B",
2343 #                                    ang = "Support upper bound | A < M < B",
2344 #                                    ),
2345 #
2346 #   ), # Fin BLOC TRIANGULAR
2347 #
2348 #
2349
2350    TRUNCATEDNORMAL = BLOC ( condition = " Law in ( 'TruncatedNormal', ) ",
2351
2352                              MuN = SIMP ( statut = "o",
2353                                           typ = "R",
2354                                           max = 1,
2355                                           fr = "Moyenne de la loi Normale non tronqu�e",
2356                                           ang = "Mean value of the associated non truncated normal distribution",
2357                                           ),
2358
2359                              SigmaN = SIMP ( statut = "o",
2360                                              typ = "R",
2361                                              max = 1,
2362                                              val_min = 0.,
2363                                              fr = "Ecart-type de la loi Normale non tronqu�e",
2364                                              ang = "Standard deviation of the associated non truncated normal distribution",
2365                                              ),
2366
2367                              A = SIMP ( statut = "o",
2368                                         typ = "R",
2369                                         max = 1,
2370                                         fr = "Borne inferieure de la loi | A < B",
2371                                         ang = "Lower bound | A < B",
2372                                         ),
2373
2374                              B = SIMP ( statut = "o",
2375                                         typ = "R",
2376                                         max = 1,
2377                                         fr = "Borne superieure de la loi | A < B",
2378                                         ang = "Upper bound | A < B",
2379                                         ),
2380
2381    ), # Fin BLOC TRUNCATEDNORMAL
2382
2383
2384   TimeSeries = BLOC ( condition = " Law in ( 'TimeSeries_from_file', ) ",
2385
2386   FileName = SIMP ( statut = "o",
2387                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
2388                     fr = "Fichier CSV d'une serie temporelle",
2389                     ang = "CSV file of a time series",
2390                     ),
2391               ),
2392
2393
2394    UNIFORM = BLOC ( condition = " Law in ( 'Uniform', ) ",
2395
2396                      A = SIMP ( statut = "o",
2397                                 typ = "R",
2398                                 max = 1,
2399                                 fr = "Borne inferieure du support de la loi | A < B",
2400                                 ang = "Support lower bound | A < B",
2401                                 ),
2402
2403                      B = SIMP ( statut = "o",
2404                                 typ = "R",
2405                                 max = 1,
2406                                 fr = "Borne superieure du support de la loi | A < B",
2407                                 ang = "Support upper bound | A < B",
2408                                 ),
2409
2410    ), # Fin BLOC UNIFORM
2411
2412
2413    USERDEFINED = BLOC ( condition = " Law in ( 'UserDefined', ) ",
2414
2415                        # Il faut definir une collection de couples ( x,p )
2416                        Values = SIMP ( statut = 'o',
2417                                        typ = Tuple(2),
2418                                        max = '**',
2419                                        fr = "Liste de couples : (valeur, probabilite)",
2420                                        ang = "List of pairs : (value, probability)",
2421                                        validators=VerifTypeTuple(('R','R')),
2422                                        defaut=((0,0.0),(1,1.0)),
2423                                        ),
2424
2425   ), # Fin BLOC USERDEFINED
2426
2427
2428    WEIBULL = BLOC ( condition = " Law in ( 'Weibull', ) ",
2429
2430                      Settings = SIMP ( statut = "o",
2431                                           typ = "TXM",
2432                                           max = 1,
2433                                           into = ( "AlphaBeta", "MuSigma" ),
2434                                           defaut = "AlphaBeta",
2435                                           fr = "Parametrage de la loi weibull",
2436                                           ang = "Weibull distribution parameter set",
2437                                           ),
2438
2439                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
2440
2441                                          Alpha = SIMP ( statut = "o",
2442                                                         typ = "R",
2443                                                         max = 1,
2444                                                         val_min = 0.,
2445                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
2446                                                         ang = "Alpha parameter | Alpha > 0",
2447                                                         ),
2448
2449                                          Beta = SIMP ( statut = "o",
2450                                                        typ = "R",
2451                                                        max = 1,
2452                                                        val_min = 0.,
2453                                                        fr = "Parametre Beta de la loi | Beta > 0",
2454                                                        ang = "Beta parameter | Beta > 0",
2455                                                        ),
2456
2457                                          ), # Fin BLOC AlphaBeta_Parameters
2458
2459
2460                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
2461
2462                                          Mu = SIMP ( statut = "o",
2463                                                      typ = "R",
2464                                                      max = 1,
2465                                                      fr = "Moyenne de la loi",
2466                                                      ang = "Mean value",
2467                                                      ),
2468
2469                                          Sigma = SIMP ( statut = "o",
2470                                                         typ = "R",
2471                                                         max = 1,
2472                                                         val_min = 0.,
2473                                                         fr = "Ecart type de la loi",
2474                                                         ang = "Standard deviation",
2475                                                         ),
2476
2477                                          ), # Fin BLOC MuSigma_Parameters
2478
2479                      Gamma = SIMP ( statut = "o",
2480                                     typ = "R",
2481                                     max = 1,
2482                                     fr = "Borne inferieure du support de la loi",
2483                                     ang = "Support lower bound",
2484                                     ),
2485
2486     ), # Fin BLOC WEIBULL
2487
2488
2489
2490   ), #fin du bloc transformer
2491
2492
2493 )
2494
2495 Classement_Commandes_Ds_Arbre=('DIRECTORY', 'DISTRIBUTION', 'CORRELATION',)
2496
2497 Ordre_Des_Commandes = ( 'DIRECTORY', 'PSSE_PARAMETERS', 'SIMULATION', 'DISTRIBUTION', 'CORRELATION',
2498                         'N_1_GENERATORS', 'N_1_LINES', 'N_1_TRANSFORMERS', 'N_1_LOADS',)