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