Salome HOME
Merge branch 'nouvelEficas' of http://git.forge-pleiade.der.edf.fr/git/eficas into...
[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_busbar ( sd_generateur,sd_charge ) : pass
34
35 import types
36 class Tuple:
37   def __init__(self,ntuple):
38     self.ntuple=ntuple
39
40   def __convert__(self,valeur):
41     if type(valeur) == types.StringType:
42       return None
43     if len(valeur) != self.ntuple:
44       return None
45     return valeur
46
47   def info(self):
48     return "Tuple de %s elements" % self.ntuple
49
50   __repr__=info
51   __str__=info
52
53 class Matrice:
54   def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None):
55       self.nbLigs=nbLigs
56       self.nbCols=nbCols
57       self.methodeCalculTaille=methodeCalculTaille
58       self.formatSortie=formatSortie
59       self.valSup=valSup
60       self.valMin=valMin
61       self.structure=structure
62
63   def __convert__(self,valeur):
64     # Attention ne verifie pas grand chose
65     if type(valeur) != types.ListType :
66       return None
67     return valeur
68
69   def info(self):
70       return "Matrice %s x %s" % (self.nbLigs, self.nbCols)
71
72       __repr__=info
73       __str__=info
74
75
76 #CONTEXT.debug = 1
77 JdC = JDC_CATA ( code = 'PSEN',
78                  execmodul = None,
79                  regles = ( AU_MOINS_UN ( 'PARAMETRES_PSSE' ),
80                             AU_MOINS_UN ( 'DIRECTORY' ),
81                             AU_MOINS_UN ( 'DISTRIBUTION' ),
82                             AU_MOINS_UN ( 'SIMULATION' ),
83                             AU_PLUS_UN ( 'PARAMETRES_PSSE' ),
84                             AU_PLUS_UN ( 'DIRECTORY' ),
85                             AU_PLUS_UN ( 'SIMULATION' ),
86                             AU_PLUS_UN ( 'CORRELATION' ),
87                             ),
88                  ) # Fin JDC_CATA
89
90
91 # --------------------------------------------------
92 # fin entete
93 # --------------------------------------------------
94
95 MONGENER =  OPER ( nom = "MONGENER",
96             sd_prod = sd_generateur,
97             UIinfo = {"groupes": ("CACHE")},
98             op = None,
99             fr = "Generateur",
100             ang = "Generator",
101
102   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
103 )
104 MACHARGE =  OPER ( nom = "MACHARGE",
105             sd_prod = sd_charge,
106             UIinfo = {"groupes": ("CACHE")},
107             op = None,
108             fr = "Charge",
109             ang = "Load",
110
111   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
112 )
113 MONBUSBAR =  OPER ( nom = "MONBUSBAR",
114             sd_prod = sd_busbar,
115             UIinfo = {"groupes": ("CACHE")},
116             op = None,
117             fr = "Generateur",
118             ang = "Generator",
119
120   ID = SIMP ( statut = 'o', typ = "TXM", fr = "num bus", ang = "num bus",),
121 )
122
123
124
125 PARAMETRES_PSSE = PROC ( nom = "PARAMETRES_PSSE",
126              op=None,
127              docu = "",
128   COUT_COMBUSTIBLE = SIMP ( statut = "o",
129                      typ=bool,
130                      defaut=True,
131                      ),
132   COUT_DELESTAGE = SIMP ( statut = "o",
133                      typ=bool,
134                      defaut=False,
135                      ),
136   COUT_MVAR = SIMP ( statut = "o",
137                      typ=bool,
138                      defaut=False,
139                     ),
140   IMAP = SIMP ( statut = "o",
141                      typ='TXM',
142                      into=['RateA','RateB','RateC'],
143                      defaut=False,
144                     ),
145
146
147 SIMULATION = PROC ( nom = "SIMULATION",
148              op = None,
149              docu = "",
150   regles             =(EXCLUS('NUMBER_PACKAGE','CONVERGENCE'),),
151                
152   SIZE_PACKAGE = SIMP ( statut = "o",
153                  typ = "I",
154                  val_min=10,
155                  defaut=100,
156                  ),
157   NUMBER_PACKAGE = SIMP ( statut = "f",
158                  typ = "I",
159                  val_min=1,
160                  ),
161   CONVERGENCE = SIMP ( statut = "f",
162                  typ="I",
163                  into=[1],
164                 ),
165
166   STUDY = SIMP ( statut = "o",
167                  typ = "TXM",
168                  into = ( 'N-1', 'Load', 'Wind-1', 'Wind-2', 'PV' ),
169                  max=5,
170                  fr = "Affichage du niveau de wrapper de la bibliotheque Open TURNS",
171                  ang = "Open TURNS library debug level print",
172                  ), 
173
174
175
176
177
178 #================================
179 # Definition des LOIS
180 #================================
181
182 # Nota : les variables de type OPER doivent etre en majuscules !
183 # Nota : les variables de type OPER doivent etre de premier niveau (pas imbriquees dans un autre type)
184 DISTRIBUTION = OPER ( nom = "DISTRIBUTION",
185                       sd_prod = loi,
186                       op = 68,
187                       fr = "Definitions des lois marginales utilisees par les variables d'entree", 
188
189 #====
190 # Choisir generateur ou charge
191 #====
192
193   TypeMachine = SIMP ( statut='o', typ='TXM',
194                       into = ('charge','vent1','vent2','pv','N-1',),
195                       ),
196   TypeComposant = SIMP (statut='o', typ='TXM',
197                       into = ('Generateur','Charge'),),
198   b_gener = BLOC (condition = "TypeComposant == 'Generateur'",
199         #Generateur   = SIMP(statut='o',typ=sd_generateur),),
200         Generateur   = SIMP(statut='o',typ=sd_generateur,max="**", homo="SansOrdreNiDoublon"),),
201   b_charge = BLOC (condition = "TypeComposant == 'Charge'",
202         #charge       = SIMP(statut='o',typ=sd_charge,max="**", homo="SansOrdreNiDoublon"),),                      
203         charge       = SIMP(statut='o',typ=sd_charge),),                      
204                       
205 #====
206 # Type de distribution
207 #====
208
209   Kind = SIMP ( statut = "o", typ = "TXM",
210                 into = ( "NonParametrique", 
211                          #"Beta",
212                          "Exponential",
213                          #"Gamma",
214                          #"Geometric",
215                          #"Gumbel",
216                          "Histogram",
217                          #"Laplace",
218                          #"Logistic",
219                          #"LogNormal",
220                          #"MultiNomial",
221                          #"NonCentralStudent",
222                          "Normal",
223                          #"Poisson",
224                          #"Rayleigh",
225                          #"Student",
226                          "PDF_from_file",
227                          #"Triangular",
228                          "TruncatedNormal",
229                          "Uniform",
230                          "UserDefined",
231                          "Weibull",
232                          ),
233                 fr = "Choix du type de la loi marginale",
234                 ang = "1D marginal distribution",
235                 ),
236
237                       
238 #====
239 # Definition des parametres selon le type de la loi
240 #====
241
242   NONPARAM = BLOC ( condition = " Kind in ( 'NonParametrique', ) ",
243              
244   FileName = SIMP ( statut = "o",
245                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
246                     fr = "Nom du modele physique",
247                     ang = "Physical model identifier",
248                     ),
249               ),
250
251 #  BETA = BLOC ( condition = " Kind in ( 'Beta', ) ",
252 #
253 #                  Settings = SIMP ( statut = "o",
254 #                                       typ = "TXM",
255 #                                       max = 1,
256 #                                       into = ( "RT", "MuSigma" ),
257 #                                       defaut = "RT",
258 #                                       fr = "Parametrage de la loi beta",
259 #                                       ang = "Beta distribution parameter set",
260 #                                       ),
261 #
262 #                  RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ",
263 #
264 #                                      R = SIMP ( statut = "o",
265 #                                                 typ = "R",
266 #                                                 max = 1,
267 #                                                 val_min = 0.,
268 #                                                 fr = "Parametre R de la loi | R > 0",
269 #                                                 ang = "R parameter | R > 0",
270 #                                                 ),
271 #
272 #                                      # T > R
273 #                                      T = SIMP ( statut = "o",
274 #                                                 typ = "R",
275 #                                                 max = 1,
276 #                                                 val_min = 0.,
277 #                                                 fr = "Parametre T de la loi | T > R",
278 #                                                 ang = "T parameter | T > R",
279 #                                                 ),
280 #
281 #                                      ), # Fin BLOC RT_Parameters
282 #
283 #
284 #                  MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
285 #
286 #                                      Mu = SIMP ( statut = "o",
287 #                                                  typ = "R",
288 #                                                  max = 1,
289 #                                                  fr = "Moyenne de la loi",
290 #                                                  ang = "Mean value",
291 #                                                  ),
292 #
293 #                                      Sigma = SIMP ( statut = "o",
294 #                                                     typ = "R",
295 #                                                     max = 1,
296 #                                                     val_min = 0.,
297 #                                                     fr = "Ecart type de la loi",
298 #                                                     ang = "Standard deviation",
299 #                                                     ),
300 #
301 #                                      ), # Fin BLOC MuSigma_Parameters
302 #
303 #
304 #                  A = SIMP ( statut = "o",
305 #                             typ = "R",
306 #                             max = 1,
307 #                             fr = "Borne inferieure du support de la loi",
308 #                             ang = "Support lower bound",
309 #                             ),
310 #
311 #                  # B > A
312 #                  B = SIMP ( statut = "o",
313 #                             typ = "R",
314 #                             max = 1,
315 #                             fr = "Borne superieure du support de la loi",
316 #                             ang = "Support upper bound",
317 #                             ),
318 #
319 #  ), # Fin BLOC BETA
320
321
322
323   EXPONENTIAL = BLOC ( condition = " Kind in ( 'Exponential', ) ",
324
325                          Lambda = SIMP ( statut = "o",
326                                          typ = "R",
327                                          max = 1,
328                                          val_min = 0.,
329                                          fr = "Parametre Lambda | Lambda > 0",
330                                          ang = "Lambda parameter | Lambda > 0",
331                                          ),
332
333                          Gamma = SIMP ( statut = "o",
334                                         typ = "R",
335                                         max = 1,
336                                         fr = "Borne inferieure du support de la loi",
337                                         ang = "Support lower bound",
338                                         ),
339
340   ), # Fin BLOC EXPONENTIAL
341
342
343
344 #  GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ",
345 #
346 #                   Settings = SIMP ( statut = "o",
347 #                                        typ = "TXM",
348 #                                        max = 1,
349 #                                        into = ( "KLambda", "MuSigma" ),
350 #                                        defaut = "KLambda",
351 #                                        fr = "Parametrage de la loi gamma",
352 #                                        ang = "Gamma distribution parameter set",
353 #                                        ),
354 #
355 #                   KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ",
356 #
357 #                                       K = SIMP ( statut = "o",
358 #                                                  typ = "R",
359 #                                                  max = 1,
360 #                                                  val_min = 0.,
361 #                                                  fr = "Parametre K de la loi | K > 0",
362 #                                                  ang = "K parameter | K > 0",
363 #                                                  ),
364 #
365 #                                       Lambda = SIMP ( statut = "o",
366 #                                                       typ = "R",
367 #                                                       max = 1,
368 #                                                       val_min = 0.,
369 #                                                       fr = "Parametre Lambda de la loi | Lambda > 0",
370 #                                                       ang = "Lambda parameter | Lambda > 0",
371 #                                                       ),
372 #
373 #                                       ), # Fin BLOC KLambda_Parameters
374 #
375 #
376 #                   MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
377 #
378 #                                       Mu = SIMP ( statut = "o",
379 #                                                   typ = "R",
380 #                                                   max = 1,
381 #                                                   fr = "Moyenne de la loi",
382 #                                                   ang = "Mean value",
383 #                                                   ),
384 #
385 #                                       Sigma = SIMP ( statut = "o",
386 #                                                      typ = "R",
387 #                                                      max = 1,
388 #                                                      val_min = 0.,
389 #                                                      fr = "Ecart type de la loi",
390 #                                                      ang = "Standard deviation",
391 #                                                      ),
392 #
393 #                                       ), # Fin BLOC MuSigma_Parameters
394 #
395 #                   Gamma = SIMP ( statut = "o",
396 #                                  typ = "R",
397 #                                  max = 1,
398 #                                  fr = "Borne inferieure du supoport de la loi",
399 #                                  ang = "Support lower bound",
400 #                                  ),
401 #
402 #
403 #  ), # Fin BLOC GAMMA
404
405
406 #
407 #  GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ",
408 #
409 #                       P = SIMP ( statut = "o",
410 #                                  typ = "R",
411 #                                  max = 1,
412 #                                  val_min = 0.,
413 #                                  val_max = 1.,
414 #                                  fr = "Parametre P | 0 < P < 1",
415 #                                  ang = "P parameter | 0 < P < 1",
416 #                                  ),
417 #
418 #  ), # Fin BLOC GEOMETRIC
419 #
420 #
421 #
422 #  GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ",
423 #
424 #                    Settings = SIMP ( statut = "o",
425 #                                         typ = "TXM",
426 #                                         max = 1,
427 #                                         into = ( "AlphaBeta", "MuSigma" ),
428 #                                         defaut = "AlphaBeta",
429 #                                         fr = "Parametrage de la loi gumbel",
430 #                                         ang = "Gumbel distribution parameter set",
431 #                                         ),
432 #
433 #                    AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
434 #
435 #                                        Alpha = SIMP ( statut = "o",
436 #                                                       typ = "R",
437 #                                                       max = 1,
438 #                                                       val_min = 0.,
439 #                                                       fr = "Parametre Alpha de la loi | Alpha > 0",
440 #                                                       ang = "Alpha parameter | Alpha > 0",
441 #                                                       ),
442 #
443 #                                        Beta = SIMP ( statut = "o",
444 #                                                      typ = "R",
445 #                                                      max = 1,
446 #                                                      fr = "Parametre Beta de la loi",
447 #                                                      ang = "Beta parameter",
448 #                                                      ),
449 #
450 #                                        ), # Fin BLOC AlphaBeta_Parameters
451 #
452 #
453 #                    MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
454 #
455 #                                        Mu = SIMP ( statut = "o",
456 #                                                    typ = "R",
457 #                                                    max = 1,
458 #                                                    fr = "Moyenne de la loi",
459 #                                                    ang = "Mean value",
460 #                                                    ),
461 #
462 #                                        Sigma = SIMP ( statut = "o",
463 #                                                       typ = "R",
464 #                                                       max = 1,
465 #                                                       val_min = 0.,
466 #                                                       fr = "Ecart type de la loi",
467 #                                                       ang = "Standard deviation",
468 #                                                       ),
469 #
470 #                                        ), # Fin BLOC MuSigma_Parameters
471 #
472 #  ), # Fin BLOC GUMBEL
473
474
475
476   HISTOGRAM = BLOC ( condition = " Kind in ( 'Histogram', ) ",
477
478                        First = SIMP ( statut = "o",
479                                     typ = "R",
480                                     max = 1,
481                                     fr = "Borne inferieure du supoport de la loi",
482                                     ang = "Support lower bound",
483                                     ),
484
485                        # Il faut definir une collection de couples ( x,p ) 
486                        Values = SIMP ( statut = 'o',
487                                        typ = Tuple(2),
488                                        max = '**', 
489                                        fr = "Liste de couples : largeur de classe, hauteur de classe",
490                                        ang = "Class bandwidth, class height couple list",
491                                        validators=VerifTypeTuple(('R','R')),
492                                        ),
493
494   ), # Fin BLOC HISTOGRAM
495
496
497
498 #  LAPLACE = BLOC ( condition = " Kind in ( 'Laplace', ) ",
499 #
500 #                   Lambda = SIMP ( statut = "o",
501 #                                   typ = "R",
502 #                                   max = 1,
503 #                                   val_min = 0.,
504 #                                   fr = "Parametre Lambda | Lambda > 0",
505 #                                   ang = "Lambda parameter | Lambda > 0",
506 #                                   ),
507 #                   
508 #                   Mu = SIMP ( statut = "o",
509 #                               typ = "R",
510 #                               max = 1,
511 #                               fr = "Moyenne de la loi",
512 #                               ang = "Mean value",
513 #                              ),
514 #
515 #  ), # Fin BLOC LAPLACE
516 #
517 #  LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ",
518 #
519 #                     Settings = SIMP ( statut = "o",
520 #                                       typ = "TXM",
521 #                                       max = 1,
522 #                                       into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ),
523 #                                       defaut = "MuSigmaLog",
524 #                                       fr = "Parametrage de la loi lognormale",
525 #                                       ang = "Lognormal distribution parameter set",
526 #                                       ),
527 #
528 #                     MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
529 #
530 #                                                 Mu = SIMP ( statut = "o",
531 #                                                             typ = "R",
532 #                                                             max = 1,
533 #                                                             fr = "Moyenne de la loi",
534 #                                                             ang = "Mean value",
535 #                                                             ),
536 #
537 #                                                 Sigma = SIMP ( statut = "o",
538 #                                                                typ = "R",
539 #                                                                max = 1,
540 #                                                                val_min = 0.,
541 #                                                                fr = "Ecart type de la loi",
542 #                                                                ang = "Standard deviation",
543 #                                                                ),
544 #
545 #                                                 ), # Fin BLOC MuSigma_Parameters
546 #
547 #                     MuSigmaOverMu_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaOverMu', ) ",
548 #
549 #                                                 Mu = SIMP ( statut = "o",
550 #                                                             typ = "R",
551 #                                                             max = 1,
552 #                                                             fr = "Moyenne de la loi",
553 #                                                             ang = "Mean value",
554 #                                                             ),
555 #
556 #                                                 SigmaOverMu = SIMP ( statut = "o",
557 #                                                                typ = "R",
558 #                                                                max = 1,
559 #                                                                val_min = 0.,
560 #                                                                fr = "Rapport ecart type / moyenne de la loi",
561 #                                                                ang = "Standard deviation / mean value ratio",
562 #                                                                ),
563 #
564 #                                                 ), # Fin BLOC MuSigmaOverMu_Parameters
565 #
566 #                     MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ",
567 #
568 #                                                    MuLog = SIMP ( statut = "o",
569 #                                                                   typ = "R",
570 #                                                                   max = 1,
571 #                                                                   fr = "Moyenne du log",
572 #                                                                   ang = "Log mean value",
573 #                                                                   ),
574 #
575 #                                                    SigmaLog = SIMP ( statut = "o",
576 #                                                                      typ = "R",
577 #                                                                      max = 1,
578 #                                                                      val_min = 0.,
579 #                                                                      fr = "Ecart type du log",
580 #                                                                      ang = "Log standard deviation",
581 #                                                                      ),
582 #                                            
583 #                                                    ), # Fin BLOC MuSigmaLog_Parameters
584 #
585 #                     Gamma = SIMP ( statut = "o",
586 #                                    typ = "R",
587 #                                    max = 1,
588 #                                    fr = "Borne inferieure du support de la loi",
589 #                                    ang = "Support lower bound",
590 #                                    ),
591 #
592 #   ), # Fin BLOC LOGNORMAL
593 #
594 #
595 #
596 #   LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ",
597 #
598 #                       Alpha = SIMP ( statut = "o",
599 #                                      typ = "R",
600 #                                      max = 1,
601 #                                      fr = "Borne inferieure du supoport de la loi",
602 #                                      ang = "Support lower bound",
603 #                                      ),
604 #
605 #                       Beta = SIMP ( statut = "o",
606 #                                     typ = "R",
607 #                                     max = 1,
608 #                                     val_min = 0.,
609 #                                     fr = "Parametre Beta de la loi | Beta > 0",
610 #                                     ang = "Beta parameter | Beta > 0",
611 #                                     ),
612 #
613 #   ), # Fin BLOC LOGISTIC
614 #
615 #
616 #
617 #   MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ",
618 #                         
619 #                         N = SIMP ( statut = "o",
620 #                                    typ = "I",
621 #                                    max = 1,
622 #                                    fr = "Parametre N de la loi | N > 0",
623 #                                    ang = "N parameter | N > 0",
624 #                                    ),
625 #
626 #                       # Il faut definir une collection de couples ( x,p ) 
627 #                       Values = SIMP ( statut = 'o',
628 #                                       typ = "R",
629 #                                       max = '**',
630 #                                       fr = "Liste de probabilités",
631 #                                       ang = "Probability list",
632 #                                       validators=VerifTypeTuple(('R','R')),
633 #                                       ),
634 #
635 #   ), # Fin BLOC MULTINOMIAL
636 #
637 #
638 #  NONCENTRALSTUDENT = BLOC ( condition = " Kind in ( 'NonCentralStudent', ) ",
639 #
640 #                   Nu = SIMP ( statut = "o",
641 #                               typ = "R",
642 #                               max = 1,
643 #                               fr = "Parametre Nu de la loi | Nu > 0",
644 #                               ang = "Nu parameter | Nu > 0",
645 #                              ),
646 #
647 #                   Delta = SIMP ( statut = "o",
648 #                                  typ = "R",
649 #                                  max = 1,
650 #                                  fr = "Parametre Delta de la loi | Delta > 0",
651 #                                  ang = "Delta parameter | Delta > 0",
652 #                                  ),
653 #                   
654 #                   Gamma = SIMP ( statut = "o",
655 #                                  typ = "R",
656 #                                  max = 1,
657 #                                  fr = "Parametre Gamma de centrage de la loi",
658 #                                  ang = "Gamma parameter",
659 #                                  ),
660 #
661 #  ), # Fin BLOC NONCENTRALSTUDENT
662
663
664    NORMAL = BLOC ( condition = " Kind in ( 'Normal', ) ",
665
666                     Mu = SIMP ( statut = "o",
667                                 typ = "R",
668                                 max = 1,
669                                 fr = "Moyenne de la loi",
670                                 ang = "Mean value",
671                                 ),
672
673                    Sigma = SIMP ( statut = "o",
674                                   typ = "R",
675                                   max = 1,
676                                   val_min = 0.,
677                                   fr = "Ecart type de la loi",
678                                   ang = "Standard deviation",
679                                   ),
680
681    ), # Fin BLOC NORMAL
682
683
684 #
685 #   POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ",
686 #
687 #                     Lambda = SIMP ( statut = "o",
688 #                                     typ = "R",
689 #                                     max = 1,
690 #                                     val_min = 0.,
691 #                                     fr = "Parametre Lambda de la loi | Lambda > 0",
692 #                                     ang = "Lambda parameter | Lambda > 0",
693 #                                     ),
694 #
695 #   ), # Fin BLOC POISSON
696 #
697 #
698 #
699 #  RAYLEIGH = BLOC ( condition = " Kind in ( 'Rayleigh', ) ",
700 #
701 #                   Sigma = SIMP ( statut = "o",
702 #                                  typ = "R",
703 #                                  max = 1,
704 #                                  fr = "Parametre Sigma de la loi | Sigma > 0",
705 #                                  ang = "Sigma parameter | Sigma > 0",
706 #                                  ),
707 #
708 #                   Gamma = SIMP ( statut = "o",
709 #                                  typ = "R",
710 #                                  max = 1,
711 #                                  fr = "Borne inferieure du support de la loi",
712 #                                  ang = "Support lower bound",
713 #                                  ),
714 # ), # Fin BLOC RAYLEIGH
715
716   PDF = BLOC ( condition = " Kind in ( 'PDF_from_file', ) ",
717              
718   FileName = SIMP ( statut = "o",
719                     typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),
720                     fr = "Nom du modele physique",
721                     ang = "Physical model identifier",
722                     ),
723               ),
724               
725 #   STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ",
726 #
727 #                     Mu = SIMP ( statut = "o",
728 #                                 typ = "R",
729 #                                 max = 1,
730 #                                 fr = "Parametre Mu de la loi",
731 #                                 ang = "Mu parameter",
732 #                                 ),
733 #
734 #                     Nu = SIMP ( statut = "o",
735 #                                 typ = "R",
736 #                                 max = 1,
737 #                                 val_min = 2.,
738 #                                 fr = "Parametre Nu de la loi | Nu > 2",
739 #                                 ang = "Nu parameter | Nu > 2",
740 #                                 ),
741 #
742 #                   Sigma = SIMP ( statut = "o",
743 #                                  typ = "R",
744 #                                  max = 1,
745 #                                  fr = "Parametre Sigma de la loi",
746 #                                  ang = "Sigma parameter",
747 #                                  ),
748 #
749 #   ), # Fin BLOC STUDENT
750 #
751 #
752 #
753 #   TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ",
754 #
755 #                         A = SIMP ( statut = "o",
756 #                                    typ = "R",
757 #                                    max = 1,
758 #                                    fr = "Borne inferieure du support de la loi | A < M < B",
759 #                                    ang = "Support lower bound | A < M < B",
760 #                                    ),
761 #
762 #                         M = SIMP ( statut = "o",
763 #                                    typ = "R",
764 #                                    max = 1,
765 #                                    fr = "Mode de la loi | A < M < B",
766 #                                    ang = "Mode | A < M < B",
767 #                                    ),
768 #
769 #                         B = SIMP ( statut = "o",
770 #                                    typ = "R",
771 #                                    max = 1,
772 #                                    fr = "Borne superieure du support de la loi | A < M < B",
773 #                                    ang = "Support upper bound | A < M < B",
774 #                                    ),
775 #
776 #   ), # Fin BLOC TRIANGULAR
777 #
778 #
779
780    TRUNCATEDNORMAL = BLOC ( condition = " Kind in ( 'TruncatedNormal', ) ",
781
782                              MuN = SIMP ( statut = "o",
783                                           typ = "R",
784                                           max = 1,
785                                           fr = "Moyenne de la loi Normale non tronquée",
786                                           ang = "Mean value of the associated non truncated normal distribution",
787                                           ),
788
789                              SigmaN = SIMP ( statut = "o",
790                                              typ = "R",
791                                              max = 1,
792                                              val_min = 0.,
793                                              fr = "Ecart-type de la loi Normale non tronquée",
794                                              ang = "Standard deviation of the associated non truncated normal distribution",
795                                              ),
796
797                              A = SIMP ( statut = "o",
798                                         typ = "R",
799                                         max = 1,
800                                         fr = "Borne inferieure de la loi | A < B",
801                                         ang = "Lower bound | A < B",
802                                         ),
803
804                              B = SIMP ( statut = "o",
805                                         typ = "R",
806                                         max = 1,
807                                         fr = "Borne superieure de la loi | A < B",
808                                         ang = "Upper bound | A < B",
809                                         ),
810
811    ), # Fin BLOC TRUNCATEDNORMAL
812
813
814
815    UNIFORM = BLOC ( condition = " Kind in ( 'Uniform', ) ",
816
817                      A = SIMP ( statut = "o",
818                                 typ = "R",
819                                 max = 1,
820                                 fr = "Borne inferieure du support de la loi | A < B",
821                                 ang = "Support lower bound | A < B",
822                                 ),
823
824                      B = SIMP ( statut = "o",
825                                 typ = "R",
826                                 max = 1,
827                                 fr = "Borne superieure du support de la loi | A < B",
828                                 ang = "Support upper bound | A < B",
829                                 ),
830
831    ), # Fin BLOC UNIFORM
832
833
834
835    USERDEFINED = BLOC ( condition = " Kind in ( 'UserDefined', ) ",
836
837                            # Il faut definir une collection de couples ( x,p ) 
838                          Fichier = SIMP ( statut = 'o',
839                                          typ =( 'Fichier', 'CSV (*.csv);;All Files (*)',),
840                                       
841                                          ),
842
843    ), # Fin BLOC USERDEFINED
844
845
846
847    WEIBULL = BLOC ( condition = " Kind in ( 'Weibull', ) ",
848
849                      Settings = SIMP ( statut = "o",
850                                           typ = "TXM",
851                                           max = 1,
852                                           into = ( "AlphaBeta", "MuSigma" ),
853                                           defaut = "AlphaBeta",
854                                           fr = "Parametrage de la loi weibull",
855                                           ang = "Weibull distribution parameter set",
856                                           ),
857
858                      AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ",
859
860                                          Alpha = SIMP ( statut = "o",
861                                                         typ = "R",
862                                                         max = 1,
863                                                         val_min = 0.,
864                                                         fr = "Parametre Alpha de la loi | Alpha > 0",
865                                                         ang = "Alpha parameter | Alpha > 0",
866                                                         ),
867
868                                          Beta = SIMP ( statut = "o",
869                                                        typ = "R",
870                                                        max = 1,
871                                                        val_min = 0.,
872                                                        fr = "Parametre Beta de la loi | Beta > 0",
873                                                        ang = "Beta parameter | Beta > 0",
874                                                        ),
875
876                                          ), # Fin BLOC AlphaBeta_Parameters
877
878
879                      MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ",
880
881                                          Mu = SIMP ( statut = "o",
882                                                      typ = "R",
883                                                      max = 1,
884                                                      fr = "Moyenne de la loi",
885                                                      ang = "Mean value",
886                                                      ),
887
888                                          Sigma = SIMP ( statut = "o",
889                                                         typ = "R",
890                                                         max = 1,
891                                                         val_min = 0.,
892                                                         fr = "Ecart type de la loi",
893                                                         ang = "Standard deviation",
894                                                         ),
895
896                                          ), # Fin BLOC MuSigma_Parameters
897
898                      Gamma = SIMP ( statut = "o",
899                                     typ = "R",
900                                     max = 1,
901                                     fr = "Borne inferieure du support de la loi",
902                                     ang = "Support lower bound",
903                                     ),
904
905     ), # Fin BLOC WEIBULL
906
907
908
909
910
911 #================================
912 # Definition du modele physique
913 #================================
914
915
916
917 CORRELATION = PROC ( nom = 'CORRELATION',
918                      op = None,
919                      docu = "",
920                      fr = "Correlation entre variables",
921                      ang = "Variable correlation",
922
923 ####  Copula = SIMP ( statut = "o",
924 ####                  typ = 'TXM',
925 ####                  into = ( "Independent", "Normal" ),
926 ####                  defaut = "Independent",
927 ####                  fr = "Type de la copule",
928 ####                  ang = "Copula kind",
929 ####                  ),
930 ##
931 ## # Matrix = BLOC ( condition = "Copula in ( 'Normal', )",
932 ##                  
933     CorrelationMatrix = SIMP ( statut = "o",
934                                typ = Matrice(nbLigs=None,
935                                              nbCols=None,
936                                              methodeCalculTaille='NbDeDistributions',
937                                              structure="symetrique"),
938                                fr = "Matrice de correlation entre les variables d'entree",
939                                ang = "Correlation matrix for input variables",
940                                ),
941 ##  #), # Fin BLOC Matrix
942 ##
943 ##
944
945
946 DIRECTORY = MACRO ( nom = 'DIRECTORY',
947         op=None,
948         fr = "Chargement des generateurs et des charges",
949         ang = "Physical model wrapper load",
950                 sd_prod = opsPSEN.INCLUDE,
951                 op_init = opsPSEN.INCLUDE_context,
952                 #sd_prod=None,
953                 fichier_ini = 1,
954         
955         fichier_sav=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.sav);;All Files (*)',),),
956         dossier_resultat=SIMP(statut="o",typ='Repertoire'),
957         fichier_lignes=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
958         fichier_groupes=SIMP(statut="o", typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),
959         fichier_parc=SIMP(statut="o" ,typ = ('Fichier', 'Wrapper Files (*.csv);;All Files (*)',),),        
960         chemin_psse=SIMP(statut="o",typ='Repertoire'),
961
962
963
964
965
966
967
968
969
970