Download nataf.procedur

Back to the list

   1 : * NATAF     PROCEDUR  AM        09/12/07    21:15:54     6578           
   2 : debproc nataf tab1*table;
   3 : 
   4 : *-------------------------------------------------------------------------------
   5 : * Operateur NATAF complete et modifie par F. Duprat le 12/05/05
   6 : * Correlations fictives : Liu & Der Kiureghian, PEM, vol.1 1986, p-105-112
   7 : *-------------------------------------------------------------------------------
   8 : 
   9 : *
  10 : *sortie y listreel contenant l'image de X
  11 : * dans l'espace de reference si TAB1 . 'TRANSFORMATION_DIRECTE'=vrai
  12 : * dans l'espace physique si TAB1 . 'TRANSFORMATION_DIRECTE'=faux
  13 : *
  14 : 
  15 : si (non (tab1 . transformation_directe));
  16 : x = tab1 . points_espace_reference;
  17 : sinon;
  18 : x=tab1 . points_espace_physique;
  19 : finsi;
  20 : tab2=tab1 . param_va;
  21 : si (existe tab1 noms_des_variables);
  22 : lm1=tab1 . noms_des_variables;
  23 : finsi;
  24 : nbva = dime tab2;
  25 : Y=PROG;
  26 : 
  27 : si (existe tab1 matcov);
  28 : si (existe tab1 matrice_de_decorrelation);
  29 : lr2=tab1 . matrice_de_decorrelation;
  30 : sinon;
  31 : lrx=tab1 . matcov;
  32 : *-
  33 : * procedure qui calcule une matrice auxiliaire pour nataf
  34 : *-lisree1 = listreel qui contient la partie triangulaire inferieure
  35 : * de la  matrice de covariance
  36 : *
  37 : *- loi pour lesquelles le calcul approche est actuellement disponible:
  38 : * Uniforme, Normal, Lognormale, Exponentielle, Weibull
  39 : *
  40 : * tab2 : tab . i . typva = type de la ieme va
  41 : *        tab . i . ?     =param de la ieme va
  42 : *
  43 : * sortie :
  44 : * lr2 listreel qui contient la matrice triangulaire inferieure
  45 : ********************************************************************
  46 : *
  47 : *calcul de la matrice de correlation equivalente
  48 : *
  49 : laux=prog;
  50 : repe bou1 nbva;
  51 : repe bou2 &bou1;
  52 : *1 remplace par *2
  53 : *1  si (ega &bou1 &bou2);
  54 : *1    laux=laux et (prog (extr (&bou1 + 1 * &bou1 / 2) lrx));
  55 : *1    iterer bou2;
  56 : *1  finsi;
  57 : *2
  58 :  si (ega &bou1 &bou2);
  59 :    baux= extr (&bou1 + 1 * &bou1 / 2) lrx;
  60 : *2
  61 :  sinon;
  62 :    baux = extr (&bou1 - 1 * &bou1 / 2 + &bou2) lrx;
  63 :  finsi;
  64 :  si (ega baux 0.);
  65 :    laux=laux et (prog 0);
  66 :    iterer bou2;
  67 :  finsi;
  68 : *determination du type des va
  69 :  typ1= tab2 . &bou1 . typva;
  70 :  typ2= tab2 . &bou2 . typva;
  71 : 
  72 : * traitement des differents cas
  73 : 
  74 : * Uniforme + Uniforme
  75 :     SI (et (EGA typ1 loi_uniforme)
  76 :            (EGA typ2 loi_uniforme));
  77 :       laux  = laux et (prog ((1.047 - (0.047 * BAUX*BAUX))*BAUX));
  78 :       iterer bou2;
  79 :     finsi;
  80 : 
  81 : * normale standard + normale standard
  82 :     SI (et (EGA typ1 loi_normale_standard)
  83 :            (EGA typ2 loi_normale_standard) );
  84 :       laux = laux et (prog baux);
  85 :       iterer bou2;
  86 :     finsi;
  87 : 
  88 : * exponentielle + exponentielle
  89 :      SI (et (ega typ1 loi_exponentielle)
  90 :             (ega typ2 loi_exponentielle));
  91 :        AUX= (1.229 - (0.367*BAUX) + (0.153*BAUX*BAUX))*BAUX;
  92 :        laux = laux et (prog aux);
  93 :        iterer bou2;
  94 :      finsi;
  95 : 
  96 : * lognormale + lognormale
  97 :      SI (et (ega typ1 loi_lognormale)
  98 :             (ega typ2 loi_lognormale));
  99 :        MOY1 = Tab2 . &bou1 . MOYENNE ;
 100 :        FSIG1= Tab2 . &bou1 . ECART_TYPE;
 101 :        MOY2 = Tab2 . &bou2 . MOYENNE ;
 102 :        FSIG2= Tab2 . &bou2 . ECART_TYPE;
 103 :        CV1 = FSIG1 /MOY1;
 104 :        CV2 = FSIG2 /MOY2;
 105 :        A0 = (LOG (BAUX * CV1 * CV2 + 1.));
 106 :        A2 = (LOG (CV1*CV1+1.))*(LOG (CV2*CV2+1.));
 107 :        AUX = (A0 / (BAUX * (A2**0.5)))*BAUX;
 108 :        laux = laux et (prog aux);
 109 :        iterer bou2;
 110 :      finsi;
 111 : 
 112 : * normale + normale
 113 :      SI (et (ega typ1 loi_normale)(ega typ2 loi_normale));
 114 :             laux = laux et (prog baux);
 115 :              iterer bou2;
 116 :      finsi;
 117 : 
 118 : * Weibull + Weibull
 119 :      SI (et (ega typ1 loi_weibull_min)
 120 :             (ega typ2 loi_weibull_min));
 121 :        TAU1=tab2 . &bou1 . tau;
 122 :        K1=tab2 . &bou1 . K;
 123 :        W1=tab2 . &bou1 . W;
 124 :        AUX = W1 - TAU1;
 125 :        MAUX = GAM1 (1./K1+1.);
 126 :        MO1 = (AUX*MAUX + TAU1);
 127 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 128 :        VA1 = (AUX*(VAUX**0.5));
 129 :        cv1 = va1 / mo1;
 130 :        TAU1=tab2 . &bou2 . tau;
 131 :        K1=tab2 . &bou2 . K;
 132 :        W1=tab2 . &bou2 . W;
 133 :        AUX = W1 - TAU1;
 134 :        MAUX = GAM1 (1./K1+1.);
 135 :        MO1 = (AUX*MAUX + TAU1);
 136 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 137 :        VA1 = (AUX*(VAUX**0.5));
 138 :        cv2 = va1 / mo1;
 139 :        aux = (1.063 - (0.004*baux) - (0.001*baux*baux)
 140 :            - (0.2*(cv1+cv2)) + (0.337*((cv1*cv1)+(cv2*cv2)))
 141 :            + (0.007*baux*(cv1+cv2)) - (0.007*cv1*cv2))*baux;
 142 :        laux = laux et (prog aux);
 143 :        iterer bou2;
 144 :      finsi;
 145 : 
 146 : * gumbel + gumbel
 147 :      SI (et (ega typ1 loi_gumbel_max)
 148 :             (ega typ2 loi_gumbel_max));
 149 :        aux = (1.064 - (0.069*baux) + (0.005*baux*baux))*baux;
 150 :        laux = laux et (prog aux);
 151 :        iterer bou2;
 152 :      finsi;
 153 : 
 154 : * gumbel + normale ou normale standard
 155 :      SI (et (ega typ1 loi_gumbel_max)
 156 :             (ou (ega typ2 loi_normale_standard)
 157 :                 (ega typ2 loi_normale)));
 158 :        aux = 1.031*baux;
 159 :        laux = laux et (prog aux);
 160 :        iterer bou2;
 161 :      finsi;
 162 : 
 163 : * normale ou normale standard + gumbel
 164 :      SI (et (ega typ2 loi_gumbel_max)
 165 :             (ou (ega typ1 loi_normale_standard)
 166 :                 (ega typ1 loi_normale)));
 167 :        aux = 1.031*baux;
 168 :        laux = laux et (prog aux);
 169 :        iterer bou2;
 170 :      finsi;
 171 : 
 172 : * weibull + normale ou normale standard
 173 :      SI (et (ega typ1 loi_weibull_min)
 174 :             (ou (ega typ2 loi_normale_standard)
 175 :                 (ega typ2 loi_normale)));
 176 :        TAU1=tab2 . &bou1 . tau;
 177 :        K1=tab2 . &bou1 . K;
 178 :        W1=tab2 . &bou1 . W;
 179 :        AUX = W1 - TAU1;
 180 :        MAUX = GAM1 (1./K1+1.);
 181 :        MO1 = (AUX*MAUX + TAU1);
 182 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 183 :        VA1 = (AUX*(VAUX**0.5));
 184 :        cv1 = va1 / mo1;
 185 :        aux = (1.031 - (0.195*cv1) + (0.328*cv1*cv1))*baux;
 186 :        laux = laux et (prog aux);
 187 :        iterer bou2;
 188 :      finsi;
 189 : 
 190 : * normale ou normale standard + weibull
 191 :      SI (et (ega typ2 loi_weibull_min)
 192 :             (ou (ega typ1 loi_normale_standard)
 193 :                 (ega typ1 loi_normale)));
 194 :        TAU1=tab2 . &bou2 . tau;
 195 :        K1=tab2 . &bou2 . K;
 196 :        W1=tab2 . &bou2 . W;
 197 :        AUX = W1 - TAU1;
 198 :        MAUX = GAM1 (1./K1+1.);
 199 :        MO1 = (AUX*MAUX + TAU1);
 200 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 201 :        VA1 = (AUX*(VAUX**0.5));
 202 :        cv1 = va1 / mo1;
 203 :        aux = (1.031 - (0.195*cv1) + (0.328*cv1*cv1))*baux;
 204 :        laux = laux et (prog aux);
 205 :        iterer bou2;
 206 :      finsi;
 207 : 
 208 : * uniforme + normale ou normale standard
 209 :      SI (et (ega typ1 loi_uniforme)
 210 :             (ou (ega typ2 loi_normale_standard)
 211 :                 (ega typ2 loi_normale)));
 212 :        AUX  = 1.023 * BAUX;
 213 :        laux=laux et (prog aux);
 214 :        iterer bou2;
 215 :      finsi;
 216 : 
 217 : * normale ou normale standard + uniforme
 218 :      SI (et (ega typ2 loi_uniforme)
 219 :             (ou (ega typ1 loi_normale_standard)
 220 :                 (ega typ1 loi_normale)));
 221 :        AUX  = 1.023 * BAUX;
 222 :        laux=laux et (prog aux);
 223 :        iterer bou2;
 224 :      finsi;
 225 : 
 226 : * exponentielle + normale ou normale standard
 227 :      SI (et (ega typ1 loi_exponentielle)
 228 :             (ou (ega typ2 loi_normale_standard)
 229 :                 (ega typ2 loi_normale)));
 230 :        AUX  = 1.107 * BAUX;
 231 :        laux=laux et (prog aux);
 232 :        iterer bou2;
 233 :      finsi;
 234 : 
 235 : * normale ou normale standard + exponentielle
 236 :      SI (et (ega typ2 loi_exponentielle)
 237 :             (ou (ega typ1 loi_normale_standard)
 238 :                 (ega typ1 loi_normale)));
 239 :        AUX  = 1.107 * BAUX;
 240 :        laux=laux et (prog aux);
 241 :        iterer bou2;
 242 :      finsi;
 243 : 
 244 : * lognormale + normale ou normale standard
 245 :      SI (et (ega typ1 loi_lognormale)
 246 :             (ou (ega typ2 loi_normale_standard)
 247 :                 (ega typ2 loi_normale)));
 248 :         MOY1 = Tab2 . &bou1 . MOYENNE ;
 249 :         FSIG1= Tab2 . &bou1 . ECART_TYPE;
 250 :         CV1 = FSIG1 /MOY1;
 251 :         AUX  = (CV1/((LOG (CV1*CV1+1.))**0.5))*BAUX;
 252 :        laux=laux et (prog aux);
 253 :        iterer bou2;
 254 :      finsi;
 255 : 
 256 : * normale ou normale standard + lognormale
 257 :      SI (et (ega typ2 loi_lognormale)
 258 :             (ou (ega typ1 loi_normale_standard)
 259 :                 (ega typ1 loi_normale)));
 260 :        MOY1 = Tab2 . &bou2 . MOYENNE ;
 261 :        FSIG1= Tab2 . &bou2 . ECART_TYPE;
 262 :        CV1 = FSIG1 /MOY1;
 263 :        AUX  = (CV1/((LOG (CV1*CV1+1.))**0.5))*BAUX;
 264 :        laux=laux et (prog aux);
 265 :        iterer bou2;
 266 :      finsi;
 267 : 
 268 : * normale standard + normale
 269 :      SI (et (ega typ1 loi_normale_standard)
 270 :             (ega typ2 loi_normale));
 271 :       laux=laux et (prog baux);
 272 :       iterer bou2;
 273 :      finsi;
 274 : 
 275 : * normale + normale standard
 276 :      SI (et (ega typ2 loi_normale_standard)
 277 :             (ega typ1 loi_normale));
 278 :       laux=laux et (prog baux);
 279 :       iterer bou2;
 280 :      finsi;
 281 : 
 282 : * gumbel + weibull
 283 :      SI (et (ega typ1 loi_gumbel_max)
 284 :             (ega typ2 loi_weibull_min));
 285 :        TAU1=tab2 . &bou2 . tau;
 286 :        K1=tab2 . &bou2 . K;
 287 :        W1=tab2 . &bou2 . W;
 288 :        AUX = W1 - TAU1;
 289 :        MAUX = GAM1 (1./K1+1.);
 290 :        MO1 = (AUX*MAUX + TAU1);
 291 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 292 :        VA1 = (AUX*(VAUX**0.5));
 293 :        cv1 = va1 / mo1;
 294 :        aux = (1.064 + (0.065*baux) + (0.003*baux*baux)
 295 :            - (0.21*cv1) + (0.356*cv1*cv1) - (0.211*baux*cv1))*baux;
 296 :        laux = laux et (prog aux);
 297 :        iterer bou2;
 298 :      finsi;
 299 : 
 300 : * weibull +gumbel
 301 :      SI (et (ega typ2 loi_gumbel_max)
 302 :             (ega typ1 loi_weibull_min));
 303 :        TAU1=tab2 . &bou1 . tau;
 304 :        K1=tab2 . &bou1 . K;
 305 :        W1=tab2 . &bou1 . W;
 306 :        AUX = W1 - TAU1;
 307 :        MAUX = GAM1 (1./K1+1.);
 308 :        MO1 = (AUX*MAUX + TAU1);
 309 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 310 :        VA1 = (AUX*(VAUX**0.5));
 311 :        cv1 = va1 / mo1;
 312 :        aux = (1.064 + (0.065*baux) + (0.003*baux*baux)
 313 :            - (0.21*cv1) + (0.356*cv1*cv1) - (0.211*baux*cv1))*baux;
 314 :        laux = laux et (prog aux);
 315 :        iterer bou2;
 316 :      finsi;
 317 : 
 318 : * gumbel + uniforme
 319 :      SI (et (ega typ1 loi_gumbel_max)
 320 :             (ega typ2 loi_uniforme));
 321 :        aux = (1.055 + (0.015*baux*baux))*baux;
 322 :        laux = laux et (prog aux);
 323 :        iterer bou2;
 324 :      finsi;
 325 : 
 326 : * uniforme + gumbel
 327 :      SI (et (ega typ2 loi_gumbel_max)
 328 :             (ega typ1 loi_uniforme));
 329 :        aux = (1.055 + (0.015*baux*baux))*baux;
 330 :        laux = laux et (prog aux);
 331 :        iterer bou2;
 332 :      finsi;
 333 : 
 334 : * gumbel + exponentielle
 335 :      SI (et (ega typ1 loi_gumbel_max)
 336 :             (ega typ2 loi_exponentielle));
 337 :        aux = (1.142 - (0.154*baux) + (0.031*baux*baux))*baux;
 338 :        laux = laux et (prog aux);
 339 :        iterer bou2;
 340 :      finsi;
 341 : 
 342 : * exponentielle + gumbel
 343 :      SI (et (ega typ2 loi_gumbel_max)
 344 :             (ega typ1 loi_exponentielle));
 345 :        aux = (1.142 - (0.154*baux) + (0.031*baux*baux))*baux;
 346 :        laux = laux et (prog aux);
 347 :        iterer bou2;
 348 :      finsi;
 349 : 
 350 : * gumbel + lognormale
 351 :      SI (et (ega typ1 loi_gumbel_max)
 352 :             (ega typ2 loi_lognormale));
 353 :        MOY1 = Tab2 . &bou2 . MOYENNE ;
 354 :        FSIG1= Tab2 . &bou2 . ECART_TYPE;
 355 :        CV1 = FSIG1 /MOY1;
 356 :        aux = (1.029 + (0.001*baux) + (0.004*baux*baux)
 357 :            + (0.014*cv1) + (0.233*cv1*cv1) - (0.197*baux*cv1))*baux;
 358 :        laux = laux et (prog aux);
 359 :        iterer bou2;
 360 :      finsi;
 361 : 
 362 : * lognormale + gumbel
 363 :      SI (et (ega typ2 loi_gumbel_max)
 364 :             (ega typ1 loi_lognormale));
 365 :        MOY1 = Tab2 . &bou1 . MOYENNE ;
 366 :        FSIG1= Tab2 . &bou1 . ECART_TYPE;
 367 :        CV1 = FSIG1 /MOY1;
 368 :        aux = (1.029 + (0.001*baux) + (0.004*baux*baux)
 369 :            + (0.014*cv1) + (0.233*cv1*cv1) - (0.197*baux*cv1))*baux;
 370 :        laux = laux et (prog aux);
 371 :        iterer bou2;
 372 :      finsi;
 373 : 
 374 : * uniforme + weibull
 375 :      SI (et (ega typ1 loi_uniforme)
 376 :             (ega typ2 loi_weibull_min));
 377 :        TAU1=tab2 . &bou2 . tau;
 378 :        K1=tab2 . &bou2 . K;
 379 :        W1=tab2 . &bou2 . W;
 380 :        AUX = W1 - TAU1;
 381 :        MAUX = GAM1 (1./K1+1.);
 382 :        MO1 = (AUX*MAUX + TAU1);
 383 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 384 :        VA1 = (AUX*(VAUX**0.5));
 385 :        cv1 = va1 / mo1;
 386 :        AUX = (1.061 - (0.237*cv1) - (0.005*baux*baux)
 387 :            + (0.379*cv1*cv1))*baux;
 388 :        laux=laux et (prog aux);
 389 :        iterer bou2;
 390 :      finsi;
 391 : 
 392 : * weibull + uniforme
 393 :      SI (et (ega typ2 loi_uniforme)
 394 :             (ega typ1 loi_weibull_min));
 395 :        TAU1=tab2 . &bou1 . tau;
 396 :        K1=tab2 . &bou1 . K;
 397 :        W1=tab2 . &bou1 . W;
 398 :        AUX = W1 - TAU1;
 399 :        MAUX = GAM1 (1./K1+1.);
 400 :        MO1 = (AUX*MAUX + TAU1);
 401 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 402 :        VA1 = (AUX*(VAUX**0.5));
 403 :        cv1 = va1 / mo1;
 404 :        AUX = (1.061 - (0.237*cv1) - (0.005*baux*baux)
 405 :            + (0.379*cv1*cv1))*baux;
 406 :        laux=laux et (prog aux);
 407 :        iterer bou2;
 408 :      finsi;
 409 : 
 410 : * exponentielle + weibull
 411 :      SI (et (ega typ1 loi_exponentielle)
 412 :             (ega typ2 loi_weibull_min));
 413 :        TAU1=tab2 . &bou2 . tau;
 414 :        K1=tab2 . &bou2 . K;
 415 :        W1=tab2 . &bou2 . W;
 416 :        AUX = W1 - TAU1;
 417 :        MAUX = GAM1 (1./K1+1.);
 418 :        MO1 = (AUX*MAUX + TAU1);
 419 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 420 :        VA1 = (AUX*(VAUX**0.5));
 421 :        cv1 = va1 / mo1;
 422 :        AUX = (1.147 + (0.145*baux) - (0.271*cv1)
 423 :            + (0.01*baux*baux) + (0.459*cv1*cv1)
 424 :            - (0.467*baux*cv1))*baux;
 425 :        laux=laux et (prog aux);
 426 :        iterer bou2;
 427 :      finsi;
 428 : 
 429 : * weibull + exponentielle
 430 :      SI (et (ega typ2 loi_exponentielle)
 431 :             (ega typ1 loi_weibull_min));
 432 :        TAU1=tab2 . &bou1 . tau;
 433 :        K1=tab2 . &bou1 . K;
 434 :        W1=tab2 . &bou1 . W;
 435 :        AUX = W1 - TAU1;
 436 :        MAUX = GAM1 (1./K1+1.);
 437 :        MO1 = (AUX*MAUX + TAU1);
 438 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 439 :        VA1 = (AUX*(VAUX**0.5));
 440 :        cv1 = va1 / mo1;
 441 :        AUX = (1.147 + (0.145*baux) - (0.271*cv1)
 442 :            + (0.01*baux*baux) + (0.459*cv1*cv1)
 443 :            - (0.467*baux*cv1))*baux;
 444 :        laux=laux et (prog aux);
 445 :        iterer bou2;
 446 :      finsi;
 447 : 
 448 : * lognormale + weibull
 449 :      SI (et (ega typ1 loi_lognormale)
 450 :             (ega typ2 loi_weibull_min));
 451 :        TAU1=tab2 . &bou2 . tau;
 452 :        K1=tab2 . &bou2 . K;
 453 :        W1=tab2 . &bou2 . W;
 454 :        AUX = W1 - TAU1;
 455 :        MAUX = GAM1 (1./K1+1.);
 456 :        MO1 = (AUX*MAUX + TAU1);
 457 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 458 :        VA1 = (AUX*(VAUX**0.5));
 459 :        cv2 = va1 / mo1;
 460 :        MOY1 = Tab2 . &bou1 . MOYENNE ;
 461 :        FSIG1= Tab2 . &bou1 . ECART_TYPE;
 462 :        CV1 = FSIG1 /MOY1;
 463 :        AUX = (1.031 + (0.052*baux) + (0.011*cv1) - (0.21*cv2)
 464 :            + (0.002*baux*baux) + (0.22*cv1*cv1) + (0.35*cv2*cv2)
 465 :            - (0.005*baux*cv1) -(0.174*baux*cv2)
 466 :            + (0.009*cv1*cv2))*baux;
 467 :        laux=laux et (prog aux);
 468 :        iterer bou2;
 469 :      finsi;
 470 : 
 471 : * weibull + lognormale
 472 :      SI (et (ega typ2 loi_lognormale)
 473 :             (ega typ1 loi_weibull_min));
 474 :        TAU1=tab2 . &bou1 . tau;
 475 :        K1=tab2 . &bou1 . K;
 476 :        W1=tab2 . &bou1 . W;
 477 :        AUX = W1 - TAU1;
 478 :        MAUX = GAM1 (1./K1+1.);
 479 :        MO1 = (AUX*MAUX + TAU1);
 480 :        VAUX =(GAM1 (2./K1+1.)) - (MAUX*MAUX);
 481 :        VA1 = (AUX*(VAUX**0.5));
 482 :        cv2 = va1 / mo1;
 483 :        MOY1 = Tab2 . &bou2 . MOYENNE ;
 484 :        FSIG1= Tab2 . &bou2 . ECART_TYPE;
 485 :        CV1 = FSIG1 /MOY1;
 486 :        AUX = (1.031 + (0.052*baux) + (0.011*cv1) - (0.21*cv2)
 487 :            + (0.002*baux*baux) + (0.22*cv1*cv1) + (0.35*cv2*cv2)
 488 :            - (0.005*baux*cv1) -(0.174*baux*cv2)
 489 :            + (0.009*cv1*cv2))*baux;
 490 :        laux=laux et (prog aux);
 491 :        iterer bou2;
 492 :      finsi;
 493 : 
 494 : * uniforme + exponentielle
 495 :      SI (et (ega typ1 loi_uniforme)
 496 :             (ega typ2 loi_exponentielle));
 497 :        AUX = (1.133 + (0.029*BAUX*BAUX))*BAUX;
 498 :        laux=laux et (prog aux);
 499 :        iterer bou2;
 500 :      finsi;
 501 : 
 502 : * exponentielle + uniforme
 503 :      SI (et (ega typ2 loi_uniforme)
 504 :             (ega typ1 loi_exponentielle));
 505 :        AUX = (1.133 + (0.029*BAUX*BAUX))*BAUX;
 506 :        laux=laux et (prog aux);
 507 :        iterer bou2;
 508 :      finsi;
 509 : 
 510 : * Uniforme + lognormale
 511 :      SI (et (ega typ1 loi_uniforme)
 512 :             (ega typ2 loi_lognormale));
 513 :        MOY1 = Tab2 . &bou2 . MOYENNE ;
 514 :        FSIG1= Tab2 . &bou2 . ECART_TYPE;
 515 :        CV1 = FSIG1 /MOY1;
 516 :        AU = 1.019+(0.014*CV1)+(0.01*BAUX*BAUX)+(0.249*CV1*CV1);
 517 :        AUX = AU * BAUX;
 518 :        laux=laux et (prog aux);
 519 :       iterer bou2;
 520 :      finsi;
 521 : 
 522 : * lognormale + uniforme
 523 :      SI (et (ega typ2 loi_uniforme)
 524 :             (ega typ1 loi_lognormale));
 525 :        MOY1 = Tab2 . &bou1 . MOYENNE ;
 526 :        FSIG1= Tab2 . &bou1 . ECART_TYPE;
 527 :        CV1 = FSIG1 /MOY1;
 528 :        AU = 1.019+(0.014*CV1)+(0.01*BAUX*BAUX)+(0.249*CV1*CV1);
 529 :        AUX = AU * BAUX;
 530 :        laux=laux et (prog aux);
 531 :        iterer bou2;
 532 :      finsi;
 533 : 
 534 : * exponentielle + lognormale
 535 :      SI (et (ega typ1 loi_exponentielle )
 536 :             (ega typ2 loi_lognormale));
 537 :        MOY1 = Tab2 . &bou2 . MOYENNE ;
 538 :        FSIG1= Tab2 . &bou2 . ECART_TYPE;
 539 :        CV1 = FSIG1 /MOY1;
 540 :        AX = 1.098+(0.003*BAUX)+(0.019*CV1)+(0.025*BAUX*BAUX);
 541 :        AX = AX+(0.303*CV1*CV1) - (0.437*BAUX*CV1);
 542 :        AUX = AX * BAUX;
 543 :        laux=laux et (prog aux);
 544 :        iterer bou2;
 545 :      finsi;
 546 : 
 547 : * lognormale + exponentielle
 548 :      SI (et (ega typ2  loi_exponentielle )(ega typ1 loi_lognormale));
 549 :        MOY1 = Tab2 . &bou1 . MOYENNE ;
 550 :        FSIG1= Tab2 . &bou1 . ECART_TYPE;
 551 :        CV1 = FSIG1 /MOY1;
 552 :        AX = 1.098+(0.003*BAUX)+(0.019*CV1)+(0.025*BAUX*BAUX);
 553 :        AX = AX+(0.303*CV1*CV1) - (0.437*BAUX*CV1);
 554 :        AUX = AX * BAUX;
 555 :        laux=laux et (prog aux);
 556 :        iterer bou2;
 557 :      finsi;
 558 : 
 559 : fin bou2;
 560 : 
 561 : fin bou1;
 562 : 
 563 : * calcul de la matrice triangulaire inferieure
 564 : * par la methode de cholesky
 565 : 
 566 : lr1=laux;;
 567 : tab= table;
 568 : repe bou1 nbva;
 569 :   tab . &bou1=table;
 570 :  repe bou2 &bou1;
 571 :  si (ega &bou1 &bou2);
 572 :   tab . &bou1 . &bou2 = (extr (&bou1 + 1 * &bou1 / 2) lr1);
 573 :  sinon;
 574 :   tab . &bou1 . &bou2 =extr (&bou1 - 1 * &bou1 / 2 + &bou2) lr1;
 575 :  tab . &bou2 . &bou1 =extr (&bou1 - 1 * &bou1 / 2 + &bou2) lr1;
 576 :  finsi;
 577 :  fin bou2;
 578 : fin bou1;
 579 : tab_2=table;
 580 : repe bou1 nbva;
 581 :  repe bou2 (nbva);
 582 :  baux =tab . &bou1 . &bou2;
 583 :  si (ega &bou1 &bou2);
 584 :     si (ega &bou1  1);
 585 :       tab_2 . &bou2=table;
 586 :       tab_2 . &bou2 . &bou1 = (baux ** 0.5);
 587 :       iterer bou2;
 588 :     sinon;
 589 :       aux1=0;
 590 :       repe bou3 (&bou1 - 1);
 591 :       aux2 = tab_2 . &bou1 . &bou3;
 592 :       aux1 = aux1 + (aux2 * aux2);
 593 :       fin bou3;
 594 :       aux3= (baux -aux1) ** 0.5;
 595 :        tab_2 . &bou2 . &bou1 = aux3;
 596 :        iterer bou2;
 597 :     finsi;
 598 :    finsi;
 599 :  aux1=0;
 600 :      si (ega &bou1 1);
 601 :       tab_2 . &bou2 = table;
 602 :        aux1 = baux / tab_2 . 1 . 1;
 603 :        tab_2 . &bou2 . 1  = aux1;
 604 :        iterer bou2;
 605 :      sinon;
 606 :      si (< &bou2 &bou1);
 607 :      iterer bou2;
 608 :      finsi;
 609 :       repe bou4 (&bou1 - 1);
 610 :       aux2 = tab_2 . (&bou1) . &bou4;
 611 :       aux3 = tab_2 . &bou2 .   &bou4;
 612 :       aux1 = aux1 + (aux2 * aux3);
 613 :       fin bou4;
 614 :       aux5 = tab_2 . (&bou1 ). (&bou1 );
 615 :       aux4 = baux - aux1 / aux5;
 616 :       tab_2 . &bou2 . &bou1 = aux4;
 617 :        iterer bou2;
 618 :       finsi;
 619 :  fin bou2;
 620 :  fin bou1;
 621 : lr2 =prog;
 622 : repeter bou1 nbva;
 623 : repeter bou2 nbva;
 624 : si ( XI 0.);
 663 :      MOY = TPARI . MOYENNE ;
 664 :      FSIG= TPARI . ECART_TYPE;
 665 :      MOY2 = MOY * MOY;
 666 :      FSIG2=FSIG * FSIG;
 667 : *N pour ecart-type et moyenne de la loi normale associe
 668 :      NSIG2=log((MOY2+FSIG2)/MOY2);
 669 :      NSIG = NSIG2 ** 0.5;
 670 :      NMOY = log(moy2/((MOY2+FSIG2)** 0.5));
 671 :      aux=(log xi - NMOY) / NSIG;
 672 :      Y=Y et (prog AUX);
 673 :      finsi;
 674 :      ITERER bou1;
 675 :  finsi;
 676 : 
 677 : * cas general
 678 :  AUX1=REPART  tpari  xi;
 679 :  tpar2=table;
 680 :  tpar2 . typva = loi_normale_standard;
 681 :  aux =finvrepa  tpar2 aux1;
 682 :  Y=Y et (prog AUX);
 683 : 
 684 : fin bou1;
 685 : 
 686 : si (existe tab1 matcov);
 687 :  lry=tab1 . matrice_de_decorrelation;
 688 :  cc = vale dime;
 689 :  si (EGA cc 2);
 690 :     _p0=0 0;
 691 :  sinon;
 692 :     opti dime 3;
 693 :     _p0=0 0 0;
 694 :  finsi;
 695 :  _mp0=manu poi1 _p0;
 696 :  bb=manu rigidite _mp0 lm1 dual lm1 quel lry ;
 697 :  aux2 = manu chpo _mp0 1 (extr 1 lm1) (extr 1 y) nature discret;
 698 :  si (neg nbva 1);
 699 :    repe bou12 (nbva - 1);
 700 :      aux2 = aux2 et
 701 :      ( manu chpo _mp0 1  (extr (&bou12 + 1) lm1) (extr (&bou12 + 1) y)
 702 :      nature discret);
 703 :    fin bou12;
 704 :  finsi;
 705 :  y1 = resou bb aux2;
 706 :  y2 =prog;
 707 :  repe bou13 nbva;
 708 :    y2=y2 et (prog (extr y1 _p0 (extr &bou13 lm1))) ;
 709 :  fin bou13;
 710 :  y=y2;
 711 : finsi;
 712 : tab1 . points_espace_reference =y;
 713 : quitter nataf;
 714 : finsi;
 715 : 
 716 : *transformation de U vers X;
 717 : 
 718 : SI ( non (tab1 . transformation_directe));
 719 :  si (existe tab1 matcov);
 720 :    lry=tab1 . matrice_de_decorrelation;
 721 :    cc = vale dime;
 722 :    si (EGA cc 2);
 723 :      _p0=0 0;
 724 :    sinon;
 725 :      opti dime 3;
 726 :      _p0=0 0 0;
 727 :    finsi;
 728 :    _mp0=manu poi1 _p0;
 729 :    bb=manu rigidite _mp0 lm1 dual lm1 quel lry ;
 730 :    aux2 = manu chpo _mp0 1 (extr 1 lm1) (extr 1 x) nature discret;
 731 :    si (neg nbva 1);
 732 :      repe bou12 (nbva - 1);
 733 :        aux2 = aux2 et
 734 :        (manu chpo _mp0 1  (extr (&bou12 + 1) lm1) (extr (&bou12 + 1) x)
 735 :        nature discret);
 736 :      fin bou12;
 737 :    finsi;
 738 :    y1 =  bb * aux2;
 739 :    y2 =prog;
 740 :    repe bou13 nbva;
 741 :      y2=y2 et (prog (extr y1 _p0 (extr &bou13 lm1))) ;
 742 :    fin bou13;
 743 :    x=y2;
 744 :  finsi;
 745 :  REPE BOU2 NBVA;
 746 :    TVAI=tab2 . &bou2 . typva;
 747 :    TPARI=tab2 . &bou2;
 748 :    XI=EXTR X . &bou2 ;
 749 : 
 750 : *loi normale centree reduite
 751 :    SI (EGA TVAI loi_normale_standard);
 752 :      Y=Y et (prog XI);
 753 :      ITERER bou2;
 754 :    FINSI ;
 755 : 
 756 : *loi normale
 757 :    SI (EGA TVAI loi_normale) ;
 758 :      MOY = TPARI . MOYENNE   ;
 759 :      FSIG= TPARI . ECART_TYPE;
 760 :      AUX=XI * FSIG + MOY  ;
 761 :      Y=Y et (prog AUX)  ;
 762 :      ITERER bou2    ;
 763 :    FINSI    ;
 764 : 
 765 : *loi lognormale
 766 :    SI (EGA TVAI loi_lognormale);
 767 :      MOY = TPARI . MOYENNE ;
 768 :      FSIG= TPARI . ECART_TYPE;
 769 :      MOY2 = MOY * MOY;
 770 :      FSIG2=FSIG * FSIG;
 771 : *N pour ecarttype et moyenne de la loi normale associe
 772 :      NSIG2=log((MOY2+FSIG2)/MOY2);
 773 :      NSIG = NSIG2 ** 0.5;
 774 :      NMOY = log(moy2/((MOY2+FSIG2)** 0.5));
 775 :      aux=exp (XI * NSIG + NMOY) ;
 776 :      Y=Y et (prog AUX);
 777 :      ITERER bou2;
 778 :    finsi;
 779 : 
 780 :    tpar2=table;
 781 :    tpar2 . typva = loi_normale_standard;
 782 :    AUX1=REPART   tpar2 xi;
 783 :    aux =finvrepa   tpari aux1;
 784 :    Y=Y et (prog AUX);
 785 :  fin bou2;
 786 :  tab1 . points_espace_physique=y;
 787 : finsi;
 788 : 
 789 : finproc;
 790 :  

© Cast3M 2003 - All rights reserved.
Disclaimer