/usr/lib/python2.7/dist-packages/openturns/simulation.py is in python-openturns 1.5-7build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
"""
Simulation uncertainty propagation algorithms.
"""
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_simulation', [dirname(__file__)])
except ImportError:
import _simulation
return _simulation
if fp is not None:
try:
_mod = imp.load_module('_simulation', fp, pathname, description)
finally:
fp.close()
return _mod
_simulation = swig_import_helper()
del swig_import_helper
else:
import _simulation
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
class SwigPyIterator(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _simulation.delete_SwigPyIterator
__del__ = lambda self : None;
def value(self): return _simulation.SwigPyIterator_value(self)
def incr(self, n=1): return _simulation.SwigPyIterator_incr(self, n)
def decr(self, n=1): return _simulation.SwigPyIterator_decr(self, n)
def distance(self, *args): return _simulation.SwigPyIterator_distance(self, *args)
def equal(self, *args): return _simulation.SwigPyIterator_equal(self, *args)
def copy(self): return _simulation.SwigPyIterator_copy(self)
def next(self): return _simulation.SwigPyIterator_next(self)
def __next__(self): return _simulation.SwigPyIterator___next__(self)
def previous(self): return _simulation.SwigPyIterator_previous(self)
def advance(self, *args): return _simulation.SwigPyIterator_advance(self, *args)
def __eq__(self, *args): return _simulation.SwigPyIterator___eq__(self, *args)
def __ne__(self, *args): return _simulation.SwigPyIterator___ne__(self, *args)
def __iadd__(self, *args): return _simulation.SwigPyIterator___iadd__(self, *args)
def __isub__(self, *args): return _simulation.SwigPyIterator___isub__(self, *args)
def __add__(self, *args): return _simulation.SwigPyIterator___add__(self, *args)
def __sub__(self, *args): return _simulation.SwigPyIterator___sub__(self, *args)
def __iter__(self): return self
SwigPyIterator_swigregister = _simulation.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
GCC_VERSION = _simulation.GCC_VERSION
class TestFailed:
"""TestFailed is used to raise an uniform exception in tests."""
__type = "TestFailed"
def __init__(self, reason=""):
self.reason = reason
def type(self):
return TestFailed.__type
def what(self):
return self.reason
def __str__(self):
return TestFailed.__type + ": " + self.reason
def __lshift__(self, ch):
self.reason += ch
return self
import openturns.base
import openturns.common
import openturns.wrapper
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.diff
import openturns.optim
import openturns.solver
import openturns.algo
import openturns.experiment
import openturns.model_copula
import openturns.transformation
import openturns.analytical
import openturns.metamodel
import openturns.weightedexperiment
import openturns.orthogonalbasis
import openturns.randomvector
class SimulationResultImplementation(openturns.common.PersistentObject):
"""
Simulation result.
Notes
-----
Structure created by the method run() of a :class:`~openturns.Simulation`,
and obtained thanks to the method getResult().
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> limitState = ot.NumericalMathFunction(['E', 'F', 'L', 'I'], ['y'], ['-F*L^3/(3.*E*I)'])
>>> # Enable the history mecanism in order to use the getImportanceFactors method
>>> limitState.enableHistory()
>>> myDistribution = ot.Normal([50., 1., 10., 5.], [1.]*4, ot.IdentityMatrix(4))
>>> output = ot.RandomVector(limitState, ot.RandomVector(myDistribution))
>>> myEvent = ot.Event(output, ot.Less(), -3.0)
>>> myLHS = ot.LHS(myEvent)
>>> myLHS.run()
>>> SimulationLHSResult = myLHS.getResult()
>>> print(SimulationLHSResult.getImportanceFactors())
[marginal 1 : 0.000722617, marginal 2 : 0.635094, marginal 3 : 0.275692, marginal 4 : 0.0884917]
"""
__swig_setmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SimulationResultImplementation, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SimulationResultImplementation, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SimulationResultImplementation_getClassName(self)
def getEvent(self):
"""
Accessor to the event.
Returns
-------
event : :class:`~openturns.Event`
Event we want to evaluate the probability.
"""
return _simulation.SimulationResultImplementation_getEvent(self)
def setEvent(self, *args): return _simulation.SimulationResultImplementation_setEvent(self, *args)
def getProbabilityEstimate(self):
"""
Accessor to the probability estimate.
Returns
-------
probaEstimate : float
Estimate of the event probability.
"""
return _simulation.SimulationResultImplementation_getProbabilityEstimate(self)
def setProbabilityEstimate(self, *args):
"""
Accessor to the probability estimate.
Parameters
----------
probaEstimate : float, :math:`0 \\leq P_e \\leq 1`
Estimate of the event probability.
"""
return _simulation.SimulationResultImplementation_setProbabilityEstimate(self, *args)
def getVarianceEstimate(self):
"""
Accessor to the variance estimate.
Returns
-------
varianceEstimate : float
Variance estimate.
"""
return _simulation.SimulationResultImplementation_getVarianceEstimate(self)
def setVarianceEstimate(self, *args):
"""
Accessor to the variance estimate.
Parameters
----------
varianceEstimate : float, :math:`Var_e \\geq 0`
Variance estimate.
"""
return _simulation.SimulationResultImplementation_setVarianceEstimate(self, *args)
def getCoefficientOfVariation(self):
"""
Accessor to the coefficient of variation.
Returns
-------
coefficient : float
Coefficient of variation of the simulated sample which is equal to
:math:`\\sqrt{Var_e} / P_e` with :math:`Var_e` the variance estimate and
:math:`P_e` the probability estimate.
"""
return _simulation.SimulationResultImplementation_getCoefficientOfVariation(self)
def getStandardDeviation(self):
"""
Accessor to the standard deviation.
Returns
-------
sigma : float
Standard deviation of the estimator at the end of the simulation.
"""
return _simulation.SimulationResultImplementation_getStandardDeviation(self)
def getMeanPointInEventDomain(self):
"""
Accessor to the mean point conditioned to the event realization.
Returns
-------
meanPoint : float sequence
Mean point in the physical space of all the simulations generated by the
:class:`~openturns.Simulation` algorithm that failed into the event domain.
Notes
-----
.. warning::
This notion is only available if the history mecanism of the model is
activated (see :meth:`~openturns.NumericalMathFunction.enableHistory`).
"""
return _simulation.SimulationResultImplementation_getMeanPointInEventDomain(self)
def getImportanceFactors(self):
"""
Accessor to the importance factors.
Returns
-------
importanceFactors : float sequence with description for each component
Importance factors.
Notes
-----
The importance factors :math:`\\alpha_i` are evaluated from the coordinates of
the mean point of event domain :math:`\\vect{X}^*_{event}`, mapped into the
standard space as follows:
.. math::
\\alpha_i = \\displaystyle \\frac{\\left(U_{i}^*\\right)^2}{||\\vect{U}^*||^2}
where :math:`\\vect{U}^* = T(\\vect{X}^*_{event})`
with :math:`T` the iso-probabilistic transformation and the mean point
:math:`\\vect{X}^*_{event} = \\displaystyle \\frac{1}{n} \\sum_{i=1}^{n} \\vect{X}_i 1_{event}(\\vect{X}_i)`.
.. warning::
This notion is only available if the history mecanism of the model is
activated (see :meth:`~openturns.NumericalMathFunction.enableHistory`).
See also
--------
drawImportanceFactors
"""
return _simulation.SimulationResultImplementation_getImportanceFactors(self)
def drawImportanceFactors(self):
"""
Draw the importance factors as an OpenTURNS :class:`~openturns.Graph`.
.. warning::
It is necessary to enable the history of the model to perform this analysis
(see :meth:`~openturns.NumericalMathFunction.enableHistory`).
See also
--------
getImportanceFactors
"""
return _simulation.SimulationResultImplementation_drawImportanceFactors(self)
def getOuterSampling(self):
"""
Accessor to the outer sampling.
Returns
-------
outerSampling : int
Number of groups of terms in the probability simulation estimator.
"""
return _simulation.SimulationResultImplementation_getOuterSampling(self)
def setOuterSampling(self, *args):
"""
Accessor to the outer sampling.
Parameters
----------
outerSampling : int, :math:`outerSampling \\geq 0`
Number of groups of terms in the probability simulation estimator.
"""
return _simulation.SimulationResultImplementation_setOuterSampling(self, *args)
def getBlockSize(self):
"""
Accessor to the block size.
Returns
-------
blockSize : int
Number of terms in the probability simulation estimator grouped together.
"""
return _simulation.SimulationResultImplementation_getBlockSize(self)
def setBlockSize(self, *args):
"""
Accessor to the block size.
Parameters
----------
blockSize : int, :math:`blockSize \\geq 0`
Number of terms in the probability simulation estimator grouped together.
"""
return _simulation.SimulationResultImplementation_setBlockSize(self, *args)
def getConfidenceLength(self, *args):
"""
Accessor to the confidence length.
Parameters
----------
level : float, :math:`level \\in ]0, 1[`
Confidence level. By default, it is :math:`0.95`.
Returns
-------
confidenceLength : float
Length of the confidence interval at the confidence level *level*.
"""
return _simulation.SimulationResultImplementation_getConfidenceLength(self, *args)
def __repr__(self): return _simulation.SimulationResultImplementation___repr__(self)
def __init__(self, *args):
this = _simulation.new_SimulationResultImplementation(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SimulationResultImplementation
__del__ = lambda self : None;
SimulationResultImplementation_swigregister = _simulation.SimulationResultImplementation_swigregister
SimulationResultImplementation_swigregister(SimulationResultImplementation)
class SimulationResultImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
__swig_setmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SimulationResultImplementationTypedInterfaceObject, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SimulationResultImplementationTypedInterfaceObject, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _simulation.new_SimulationResultImplementationTypedInterfaceObject(*args)
try: self.this.append(this)
except: self.this = this
def getImplementation(self, *args):
"""
Accessor to the underlying implementation.
Returns
-------
impl : Implementation
The implementation class.
"""
return _simulation.SimulationResultImplementationTypedInterfaceObject_getImplementation(self, *args)
def setName(self, *args):
"""
Accessor to the object's name.
Parameters
----------
name : string
The name of the object.
"""
return _simulation.SimulationResultImplementationTypedInterfaceObject_setName(self, *args)
def getName(self):
"""
Accessor to the object's name.
Returns
-------
name : string
The name of the object.
"""
return _simulation.SimulationResultImplementationTypedInterfaceObject_getName(self)
def __eq__(self, *args): return _simulation.SimulationResultImplementationTypedInterfaceObject___eq__(self, *args)
__swig_destroy__ = _simulation.delete_SimulationResultImplementationTypedInterfaceObject
__del__ = lambda self : None;
SimulationResultImplementationTypedInterfaceObject_swigregister = _simulation.SimulationResultImplementationTypedInterfaceObject_swigregister
SimulationResultImplementationTypedInterfaceObject_swigregister(SimulationResultImplementationTypedInterfaceObject)
class SimulationResult(SimulationResultImplementationTypedInterfaceObject):
"""
Simulation result.
Notes
-----
Structure created by the method run() of a :class:`~openturns.Simulation`,
and obtained thanks to the method getResult().
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> limitState = ot.NumericalMathFunction(['E', 'F', 'L', 'I'], ['y'], ['-F*L^3/(3.*E*I)'])
>>> # Enable the history mecanism in order to use the getImportanceFactors method
>>> limitState.enableHistory()
>>> myDistribution = ot.Normal([50., 1., 10., 5.], [1.]*4, ot.IdentityMatrix(4))
>>> output = ot.RandomVector(limitState, ot.RandomVector(myDistribution))
>>> myEvent = ot.Event(output, ot.Less(), -3.0)
>>> myLHS = ot.LHS(myEvent)
>>> myLHS.run()
>>> SimulationLHSResult = myLHS.getResult()
>>> print(SimulationLHSResult.getImportanceFactors())
[marginal 1 : 0.000722617, marginal 2 : 0.635094, marginal 3 : 0.275692, marginal 4 : 0.0884917]
"""
__swig_setmethods__ = {}
for _s in [SimulationResultImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SimulationResult, name, value)
__swig_getmethods__ = {}
for _s in [SimulationResultImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SimulationResult, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SimulationResult_getClassName(self)
def getEvent(self):
"""
Accessor to the event.
Returns
-------
event : :class:`~openturns.Event`
Event we want to evaluate the probability.
"""
return _simulation.SimulationResult_getEvent(self)
def getProbabilityEstimate(self):
"""
Accessor to the probability estimate.
Returns
-------
probaEstimate : float
Estimate of the event probability.
"""
return _simulation.SimulationResult_getProbabilityEstimate(self)
def setProbabilityEstimate(self, *args):
"""
Accessor to the probability estimate.
Parameters
----------
probaEstimate : float, :math:`0 \\leq P_e \\leq 1`
Estimate of the event probability.
"""
return _simulation.SimulationResult_setProbabilityEstimate(self, *args)
def getVarianceEstimate(self):
"""
Accessor to the variance estimate.
Returns
-------
varianceEstimate : float
Variance estimate.
"""
return _simulation.SimulationResult_getVarianceEstimate(self)
def setVarianceEstimate(self, *args):
"""
Accessor to the variance estimate.
Parameters
----------
varianceEstimate : float, :math:`Var_e \\geq 0`
Variance estimate.
"""
return _simulation.SimulationResult_setVarianceEstimate(self, *args)
def getCoefficientOfVariation(self):
"""
Accessor to the coefficient of variation.
Returns
-------
coefficient : float
Coefficient of variation of the simulated sample which is equal to
:math:`\\sqrt{Var_e} / P_e` with :math:`Var_e` the variance estimate and
:math:`P_e` the probability estimate.
"""
return _simulation.SimulationResult_getCoefficientOfVariation(self)
def getStandardDeviation(self):
"""
Accessor to the standard deviation.
Returns
-------
sigma : float
Standard deviation of the estimator at the end of the simulation.
"""
return _simulation.SimulationResult_getStandardDeviation(self)
def getMeanPointInEventDomain(self):
"""
Accessor to the mean point conditioned to the event realization.
Returns
-------
meanPoint : float sequence
Mean point in the physical space of all the simulations generated by the
:class:`~openturns.Simulation` algorithm that failed into the event domain.
Notes
-----
.. warning::
This notion is only available if the history mecanism of the model is
activated (see :meth:`~openturns.NumericalMathFunction.enableHistory`).
"""
return _simulation.SimulationResult_getMeanPointInEventDomain(self)
def getImportanceFactors(self):
"""
Accessor to the importance factors.
Returns
-------
importanceFactors : float sequence with description for each component
Importance factors.
Notes
-----
The importance factors :math:`\\alpha_i` are evaluated from the coordinates of
the mean point of event domain :math:`\\vect{X}^*_{event}`, mapped into the
standard space as follows:
.. math::
\\alpha_i = \\displaystyle \\frac{\\left(U_{i}^*\\right)^2}{||\\vect{U}^*||^2}
where :math:`\\vect{U}^* = T(\\vect{X}^*_{event})`
with :math:`T` the iso-probabilistic transformation and the mean point
:math:`\\vect{X}^*_{event} = \\displaystyle \\frac{1}{n} \\sum_{i=1}^{n} \\vect{X}_i 1_{event}(\\vect{X}_i)`.
.. warning::
This notion is only available if the history mecanism of the model is
activated (see :meth:`~openturns.NumericalMathFunction.enableHistory`).
See also
--------
drawImportanceFactors
"""
return _simulation.SimulationResult_getImportanceFactors(self)
def drawImportanceFactors(self):
"""
Draw the importance factors as an OpenTURNS :class:`~openturns.Graph`.
.. warning::
It is necessary to enable the history of the model to perform this analysis
(see :meth:`~openturns.NumericalMathFunction.enableHistory`).
See also
--------
getImportanceFactors
"""
return _simulation.SimulationResult_drawImportanceFactors(self)
def getOuterSampling(self):
"""
Accessor to the outer sampling.
Returns
-------
outerSampling : int
Number of groups of terms in the probability simulation estimator.
"""
return _simulation.SimulationResult_getOuterSampling(self)
def setOuterSampling(self, *args):
"""
Accessor to the outer sampling.
Parameters
----------
outerSampling : int, :math:`outerSampling \\geq 0`
Number of groups of terms in the probability simulation estimator.
"""
return _simulation.SimulationResult_setOuterSampling(self, *args)
def getBlockSize(self):
"""
Accessor to the block size.
Returns
-------
blockSize : int
Number of terms in the probability simulation estimator grouped together.
"""
return _simulation.SimulationResult_getBlockSize(self)
def setBlockSize(self, *args):
"""
Accessor to the block size.
Parameters
----------
blockSize : int, :math:`blockSize \\geq 0`
Number of terms in the probability simulation estimator grouped together.
"""
return _simulation.SimulationResult_setBlockSize(self, *args)
def getConfidenceLength(self, *args):
"""
Accessor to the confidence length.
Parameters
----------
level : float, :math:`level \\in ]0, 1[`
Confidence level. By default, it is :math:`0.95`.
Returns
-------
confidenceLength : float
Length of the confidence interval at the confidence level *level*.
"""
return _simulation.SimulationResult_getConfidenceLength(self, *args)
def __repr__(self): return _simulation.SimulationResult___repr__(self)
def __init__(self, *args):
this = _simulation.new_SimulationResult(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SimulationResult
__del__ = lambda self : None;
SimulationResult_swigregister = _simulation.SimulationResult_swigregister
SimulationResult_swigregister(SimulationResult)
class Simulation(openturns.common.PersistentObject):
"""
Base class for simulations.
Available constructor:
Simulation(*event, verbose=True, convergenceStrategy=ot.Compact()*)
Parameters
----------
event : :class:`~openturns.Event`
The event we are computing the probability of.
verbose : bool
If *True*, make the computation verbose.
convergenceStrategy : :class:`~openturns.HistoryStrategy`
Storage strategy used to store the values of the probability estimator and
its variance during the simulation algorithm.
Notes
-----
A Simulation object can be created only through its derived classes:
:class:`~openturns.DirectionalSampling`, :class:`~openturns.ImportanceSampling`,
:class:`~openturns.LHS`, :class:`~openturns.MonteCarlo`,
:class:`~openturns.PostAnalyticalControlledImportanceSampling`,
:class:`~openturns.PostAnalyticalImportanceSampling`,
:class:`~openturns.QuasiMonteCarlo`, :class:`~openturns.RandomizedLHS`,
:class:`~openturns.RandomizedQuasiMonteCarlo`.
See also
--------
SimulationResult
"""
__swig_setmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Simulation, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, Simulation, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.Simulation_getClassName(self)
def getEvent(self):
"""
Accessor to the event.
Returns
-------
event : :class:`~openturns.Event`
Event we want to evaluate the probability.
"""
return _simulation.Simulation_getEvent(self)
def getResult(self):
"""
Accessor to the results.
Returns
-------
results : :class:`~openturns.SimulationResult`
Structure containing all the results obtained after simulation and created
by the method :py:meth:`run`.
"""
return _simulation.Simulation_getResult(self)
def setMaximumOuterSampling(self, *args):
"""
Accessor to the maximum sample size.
Parameters
----------
outerSampling : int
Maximum number of groups of terms in the probability simulation estimator.
"""
return _simulation.Simulation_setMaximumOuterSampling(self, *args)
def getMaximumOuterSampling(self):
"""
Accessor to the maximum sample size.
Returns
-------
outerSampling : int
Maximum number of groups of terms in the probability simulation estimator.
"""
return _simulation.Simulation_getMaximumOuterSampling(self)
def setMaximumCoefficientOfVariation(self, *args):
"""
Accessor to the maximum coefficient of variation.
Parameters
----------
coefficient : float
Maximum coefficient of variation of the simulated sample.
"""
return _simulation.Simulation_setMaximumCoefficientOfVariation(self, *args)
def getMaximumCoefficientOfVariation(self):
"""
Accessor to the maximum coefficient of variation.
Returns
-------
coefficient : float
Maximum coefficient of variation of the simulated sample.
"""
return _simulation.Simulation_getMaximumCoefficientOfVariation(self)
def setMaximumStandardDeviation(self, *args):
"""
Accessor to the maximum standard deviation.
Parameters
----------
sigma : float, :math:`\\sigma > 0`
Maximum standard deviation of the estimator.
"""
return _simulation.Simulation_setMaximumStandardDeviation(self, *args)
def getMaximumStandardDeviation(self):
"""
Accessor to the maximum standard deviation.
Returns
-------
sigma : float, :math:`\\sigma > 0`
Maximum standard deviation of the estimator.
"""
return _simulation.Simulation_getMaximumStandardDeviation(self)
def setBlockSize(self, *args):
"""
Accessor to the block size.
Parameters
----------
blockSize : int, :math:`blockSize \\geq 1`
Number of terms in the probability simulation estimator grouped together.
It is set by default to 1.
Notes
-----
For Monte Carlo, LHS and Importance Sampling methods, this allows to save space
while allowing multithreading, when available (wrapper function) we recommend
to use the number of available CPUs; for the Directional Sampling, we recommend
to set it to 1.
"""
return _simulation.Simulation_setBlockSize(self, *args)
def getBlockSize(self):
"""
Accessor to the block size.
Returns
-------
blockSize : int
Number of terms in the probability simulation estimator grouped together.
It is set by default to 1.
"""
return _simulation.Simulation_getBlockSize(self)
def setVerbose(self, *args):
"""
Accessor to verbosity.
Parameters
----------
verbosity_enabled : bool
If *True*, make the computation verbose. By default it is verbose.
"""
return _simulation.Simulation_setVerbose(self, *args)
def getVerbose(self):
"""
Accessor to verbosity.
Returns
-------
verbosity_enabled : bool
If *True*, the computation is verbose. By default it is verbose.
"""
return _simulation.Simulation_getVerbose(self)
def setConvergenceStrategy(self, *args):
"""
Accessor to the convergence strategy.
Parameters
----------
storage_strategy : :class:`~openturns.HistoryStrategy`
Storage strategy used to store the values of the probability estimator
and its variance during the simulation algorithm.
"""
return _simulation.Simulation_setConvergenceStrategy(self, *args)
def getConvergenceStrategy(self):
"""
Accessor to the convergence strategy.
Returns
-------
storage_strategy : :class:`~openturns.HistoryStrategy`
Storage strategy used to store the values of the probability estimator
and its variance during the simulation algorithm.
"""
return _simulation.Simulation_getConvergenceStrategy(self)
def __repr__(self): return _simulation.Simulation___repr__(self)
def run(self):
"""
Launch simulation.
Notes
-----
It launches the simulation and creates a :class:`~openturns.SimulationResult`,
structure containing all the results obtained after simulation.
It computes the probability of occurence of the given event by computing the
empirical mean of a sample of size at most *outerSampling * blockSize*,
this sample being built by blocks of size *blockSize*. It allows to use
efficiently the distribution of the computation as well as it allows to deal
with a sample size :math:`> 2^{32}` by a combination of *blockSize* and
*outerSampling*.
see also
--------
setBlockSize, setMaximumOuterSampling, ResourceMap, SimulationResult
"""
return _simulation.Simulation_run(self)
def drawProbabilityConvergence(self, *args):
"""
Draw the probability convergence at a given level.
Parameters
----------
level : float, optional
The probability convergence is drawn at this given confidence length
*level*. By default *level* is 0.95.
Returns
-------
graph : a :class:`~openturns.Graph`
probability convergence graph
"""
return _simulation.Simulation_drawProbabilityConvergence(self, *args)
def __init__(self, *args):
this = _simulation.new_Simulation(*args)
try: self.this.append(this)
except: self.this = this
def setProgressCallback(self, *args):
"""
Set up a progress callback.
Parameters
----------
callback : callable
Takes a float as argument as percentage of progress.
"""
return _simulation.Simulation_setProgressCallback(self, *args)
def setStopCallback(self, *args):
"""
Set up a stop callback.
Parameters
----------
callback : callable
Returns an int deciding whether to stop or continue.
"""
return _simulation.Simulation_setStopCallback(self, *args)
__swig_destroy__ = _simulation.delete_Simulation
__del__ = lambda self : None;
Simulation_swigregister = _simulation.Simulation_swigregister
Simulation_swigregister(Simulation)
class PostAnalyticalSimulation(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, PostAnalyticalSimulation, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, PostAnalyticalSimulation, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.PostAnalyticalSimulation_getClassName(self)
def getAnalyticalResult(self): return _simulation.PostAnalyticalSimulation_getAnalyticalResult(self)
def getControlProbability(self): return _simulation.PostAnalyticalSimulation_getControlProbability(self)
def __repr__(self): return _simulation.PostAnalyticalSimulation___repr__(self)
def __init__(self, *args):
this = _simulation.new_PostAnalyticalSimulation(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_PostAnalyticalSimulation
__del__ = lambda self : None;
PostAnalyticalSimulation_swigregister = _simulation.PostAnalyticalSimulation_swigregister
PostAnalyticalSimulation_swigregister(PostAnalyticalSimulation)
class Wilks(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Wilks, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Wilks, name)
__repr__ = _swig_repr
__swig_getmethods__["ComputeSampleSize"] = lambda x: _simulation.Wilks_ComputeSampleSize
if _newclass:ComputeSampleSize = staticmethod(_simulation.Wilks_ComputeSampleSize)
def computeQuantileBound(self, *args): return _simulation.Wilks_computeQuantileBound(self, *args)
def __init__(self, *args):
this = _simulation.new_Wilks(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_Wilks
__del__ = lambda self : None;
Wilks_swigregister = _simulation.Wilks_swigregister
Wilks_swigregister(Wilks)
def Wilks_ComputeSampleSize(*args):
return _simulation.Wilks_ComputeSampleSize(*args)
Wilks_ComputeSampleSize = _simulation.Wilks_ComputeSampleSize
class MonteCarlo(Simulation):
"""
Monte Carlo method.
Available constructors:
MonteCarlo(*event=ot.Event()*)
Parameters
----------
event : :class:`~openturns.Event`
Event we are computing the probability of.
Notes
-----
Using the probability distribution of a random vector :math:`\\vect{X}`, we seek
to evaluate the following probability:
.. math::
P_f = \\Prob{g\\left( \\vect{X},\\vect{d} \\right) \\leq 0}
Here, :math:`\\vect{X}` is a random vector, :math:`\\vect{d}` a deterministic
vector, :math:`g(\\vect{X},\\vect{d})` the function known as 'limit state function'
which enables the definition of the event
:math:`\\cD_f = \\{\\vect{X} \\in \\Rset^n \\, / \\, g(\\vect{X},\\vect{d}) \\le 0\\}`.
If we have the set :math:`\\left\\{ \\vect{x}_1,\\ldots,\\vect{x}_N \\right\\}` of
:math:`N` independent samples of the random vector :math:`\\vect{X}`, we can
estimate :math:`\\widehat{P}_f` as follows:
.. math::
\\widehat{P}_f = \\frac{1}{N} \\sum_{i=1}^N \\mathbf{1}_{ \\left\\{ g(\\vect{x}_i,\\vect{d}) \\leq 0 \\right\\} }
where :math:`\\mathbf{1}_{ \\left\\{ g(\\vect{x}_i,\\vect{d}) \\leq 0 \\right\\} }`
describes the indicator function equal to 1 if
:math:`g(\\vect{x}_i,\\vect{d}) \\leq 0` and equal to 0 otherwise;
the idea here is in fact to estimate the required probability by the proportion
of cases, among the :math:`N` samples of :math:`\\vect{X}`, for which the event
:math:`\\cD_f` occurs.
By the law of large numbers, we know that this estimation converges to the
required value :math:`P_f` as the sample size :math:`N` tends to infinity.
The Central Limit Theorem allows to build an asymptotic confidence interval
using the normal limit distribution as follows:
.. math::
\\lim_{N\\rightarrow\\infty}\\Prob{P_f\\in[\\widehat{P}_{f,\\inf},\\widehat{P}_{f,\\sup}]}=\\alpha
with :math:`\\widehat{P}_{f,\\inf}=\\widehat{P}_f - q_{\\alpha}\\sqrt{\\frac{\\widehat{P}_f(1-\\widehat{P}_f)}{N}}`,
:math:`\\widehat{P}_{f,\\sup}=\\widehat{P}_f + q_{\\alpha}\\sqrt{\\frac{\\widehat{P}_f(1-\\widehat{P}_f)}{N}}`
and :math:`q_\\alpha` is the :math:`(1+\\alpha)/2`-quantile of the standard
normal distribution.
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> myFunction = ot.NumericalMathFunction(['E', 'F', 'L', 'I'], ['d'], ['-F*L^3/(3*E*I)'])
>>> myDistribution = ot.Normal([50., 1., 10., 5.], [1., 1., 1., 1.], ot.IdentityMatrix(4))
>>> # We create a 'usual' RandomVector from the Distribution
>>> vect = ot.RandomVector(myDistribution)
>>> # We create a composite random vector
>>> output = ot.RandomVector(myFunction, vect)
>>> # We create an Event from this RandomVector
>>> myEvent = ot.Event(output, ot.Less(), -3.0)
>>> # We create a Monte Carlo algorithm
>>> myAlgo = ot.MonteCarlo(myEvent)
>>> myAlgo.setMaximumOuterSampling(250)
>>> myAlgo.setBlockSize(4)
>>> myAlgo.setMaximumCoefficientOfVariation(0.1)
>>> # Perform the simulation
>>> myAlgo.run()
>>> print('Probability estimate=%.6f' % myAlgo.getResult().getProbabilityEstimate())
Probability estimate=0.146505
"""
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, MonteCarlo, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, MonteCarlo, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.MonteCarlo_getClassName(self)
def __repr__(self): return _simulation.MonteCarlo___repr__(self)
def __init__(self, *args):
this = _simulation.new_MonteCarlo(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_MonteCarlo
__del__ = lambda self : None;
MonteCarlo_swigregister = _simulation.MonteCarlo_swigregister
MonteCarlo_swigregister(MonteCarlo)
class LHS(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, LHS, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, LHS, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.LHS_getClassName(self)
def run(self):
"""
Launch simulation.
Notes
-----
It launches the simulation and creates a :class:`~openturns.SimulationResult`,
structure containing all the results obtained after simulation.
It computes the probability of occurence of the given event by computing the
empirical mean of a sample of size at most *outerSampling * blockSize*,
this sample being built by blocks of size *blockSize*. It allows to use
efficiently the distribution of the computation as well as it allows to deal
with a sample size :math:`> 2^{32}` by a combination of *blockSize* and
*outerSampling*.
see also
--------
setBlockSize, setMaximumOuterSampling, ResourceMap, SimulationResult
"""
return _simulation.LHS_run(self)
def __repr__(self): return _simulation.LHS___repr__(self)
def __init__(self, *args):
this = _simulation.new_LHS(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_LHS
__del__ = lambda self : None;
LHS_swigregister = _simulation.LHS_swigregister
LHS_swigregister(LHS)
class RandomizedLHS(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RandomizedLHS, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RandomizedLHS, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RandomizedLHS_getClassName(self)
def __repr__(self): return _simulation.RandomizedLHS___repr__(self)
def __init__(self, *args):
this = _simulation.new_RandomizedLHS(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RandomizedLHS
__del__ = lambda self : None;
RandomizedLHS_swigregister = _simulation.RandomizedLHS_swigregister
RandomizedLHS_swigregister(RandomizedLHS)
class ImportanceSampling(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ImportanceSampling, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, ImportanceSampling, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.ImportanceSampling_getClassName(self)
def getImportanceDistribution(self): return _simulation.ImportanceSampling_getImportanceDistribution(self)
def __repr__(self): return _simulation.ImportanceSampling___repr__(self)
def __init__(self, *args):
this = _simulation.new_ImportanceSampling(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_ImportanceSampling
__del__ = lambda self : None;
ImportanceSampling_swigregister = _simulation.ImportanceSampling_swigregister
ImportanceSampling_swigregister(ImportanceSampling)
class PostAnalyticalControlledImportanceSampling(PostAnalyticalSimulation):
__swig_setmethods__ = {}
for _s in [PostAnalyticalSimulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, PostAnalyticalControlledImportanceSampling, name, value)
__swig_getmethods__ = {}
for _s in [PostAnalyticalSimulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, PostAnalyticalControlledImportanceSampling, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.PostAnalyticalControlledImportanceSampling_getClassName(self)
def __repr__(self): return _simulation.PostAnalyticalControlledImportanceSampling___repr__(self)
def computeBlockSample(self): return _simulation.PostAnalyticalControlledImportanceSampling_computeBlockSample(self)
def __init__(self, *args):
this = _simulation.new_PostAnalyticalControlledImportanceSampling(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_PostAnalyticalControlledImportanceSampling
__del__ = lambda self : None;
PostAnalyticalControlledImportanceSampling_swigregister = _simulation.PostAnalyticalControlledImportanceSampling_swigregister
PostAnalyticalControlledImportanceSampling_swigregister(PostAnalyticalControlledImportanceSampling)
class PostAnalyticalImportanceSampling(PostAnalyticalSimulation):
__swig_setmethods__ = {}
for _s in [PostAnalyticalSimulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, PostAnalyticalImportanceSampling, name, value)
__swig_getmethods__ = {}
for _s in [PostAnalyticalSimulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, PostAnalyticalImportanceSampling, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.PostAnalyticalImportanceSampling_getClassName(self)
def __repr__(self): return _simulation.PostAnalyticalImportanceSampling___repr__(self)
def __init__(self, *args):
this = _simulation.new_PostAnalyticalImportanceSampling(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_PostAnalyticalImportanceSampling
__del__ = lambda self : None;
PostAnalyticalImportanceSampling_swigregister = _simulation.PostAnalyticalImportanceSampling_swigregister
PostAnalyticalImportanceSampling_swigregister(PostAnalyticalImportanceSampling)
class RootStrategyImplementation(openturns.common.PersistentObject):
__swig_setmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RootStrategyImplementation, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RootStrategyImplementation, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RootStrategyImplementation_getClassName(self)
def solve(self, *args): return _simulation.RootStrategyImplementation_solve(self, *args)
def setSolver(self, *args): return _simulation.RootStrategyImplementation_setSolver(self, *args)
def getSolver(self): return _simulation.RootStrategyImplementation_getSolver(self)
def setMaximumDistance(self, *args): return _simulation.RootStrategyImplementation_setMaximumDistance(self, *args)
def getMaximumDistance(self): return _simulation.RootStrategyImplementation_getMaximumDistance(self)
def setStepSize(self, *args): return _simulation.RootStrategyImplementation_setStepSize(self, *args)
def getStepSize(self): return _simulation.RootStrategyImplementation_getStepSize(self)
def setOriginValue(self, *args): return _simulation.RootStrategyImplementation_setOriginValue(self, *args)
def getOriginValue(self): return _simulation.RootStrategyImplementation_getOriginValue(self)
def __repr__(self): return _simulation.RootStrategyImplementation___repr__(self)
def __init__(self, *args):
this = _simulation.new_RootStrategyImplementation(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RootStrategyImplementation
__del__ = lambda self : None;
RootStrategyImplementation_swigregister = _simulation.RootStrategyImplementation_swigregister
RootStrategyImplementation_swigregister(RootStrategyImplementation)
class RootStrategyImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
__swig_setmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RootStrategyImplementationTypedInterfaceObject, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RootStrategyImplementationTypedInterfaceObject, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _simulation.new_RootStrategyImplementationTypedInterfaceObject(*args)
try: self.this.append(this)
except: self.this = this
def getImplementation(self, *args):
"""
Accessor to the underlying implementation.
Returns
-------
impl : Implementation
The implementation class.
"""
return _simulation.RootStrategyImplementationTypedInterfaceObject_getImplementation(self, *args)
def setName(self, *args):
"""
Accessor to the object's name.
Parameters
----------
name : string
The name of the object.
"""
return _simulation.RootStrategyImplementationTypedInterfaceObject_setName(self, *args)
def getName(self):
"""
Accessor to the object's name.
Returns
-------
name : string
The name of the object.
"""
return _simulation.RootStrategyImplementationTypedInterfaceObject_getName(self)
def __eq__(self, *args): return _simulation.RootStrategyImplementationTypedInterfaceObject___eq__(self, *args)
__swig_destroy__ = _simulation.delete_RootStrategyImplementationTypedInterfaceObject
__del__ = lambda self : None;
RootStrategyImplementationTypedInterfaceObject_swigregister = _simulation.RootStrategyImplementationTypedInterfaceObject_swigregister
RootStrategyImplementationTypedInterfaceObject_swigregister(RootStrategyImplementationTypedInterfaceObject)
class RootStrategy(RootStrategyImplementationTypedInterfaceObject):
__swig_setmethods__ = {}
for _s in [RootStrategyImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RootStrategy, name, value)
__swig_getmethods__ = {}
for _s in [RootStrategyImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RootStrategy, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RootStrategy_getClassName(self)
def solve(self, *args): return _simulation.RootStrategy_solve(self, *args)
def setSolver(self, *args): return _simulation.RootStrategy_setSolver(self, *args)
def getSolver(self): return _simulation.RootStrategy_getSolver(self)
def setMaximumDistance(self, *args): return _simulation.RootStrategy_setMaximumDistance(self, *args)
def getMaximumDistance(self): return _simulation.RootStrategy_getMaximumDistance(self)
def setStepSize(self, *args): return _simulation.RootStrategy_setStepSize(self, *args)
def getStepSize(self): return _simulation.RootStrategy_getStepSize(self)
def setOriginValue(self, *args): return _simulation.RootStrategy_setOriginValue(self, *args)
def getOriginValue(self): return _simulation.RootStrategy_getOriginValue(self)
def __repr__(self): return _simulation.RootStrategy___repr__(self)
def __init__(self, *args):
this = _simulation.new_RootStrategy(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RootStrategy
__del__ = lambda self : None;
RootStrategy_swigregister = _simulation.RootStrategy_swigregister
RootStrategy_swigregister(RootStrategy)
class SamplingStrategyImplementation(openturns.common.PersistentObject):
__swig_setmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SamplingStrategyImplementation, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SamplingStrategyImplementation, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SamplingStrategyImplementation_getClassName(self)
def generate(self): return _simulation.SamplingStrategyImplementation_generate(self)
def getUniformUnitVectorRealization(self, *args): return _simulation.SamplingStrategyImplementation_getUniformUnitVectorRealization(self, *args)
def setDimension(self, *args): return _simulation.SamplingStrategyImplementation_setDimension(self, *args)
def getDimension(self): return _simulation.SamplingStrategyImplementation_getDimension(self)
def __repr__(self): return _simulation.SamplingStrategyImplementation___repr__(self)
def __init__(self, *args):
this = _simulation.new_SamplingStrategyImplementation(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SamplingStrategyImplementation
__del__ = lambda self : None;
SamplingStrategyImplementation_swigregister = _simulation.SamplingStrategyImplementation_swigregister
SamplingStrategyImplementation_swigregister(SamplingStrategyImplementation)
class SamplingStrategyImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
__swig_setmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SamplingStrategyImplementationTypedInterfaceObject, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SamplingStrategyImplementationTypedInterfaceObject, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _simulation.new_SamplingStrategyImplementationTypedInterfaceObject(*args)
try: self.this.append(this)
except: self.this = this
def getImplementation(self, *args):
"""
Accessor to the underlying implementation.
Returns
-------
impl : Implementation
The implementation class.
"""
return _simulation.SamplingStrategyImplementationTypedInterfaceObject_getImplementation(self, *args)
def setName(self, *args):
"""
Accessor to the object's name.
Parameters
----------
name : string
The name of the object.
"""
return _simulation.SamplingStrategyImplementationTypedInterfaceObject_setName(self, *args)
def getName(self):
"""
Accessor to the object's name.
Returns
-------
name : string
The name of the object.
"""
return _simulation.SamplingStrategyImplementationTypedInterfaceObject_getName(self)
def __eq__(self, *args): return _simulation.SamplingStrategyImplementationTypedInterfaceObject___eq__(self, *args)
__swig_destroy__ = _simulation.delete_SamplingStrategyImplementationTypedInterfaceObject
__del__ = lambda self : None;
SamplingStrategyImplementationTypedInterfaceObject_swigregister = _simulation.SamplingStrategyImplementationTypedInterfaceObject_swigregister
SamplingStrategyImplementationTypedInterfaceObject_swigregister(SamplingStrategyImplementationTypedInterfaceObject)
class SamplingStrategy(SamplingStrategyImplementationTypedInterfaceObject):
__swig_setmethods__ = {}
for _s in [SamplingStrategyImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SamplingStrategy, name, value)
__swig_getmethods__ = {}
for _s in [SamplingStrategyImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SamplingStrategy, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SamplingStrategy_getClassName(self)
def generate(self): return _simulation.SamplingStrategy_generate(self)
def setDimension(self, *args): return _simulation.SamplingStrategy_setDimension(self, *args)
def getDimension(self): return _simulation.SamplingStrategy_getDimension(self)
def __repr__(self): return _simulation.SamplingStrategy___repr__(self)
def __init__(self, *args):
this = _simulation.new_SamplingStrategy(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SamplingStrategy
__del__ = lambda self : None;
SamplingStrategy_swigregister = _simulation.SamplingStrategy_swigregister
SamplingStrategy_swigregister(SamplingStrategy)
class DirectionalSampling(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, DirectionalSampling, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, DirectionalSampling, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.DirectionalSampling_getClassName(self)
def setRootStrategy(self, *args): return _simulation.DirectionalSampling_setRootStrategy(self, *args)
def getRootStrategy(self): return _simulation.DirectionalSampling_getRootStrategy(self)
def setSamplingStrategy(self, *args): return _simulation.DirectionalSampling_setSamplingStrategy(self, *args)
def getSamplingStrategy(self): return _simulation.DirectionalSampling_getSamplingStrategy(self)
def __repr__(self): return _simulation.DirectionalSampling___repr__(self)
def __init__(self, *args):
this = _simulation.new_DirectionalSampling(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_DirectionalSampling
__del__ = lambda self : None;
DirectionalSampling_swigregister = _simulation.DirectionalSampling_swigregister
DirectionalSampling_swigregister(DirectionalSampling)
class OrthogonalDirection(SamplingStrategyImplementation):
__swig_setmethods__ = {}
for _s in [SamplingStrategyImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OrthogonalDirection, name, value)
__swig_getmethods__ = {}
for _s in [SamplingStrategyImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, OrthogonalDirection, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.OrthogonalDirection_getClassName(self)
def generate(self): return _simulation.OrthogonalDirection_generate(self)
def __repr__(self): return _simulation.OrthogonalDirection___repr__(self)
def getUniformOrientationRealization(self): return _simulation.OrthogonalDirection_getUniformOrientationRealization(self)
def __init__(self, *args):
this = _simulation.new_OrthogonalDirection(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_OrthogonalDirection
__del__ = lambda self : None;
OrthogonalDirection_swigregister = _simulation.OrthogonalDirection_swigregister
OrthogonalDirection_swigregister(OrthogonalDirection)
class RandomDirection(SamplingStrategyImplementation):
__swig_setmethods__ = {}
for _s in [SamplingStrategyImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RandomDirection, name, value)
__swig_getmethods__ = {}
for _s in [SamplingStrategyImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RandomDirection, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RandomDirection_getClassName(self)
def generate(self): return _simulation.RandomDirection_generate(self)
def __repr__(self): return _simulation.RandomDirection___repr__(self)
def __init__(self, *args):
this = _simulation.new_RandomDirection(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RandomDirection
__del__ = lambda self : None;
RandomDirection_swigregister = _simulation.RandomDirection_swigregister
RandomDirection_swigregister(RandomDirection)
class MediumSafe(RootStrategyImplementation):
__swig_setmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, MediumSafe, name, value)
__swig_getmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, MediumSafe, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.MediumSafe_getClassName(self)
def solve(self, *args): return _simulation.MediumSafe_solve(self, *args)
def __repr__(self): return _simulation.MediumSafe___repr__(self)
def __init__(self, *args):
this = _simulation.new_MediumSafe(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_MediumSafe
__del__ = lambda self : None;
MediumSafe_swigregister = _simulation.MediumSafe_swigregister
MediumSafe_swigregister(MediumSafe)
class RiskyAndFast(RootStrategyImplementation):
__swig_setmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RiskyAndFast, name, value)
__swig_getmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RiskyAndFast, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RiskyAndFast_getClassName(self)
def solve(self, *args): return _simulation.RiskyAndFast_solve(self, *args)
def __repr__(self): return _simulation.RiskyAndFast___repr__(self)
def __init__(self, *args):
this = _simulation.new_RiskyAndFast(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RiskyAndFast
__del__ = lambda self : None;
RiskyAndFast_swigregister = _simulation.RiskyAndFast_swigregister
RiskyAndFast_swigregister(RiskyAndFast)
class SafeAndSlow(RootStrategyImplementation):
__swig_setmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SafeAndSlow, name, value)
__swig_getmethods__ = {}
for _s in [RootStrategyImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SafeAndSlow, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SafeAndSlow_getClassName(self)
def solve(self, *args): return _simulation.SafeAndSlow_solve(self, *args)
def __repr__(self): return _simulation.SafeAndSlow___repr__(self)
def __init__(self, *args):
this = _simulation.new_SafeAndSlow(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SafeAndSlow
__del__ = lambda self : None;
SafeAndSlow_swigregister = _simulation.SafeAndSlow_swigregister
SafeAndSlow_swigregister(SafeAndSlow)
class QuasiMonteCarlo(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, QuasiMonteCarlo, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, QuasiMonteCarlo, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.QuasiMonteCarlo_getClassName(self)
def __repr__(self): return _simulation.QuasiMonteCarlo___repr__(self)
def __init__(self, *args):
this = _simulation.new_QuasiMonteCarlo(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_QuasiMonteCarlo
__del__ = lambda self : None;
QuasiMonteCarlo_swigregister = _simulation.QuasiMonteCarlo_swigregister
QuasiMonteCarlo_swigregister(QuasiMonteCarlo)
class RandomizedQuasiMonteCarlo(Simulation):
__swig_setmethods__ = {}
for _s in [Simulation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, RandomizedQuasiMonteCarlo, name, value)
__swig_getmethods__ = {}
for _s in [Simulation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, RandomizedQuasiMonteCarlo, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RandomizedQuasiMonteCarlo_getClassName(self)
def __repr__(self): return _simulation.RandomizedQuasiMonteCarlo___repr__(self)
def __init__(self, *args):
this = _simulation.new_RandomizedQuasiMonteCarlo(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RandomizedQuasiMonteCarlo
__del__ = lambda self : None;
RandomizedQuasiMonteCarlo_swigregister = _simulation.RandomizedQuasiMonteCarlo_swigregister
RandomizedQuasiMonteCarlo_swigregister(RandomizedQuasiMonteCarlo)
class QuasiMonteCarloResult(SimulationResultImplementation):
__swig_setmethods__ = {}
for _s in [SimulationResultImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, QuasiMonteCarloResult, name, value)
__swig_getmethods__ = {}
for _s in [SimulationResultImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, QuasiMonteCarloResult, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.QuasiMonteCarloResult_getClassName(self)
def getCoefficientOfVariation(self):
"""
Accessor to the coefficient of variation.
Returns
-------
coefficient : float
Coefficient of variation of the simulated sample which is equal to
:math:`\\sqrt{Var_e} / P_e` with :math:`Var_e` the variance estimate and
:math:`P_e` the probability estimate.
"""
return _simulation.QuasiMonteCarloResult_getCoefficientOfVariation(self)
def getStandardDeviation(self):
"""
Accessor to the standard deviation.
Returns
-------
sigma : float
Standard deviation of the estimator at the end of the simulation.
"""
return _simulation.QuasiMonteCarloResult_getStandardDeviation(self)
def getConfidenceLength(self, *args):
"""
Accessor to the confidence length.
Parameters
----------
level : float, :math:`level \\in ]0, 1[`
Confidence level. By default, it is :math:`0.95`.
Returns
-------
confidenceLength : float
Length of the confidence interval at the confidence level *level*.
"""
return _simulation.QuasiMonteCarloResult_getConfidenceLength(self, *args)
def __repr__(self): return _simulation.QuasiMonteCarloResult___repr__(self)
def __init__(self, *args):
this = _simulation.new_QuasiMonteCarloResult(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_QuasiMonteCarloResult
__del__ = lambda self : None;
QuasiMonteCarloResult_swigregister = _simulation.QuasiMonteCarloResult_swigregister
QuasiMonteCarloResult_swigregister(QuasiMonteCarloResult)
class SimulationSensitivityAnalysis(openturns.common.PersistentObject):
__swig_setmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SimulationSensitivityAnalysis, name, value)
__swig_getmethods__ = {}
for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, SimulationSensitivityAnalysis, name)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SimulationSensitivityAnalysis_getClassName(self)
def computeMeanPointInEventDomain(self, *args): return _simulation.SimulationSensitivityAnalysis_computeMeanPointInEventDomain(self, *args)
def computeImportanceFactors(self, *args): return _simulation.SimulationSensitivityAnalysis_computeImportanceFactors(self, *args)
def drawImportanceFactors(self): return _simulation.SimulationSensitivityAnalysis_drawImportanceFactors(self)
def drawImportanceFactorsRange(self, *args): return _simulation.SimulationSensitivityAnalysis_drawImportanceFactorsRange(self, *args)
def getInputSample(self): return _simulation.SimulationSensitivityAnalysis_getInputSample(self)
def getOutputSample(self): return _simulation.SimulationSensitivityAnalysis_getOutputSample(self)
def getThreshold(self): return _simulation.SimulationSensitivityAnalysis_getThreshold(self)
def setThreshold(self, *args): return _simulation.SimulationSensitivityAnalysis_setThreshold(self, *args)
def getTransformation(self): return _simulation.SimulationSensitivityAnalysis_getTransformation(self)
def getComparisonOperator(self): return _simulation.SimulationSensitivityAnalysis_getComparisonOperator(self)
def setComparisonOperator(self, *args): return _simulation.SimulationSensitivityAnalysis_setComparisonOperator(self, *args)
def __repr__(self): return _simulation.SimulationSensitivityAnalysis___repr__(self)
def __init__(self, *args):
this = _simulation.new_SimulationSensitivityAnalysis(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SimulationSensitivityAnalysis
__del__ = lambda self : None;
SimulationSensitivityAnalysis_swigregister = _simulation.SimulationSensitivityAnalysis_swigregister
SimulationSensitivityAnalysis_swigregister(SimulationSensitivityAnalysis)
class RootStrategyImplementationPointer(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, RootStrategyImplementationPointer, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, RootStrategyImplementationPointer, name)
__swig_setmethods__["ptr_"] = _simulation.RootStrategyImplementationPointer_ptr__set
__swig_getmethods__["ptr_"] = _simulation.RootStrategyImplementationPointer_ptr__get
if _newclass:ptr_ = _swig_property(_simulation.RootStrategyImplementationPointer_ptr__get, _simulation.RootStrategyImplementationPointer_ptr__set)
def __init__(self, *args):
this = _simulation.new_RootStrategyImplementationPointer(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_RootStrategyImplementationPointer
__del__ = lambda self : None;
def reset(self): return _simulation.RootStrategyImplementationPointer_reset(self)
def __ref__(self, *args): return _simulation.RootStrategyImplementationPointer___ref__(self, *args)
def __deref__(self): return _simulation.RootStrategyImplementationPointer___deref__(self)
def isNull(self): return _simulation.RootStrategyImplementationPointer_isNull(self)
def __nonzero__(self):
return _simulation.RootStrategyImplementationPointer___nonzero__(self)
__bool__ = __nonzero__
def get(self): return _simulation.RootStrategyImplementationPointer_get(self)
def getImplementation(self): return _simulation.RootStrategyImplementationPointer_getImplementation(self)
def unique(self): return _simulation.RootStrategyImplementationPointer_unique(self)
def use_count(self): return _simulation.RootStrategyImplementationPointer_use_count(self)
def swap(self, *args): return _simulation.RootStrategyImplementationPointer_swap(self, *args)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.RootStrategyImplementationPointer_getClassName(self)
def solve(self, *args): return _simulation.RootStrategyImplementationPointer_solve(self, *args)
def setSolver(self, *args): return _simulation.RootStrategyImplementationPointer_setSolver(self, *args)
def getSolver(self): return _simulation.RootStrategyImplementationPointer_getSolver(self)
def setMaximumDistance(self, *args): return _simulation.RootStrategyImplementationPointer_setMaximumDistance(self, *args)
def getMaximumDistance(self): return _simulation.RootStrategyImplementationPointer_getMaximumDistance(self)
def setStepSize(self, *args): return _simulation.RootStrategyImplementationPointer_setStepSize(self, *args)
def getStepSize(self): return _simulation.RootStrategyImplementationPointer_getStepSize(self)
def setOriginValue(self, *args): return _simulation.RootStrategyImplementationPointer_setOriginValue(self, *args)
def getOriginValue(self): return _simulation.RootStrategyImplementationPointer_getOriginValue(self)
def __repr__(self): return _simulation.RootStrategyImplementationPointer___repr__(self)
def __eq__(self, *args): return _simulation.RootStrategyImplementationPointer___eq__(self, *args)
def __ne__(self, *args): return _simulation.RootStrategyImplementationPointer___ne__(self, *args)
def __str__(self, offset=""): return _simulation.RootStrategyImplementationPointer___str__(self, offset)
def getId(self):
"""
Accessor to the object's id.
Returns
-------
id : int
Internal unique identifier.
"""
return _simulation.RootStrategyImplementationPointer_getId(self)
def setShadowedId(self, *args):
"""
Accessor to the object's shadowed id.
Parameters
----------
id : int
Internal unique identifier.
"""
return _simulation.RootStrategyImplementationPointer_setShadowedId(self, *args)
def getShadowedId(self):
"""
Accessor to the object's shadowed id.
Returns
-------
id : int
Internal unique identifier.
"""
return _simulation.RootStrategyImplementationPointer_getShadowedId(self)
def setVisibility(self, *args):
"""
Accessor to the object's visibility state.
Parameters
----------
visible : bool
Visibility flag.
"""
return _simulation.RootStrategyImplementationPointer_setVisibility(self, *args)
def getVisibility(self):
"""
Accessor to the object's visibility state.
Returns
-------
visible : bool
Visibility flag.
"""
return _simulation.RootStrategyImplementationPointer_getVisibility(self)
def hasName(self):
"""
Test if the object is named.
Returns
-------
hasName : bool
True if the name is not empty.
"""
return _simulation.RootStrategyImplementationPointer_hasName(self)
def hasVisibleName(self):
"""
Test if the object has a distinghishable name.
Returns
-------
hasVisibleName : bool
True if the name is not empty and not the default one.
"""
return _simulation.RootStrategyImplementationPointer_hasVisibleName(self)
def getName(self):
"""
Accessor to the object's name.
Returns
-------
name : string
The name of the object.
"""
return _simulation.RootStrategyImplementationPointer_getName(self)
def setName(self, *args):
"""
Accessor to the object's name.
Parameters
----------
name : string
The name of the object.
"""
return _simulation.RootStrategyImplementationPointer_setName(self, *args)
RootStrategyImplementationPointer_swigregister = _simulation.RootStrategyImplementationPointer_swigregister
RootStrategyImplementationPointer_swigregister(RootStrategyImplementationPointer)
class SamplingStrategyImplementationPointer(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SamplingStrategyImplementationPointer, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SamplingStrategyImplementationPointer, name)
__swig_setmethods__["ptr_"] = _simulation.SamplingStrategyImplementationPointer_ptr__set
__swig_getmethods__["ptr_"] = _simulation.SamplingStrategyImplementationPointer_ptr__get
if _newclass:ptr_ = _swig_property(_simulation.SamplingStrategyImplementationPointer_ptr__get, _simulation.SamplingStrategyImplementationPointer_ptr__set)
def __init__(self, *args):
this = _simulation.new_SamplingStrategyImplementationPointer(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _simulation.delete_SamplingStrategyImplementationPointer
__del__ = lambda self : None;
def reset(self): return _simulation.SamplingStrategyImplementationPointer_reset(self)
def __ref__(self, *args): return _simulation.SamplingStrategyImplementationPointer___ref__(self, *args)
def __deref__(self): return _simulation.SamplingStrategyImplementationPointer___deref__(self)
def isNull(self): return _simulation.SamplingStrategyImplementationPointer_isNull(self)
def __nonzero__(self):
return _simulation.SamplingStrategyImplementationPointer___nonzero__(self)
__bool__ = __nonzero__
def get(self): return _simulation.SamplingStrategyImplementationPointer_get(self)
def getImplementation(self): return _simulation.SamplingStrategyImplementationPointer_getImplementation(self)
def unique(self): return _simulation.SamplingStrategyImplementationPointer_unique(self)
def use_count(self): return _simulation.SamplingStrategyImplementationPointer_use_count(self)
def swap(self, *args): return _simulation.SamplingStrategyImplementationPointer_swap(self, *args)
def getClassName(self):
"""
Accessor to the object's name.
Returns
-------
class_name : str
The object class name (`object.__class__.__name__`).
"""
return _simulation.SamplingStrategyImplementationPointer_getClassName(self)
def generate(self): return _simulation.SamplingStrategyImplementationPointer_generate(self)
def getUniformUnitVectorRealization(self, *args): return _simulation.SamplingStrategyImplementationPointer_getUniformUnitVectorRealization(self, *args)
def setDimension(self, *args): return _simulation.SamplingStrategyImplementationPointer_setDimension(self, *args)
def getDimension(self): return _simulation.SamplingStrategyImplementationPointer_getDimension(self)
def __repr__(self): return _simulation.SamplingStrategyImplementationPointer___repr__(self)
def __eq__(self, *args): return _simulation.SamplingStrategyImplementationPointer___eq__(self, *args)
def __ne__(self, *args): return _simulation.SamplingStrategyImplementationPointer___ne__(self, *args)
def __str__(self, offset=""): return _simulation.SamplingStrategyImplementationPointer___str__(self, offset)
def getId(self):
"""
Accessor to the object's id.
Returns
-------
id : int
Internal unique identifier.
"""
return _simulation.SamplingStrategyImplementationPointer_getId(self)
def setShadowedId(self, *args):
"""
Accessor to the object's shadowed id.
Parameters
----------
id : int
Internal unique identifier.
"""
return _simulation.SamplingStrategyImplementationPointer_setShadowedId(self, *args)
def getShadowedId(self):
"""
Accessor to the object's shadowed id.
Returns
-------
id : int
Internal unique identifier.
"""
return _simulation.SamplingStrategyImplementationPointer_getShadowedId(self)
def setVisibility(self, *args):
"""
Accessor to the object's visibility state.
Parameters
----------
visible : bool
Visibility flag.
"""
return _simulation.SamplingStrategyImplementationPointer_setVisibility(self, *args)
def getVisibility(self):
"""
Accessor to the object's visibility state.
Returns
-------
visible : bool
Visibility flag.
"""
return _simulation.SamplingStrategyImplementationPointer_getVisibility(self)
def hasName(self):
"""
Test if the object is named.
Returns
-------
hasName : bool
True if the name is not empty.
"""
return _simulation.SamplingStrategyImplementationPointer_hasName(self)
def hasVisibleName(self):
"""
Test if the object has a distinghishable name.
Returns
-------
hasVisibleName : bool
True if the name is not empty and not the default one.
"""
return _simulation.SamplingStrategyImplementationPointer_hasVisibleName(self)
def getName(self):
"""
Accessor to the object's name.
Returns
-------
name : string
The name of the object.
"""
return _simulation.SamplingStrategyImplementationPointer_getName(self)
def setName(self, *args):
"""
Accessor to the object's name.
Parameters
----------
name : string
The name of the object.
"""
return _simulation.SamplingStrategyImplementationPointer_setName(self, *args)
SamplingStrategyImplementationPointer_swigregister = _simulation.SamplingStrategyImplementationPointer_swigregister
SamplingStrategyImplementationPointer_swigregister(SamplingStrategyImplementationPointer)
# This file is compatible with both classic and new-style classes.
|