Pystra 1.2.2__tar.gz → 1.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Pystra-1.2.3/PKG-INFO +110 -0
- Pystra-1.2.3/pyproject.toml +73 -0
- Pystra-1.2.3/setup.cfg +4 -0
- Pystra-1.2.3/src/Pystra.egg-info/PKG-INFO +110 -0
- Pystra-1.2.3/src/Pystra.egg-info/SOURCES.txt +46 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/Pystra.egg-info/requires.txt +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/Pystra.egg-info/top_level.txt +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/__init__.py +1 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/analysis.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/calibration.py +45 -22
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/correlation.py +0 -2
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/__init__.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/beta.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/chisquare.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/distribution.py +11 -6
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/gamma.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/gumbel.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/lognormal.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/maximum.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/normal.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/parent.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/scipydist.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/shiftedexponential.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/shiftedrayleigh.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/typeiiismallestvalue.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/typeiilargestvalue.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/typeilargestvalue.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/typeismallestvalue.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/uniform.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/weibull.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/distributions/zeroinflated.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/form.py +0 -1
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/integration.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/mc.py +0 -6
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/model.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/quadrature.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/transformation.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/tests/test_calibration.py +273 -19
- {Pystra-1.2.2 → Pystra-1.2.3}/tests/test_ddm.py +0 -1
- Pystra-1.2.2/PKG-INFO +0 -28
- Pystra-1.2.2/Pystra.egg-info/PKG-INFO +0 -28
- Pystra-1.2.2/Pystra.egg-info/SOURCES.txt +0 -48
- Pystra-1.2.2/pyproject.toml +0 -17
- Pystra-1.2.2/setup.cfg +0 -59
- Pystra-1.2.2/tests/__init__.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/LICENSE +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/README.rst +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/setup.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/Pystra.egg-info/dependency_links.txt +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/loadcomb.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/sensitivity.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3/src}/pystra/sorm.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/tests/test_basic.py +0 -0
- {Pystra-1.2.2 → Pystra-1.2.3}/tests/test_distribution.py +0 -0
Pystra-1.2.3/PKG-INFO
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: Pystra
|
|
3
|
+
Version: 1.2.3
|
|
4
|
+
Summary: Python Structural Reliability Analysis
|
|
5
|
+
Author-email: Colin Caprani <colin.caprani@monash.edu>, "M. Shihab Khan" <shihab.khan@monash.edu>, Jürgen Hackl <hackl.science@gmail.com>
|
|
6
|
+
License: Apache 2.0
|
|
7
|
+
Project-URL: Homepage, https://pystra.github.io/pystra/
|
|
8
|
+
Project-URL: Documentation, https://pystra.github.io/pystra/
|
|
9
|
+
Project-URL: Source, https://github.com/pystra/pystra/
|
|
10
|
+
Project-URL: Tracker, https://github.com/pystra/pystra/issues/
|
|
11
|
+
Keywords: structural,reliability,engineering
|
|
12
|
+
Platform: any
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
|
+
Classifier: Natural Language :: English
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: matplotlib
|
|
31
|
+
Requires-Dist: numpy
|
|
32
|
+
Requires-Dist: scipy
|
|
33
|
+
Requires-Dist: pandas
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: pytest>=6.2.2; extra == "test"
|
|
36
|
+
|
|
37
|
+
.. figure:: docs/source/images/logo/logo_pystra_mid.png
|
|
38
|
+
:alt: Pystra logo
|
|
39
|
+
:align: center
|
|
40
|
+
:scale: 50
|
|
41
|
+
|
|
42
|
+
***********************************************
|
|
43
|
+
Pystra - Python Structural Reliability Analysis
|
|
44
|
+
***********************************************
|
|
45
|
+
|
|
46
|
+
Pystra (Python Structural Reliability Analysis) is a python module for structural reliability analysis. Its flexibility and extensibility make it applicable to a large
|
|
47
|
+
suite of problems. Along with core reliability analysis functionality, Pystra
|
|
48
|
+
includes methods for summarizing output. Pystra is also closely integrated with the usual python scientific packages workflow, numpy and scipy; in particular, all statistical distributions in Scipy can be used in reliability modeling.
|
|
49
|
+
|
|
50
|
+
Installation
|
|
51
|
+
============
|
|
52
|
+
|
|
53
|
+
To install *Pystra* just do:
|
|
54
|
+
|
|
55
|
+
$ pip install pystra
|
|
56
|
+
|
|
57
|
+
Features
|
|
58
|
+
========
|
|
59
|
+
|
|
60
|
+
Pystra provides functionalities to make structural reliability analysis as easy
|
|
61
|
+
as possible. Here is a short list of some of its features:
|
|
62
|
+
|
|
63
|
+
* Perform reliability analysis with different kinds of Reliability Methods.
|
|
64
|
+
|
|
65
|
+
* Perform reliability analysis with Crude Monte Carlo Simulation.
|
|
66
|
+
|
|
67
|
+
* Includes a large suite of well-documented statistical distributions.
|
|
68
|
+
|
|
69
|
+
* Uses NumPy for numerics wherever possible.
|
|
70
|
+
|
|
71
|
+
* No limitation on the limit state function.
|
|
72
|
+
|
|
73
|
+
* Correlation between the random variables are possible.
|
|
74
|
+
|
|
75
|
+
* Traces can be saved to the disk as plain text.
|
|
76
|
+
|
|
77
|
+
* Pystra can be embedded in larger programs, and results can be analyzed
|
|
78
|
+
with the full power of Python.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
Getting started
|
|
82
|
+
===============
|
|
83
|
+
|
|
84
|
+
This `Documentation`_ provides all the information needed to install Pystra, code a
|
|
85
|
+
reliability model, run the sampler, save and visualize the results. In
|
|
86
|
+
addition, it contains a list of the statistical distributions currently
|
|
87
|
+
available.
|
|
88
|
+
|
|
89
|
+
.. _`Documentation`: http://pystra.github.io/pystra/
|
|
90
|
+
|
|
91
|
+
.. _`FERUM`: http://www.ce.berkeley.edu/projects/ferum/
|
|
92
|
+
|
|
93
|
+
.. _`IFMA`: http://www.ifma.fr/Recherche/Labos/FERUM
|
|
94
|
+
|
|
95
|
+
Credits
|
|
96
|
+
=======
|
|
97
|
+
Pystra is built on PyRe by Jürgen Hackl; FERUM4.1 by Jean-Marc Bourinet; FERUM by Terje Haukaas and Armen Der Kiureghian.
|
|
98
|
+
|
|
99
|
+
Copyright 2021 The Pystra Developers.
|
|
100
|
+
|
|
101
|
+
List of References
|
|
102
|
+
==================
|
|
103
|
+
|
|
104
|
+
[Bourinet2009] J.-M. Bourinet, C. Mattrand, and V Dubourg. A review of recent features and improvements added to FERUM software. In Proc. of the 10th International Conference on Structural Safety and Reliability (ICOSSAR’09), Osaka, Japan, 2009.
|
|
105
|
+
|
|
106
|
+
[Bourinet2010] J.-M. Bourinet. FERUM 4.1 User’s Guide, 2010.
|
|
107
|
+
|
|
108
|
+
[DerKiureghian2006] A. Der Kiureghian, T. Haukaas, and K. Fujimura. Structural reliability software at the University of California, Berkeley. Structural Safety, 28(1-2):44–67, 2006.
|
|
109
|
+
|
|
110
|
+
[Hackl2013] J. Hackl. Generic Framework for Stochastic Modeling of Reinforced Concrete Deterioration Caused by Corrosion. Master’s thesis, Norwegian University of Science and Technology, Trondheim, Norway, 2013.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 64.0",
|
|
3
|
+
"oldest-supported-numpy"]
|
|
4
|
+
build-backend = "setuptools.build_meta"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "Pystra"
|
|
8
|
+
dynamic = ["version"]
|
|
9
|
+
description = "Python Structural Reliability Analysis"
|
|
10
|
+
license = {text = "Apache 2.0"}
|
|
11
|
+
keywords = ["structural", "reliability", "engineering"]
|
|
12
|
+
authors = [{name = "Colin Caprani", email = "colin.caprani@monash.edu"},
|
|
13
|
+
{name = "M. Shihab Khan", email = "shihab.khan@monash.edu"},
|
|
14
|
+
{name = "Jürgen Hackl", email = "hackl.science@gmail.com"}]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Topic :: Scientific/Engineering",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"License :: OSI Approved :: Apache Software License",
|
|
22
|
+
"Natural Language :: English",
|
|
23
|
+
"Operating System :: POSIX :: Linux",
|
|
24
|
+
"Operating System :: MacOS :: MacOS X",
|
|
25
|
+
"Operating System :: Microsoft :: Windows",
|
|
26
|
+
"Programming Language :: Python :: 3.8",
|
|
27
|
+
"Programming Language :: Python :: 3.9",
|
|
28
|
+
"Programming Language :: Python :: 3.10",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
]
|
|
31
|
+
requires-python = ">=3.8"
|
|
32
|
+
dependencies = [
|
|
33
|
+
"matplotlib",
|
|
34
|
+
"numpy",
|
|
35
|
+
"scipy",
|
|
36
|
+
"pandas",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.readme]
|
|
40
|
+
file = "README.rst"
|
|
41
|
+
content-type = "text/markdown"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://pystra.github.io/pystra/"
|
|
45
|
+
Documentation = "https://pystra.github.io/pystra/"
|
|
46
|
+
Source = "https://github.com/pystra/pystra/"
|
|
47
|
+
Tracker = "https://github.com/pystra/pystra/issues/"
|
|
48
|
+
|
|
49
|
+
[project.optional-dependencies]
|
|
50
|
+
test = ["pytest >= 6.2.2"]
|
|
51
|
+
|
|
52
|
+
[tool.setuptools]
|
|
53
|
+
platforms = ["any"]
|
|
54
|
+
include-package-data = true
|
|
55
|
+
license-files = ["LICENSE"]
|
|
56
|
+
|
|
57
|
+
# [tool.setuptools.packages]
|
|
58
|
+
# find = {namespaces = false}
|
|
59
|
+
|
|
60
|
+
[tool.setuptools.dynamic]
|
|
61
|
+
version = {attr = "pystra.__version__"}
|
|
62
|
+
|
|
63
|
+
[tool.distutils.bdist_wheel]
|
|
64
|
+
universal = 1
|
|
65
|
+
|
|
66
|
+
[tool.aliases]
|
|
67
|
+
test = "pytest"
|
|
68
|
+
|
|
69
|
+
[tool.pytest.ini_options]
|
|
70
|
+
minversion = "6.0"
|
|
71
|
+
testpaths = [
|
|
72
|
+
"tests"
|
|
73
|
+
]
|
Pystra-1.2.3/setup.cfg
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: Pystra
|
|
3
|
+
Version: 1.2.3
|
|
4
|
+
Summary: Python Structural Reliability Analysis
|
|
5
|
+
Author-email: Colin Caprani <colin.caprani@monash.edu>, "M. Shihab Khan" <shihab.khan@monash.edu>, Jürgen Hackl <hackl.science@gmail.com>
|
|
6
|
+
License: Apache 2.0
|
|
7
|
+
Project-URL: Homepage, https://pystra.github.io/pystra/
|
|
8
|
+
Project-URL: Documentation, https://pystra.github.io/pystra/
|
|
9
|
+
Project-URL: Source, https://github.com/pystra/pystra/
|
|
10
|
+
Project-URL: Tracker, https://github.com/pystra/pystra/issues/
|
|
11
|
+
Keywords: structural,reliability,engineering
|
|
12
|
+
Platform: any
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
|
+
Classifier: Natural Language :: English
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: matplotlib
|
|
31
|
+
Requires-Dist: numpy
|
|
32
|
+
Requires-Dist: scipy
|
|
33
|
+
Requires-Dist: pandas
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: pytest>=6.2.2; extra == "test"
|
|
36
|
+
|
|
37
|
+
.. figure:: docs/source/images/logo/logo_pystra_mid.png
|
|
38
|
+
:alt: Pystra logo
|
|
39
|
+
:align: center
|
|
40
|
+
:scale: 50
|
|
41
|
+
|
|
42
|
+
***********************************************
|
|
43
|
+
Pystra - Python Structural Reliability Analysis
|
|
44
|
+
***********************************************
|
|
45
|
+
|
|
46
|
+
Pystra (Python Structural Reliability Analysis) is a python module for structural reliability analysis. Its flexibility and extensibility make it applicable to a large
|
|
47
|
+
suite of problems. Along with core reliability analysis functionality, Pystra
|
|
48
|
+
includes methods for summarizing output. Pystra is also closely integrated with the usual python scientific packages workflow, numpy and scipy; in particular, all statistical distributions in Scipy can be used in reliability modeling.
|
|
49
|
+
|
|
50
|
+
Installation
|
|
51
|
+
============
|
|
52
|
+
|
|
53
|
+
To install *Pystra* just do:
|
|
54
|
+
|
|
55
|
+
$ pip install pystra
|
|
56
|
+
|
|
57
|
+
Features
|
|
58
|
+
========
|
|
59
|
+
|
|
60
|
+
Pystra provides functionalities to make structural reliability analysis as easy
|
|
61
|
+
as possible. Here is a short list of some of its features:
|
|
62
|
+
|
|
63
|
+
* Perform reliability analysis with different kinds of Reliability Methods.
|
|
64
|
+
|
|
65
|
+
* Perform reliability analysis with Crude Monte Carlo Simulation.
|
|
66
|
+
|
|
67
|
+
* Includes a large suite of well-documented statistical distributions.
|
|
68
|
+
|
|
69
|
+
* Uses NumPy for numerics wherever possible.
|
|
70
|
+
|
|
71
|
+
* No limitation on the limit state function.
|
|
72
|
+
|
|
73
|
+
* Correlation between the random variables are possible.
|
|
74
|
+
|
|
75
|
+
* Traces can be saved to the disk as plain text.
|
|
76
|
+
|
|
77
|
+
* Pystra can be embedded in larger programs, and results can be analyzed
|
|
78
|
+
with the full power of Python.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
Getting started
|
|
82
|
+
===============
|
|
83
|
+
|
|
84
|
+
This `Documentation`_ provides all the information needed to install Pystra, code a
|
|
85
|
+
reliability model, run the sampler, save and visualize the results. In
|
|
86
|
+
addition, it contains a list of the statistical distributions currently
|
|
87
|
+
available.
|
|
88
|
+
|
|
89
|
+
.. _`Documentation`: http://pystra.github.io/pystra/
|
|
90
|
+
|
|
91
|
+
.. _`FERUM`: http://www.ce.berkeley.edu/projects/ferum/
|
|
92
|
+
|
|
93
|
+
.. _`IFMA`: http://www.ifma.fr/Recherche/Labos/FERUM
|
|
94
|
+
|
|
95
|
+
Credits
|
|
96
|
+
=======
|
|
97
|
+
Pystra is built on PyRe by Jürgen Hackl; FERUM4.1 by Jean-Marc Bourinet; FERUM by Terje Haukaas and Armen Der Kiureghian.
|
|
98
|
+
|
|
99
|
+
Copyright 2021 The Pystra Developers.
|
|
100
|
+
|
|
101
|
+
List of References
|
|
102
|
+
==================
|
|
103
|
+
|
|
104
|
+
[Bourinet2009] J.-M. Bourinet, C. Mattrand, and V Dubourg. A review of recent features and improvements added to FERUM software. In Proc. of the 10th International Conference on Structural Safety and Reliability (ICOSSAR’09), Osaka, Japan, 2009.
|
|
105
|
+
|
|
106
|
+
[Bourinet2010] J.-M. Bourinet. FERUM 4.1 User’s Guide, 2010.
|
|
107
|
+
|
|
108
|
+
[DerKiureghian2006] A. Der Kiureghian, T. Haukaas, and K. Fujimura. Structural reliability software at the University of California, Berkeley. Structural Safety, 28(1-2):44–67, 2006.
|
|
109
|
+
|
|
110
|
+
[Hackl2013] J. Hackl. Generic Framework for Stochastic Modeling of Reinforced Concrete Deterioration Caused by Corrosion. Master’s thesis, Norwegian University of Science and Technology, Trondheim, Norway, 2013.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.rst
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
src/Pystra.egg-info/PKG-INFO
|
|
6
|
+
src/Pystra.egg-info/SOURCES.txt
|
|
7
|
+
src/Pystra.egg-info/dependency_links.txt
|
|
8
|
+
src/Pystra.egg-info/requires.txt
|
|
9
|
+
src/Pystra.egg-info/top_level.txt
|
|
10
|
+
src/pystra/__init__.py
|
|
11
|
+
src/pystra/analysis.py
|
|
12
|
+
src/pystra/calibration.py
|
|
13
|
+
src/pystra/correlation.py
|
|
14
|
+
src/pystra/form.py
|
|
15
|
+
src/pystra/integration.py
|
|
16
|
+
src/pystra/loadcomb.py
|
|
17
|
+
src/pystra/mc.py
|
|
18
|
+
src/pystra/model.py
|
|
19
|
+
src/pystra/quadrature.py
|
|
20
|
+
src/pystra/sensitivity.py
|
|
21
|
+
src/pystra/sorm.py
|
|
22
|
+
src/pystra/transformation.py
|
|
23
|
+
src/pystra/distributions/__init__.py
|
|
24
|
+
src/pystra/distributions/beta.py
|
|
25
|
+
src/pystra/distributions/chisquare.py
|
|
26
|
+
src/pystra/distributions/distribution.py
|
|
27
|
+
src/pystra/distributions/gamma.py
|
|
28
|
+
src/pystra/distributions/gumbel.py
|
|
29
|
+
src/pystra/distributions/lognormal.py
|
|
30
|
+
src/pystra/distributions/maximum.py
|
|
31
|
+
src/pystra/distributions/normal.py
|
|
32
|
+
src/pystra/distributions/parent.py
|
|
33
|
+
src/pystra/distributions/scipydist.py
|
|
34
|
+
src/pystra/distributions/shiftedexponential.py
|
|
35
|
+
src/pystra/distributions/shiftedrayleigh.py
|
|
36
|
+
src/pystra/distributions/typeiiismallestvalue.py
|
|
37
|
+
src/pystra/distributions/typeiilargestvalue.py
|
|
38
|
+
src/pystra/distributions/typeilargestvalue.py
|
|
39
|
+
src/pystra/distributions/typeismallestvalue.py
|
|
40
|
+
src/pystra/distributions/uniform.py
|
|
41
|
+
src/pystra/distributions/weibull.py
|
|
42
|
+
src/pystra/distributions/zeroinflated.py
|
|
43
|
+
tests/test_basic.py
|
|
44
|
+
tests/test_calibration.py
|
|
45
|
+
tests/test_ddm.py
|
|
46
|
+
tests/test_distribution.py
|
|
@@ -509,7 +509,7 @@ class Calibration:
|
|
|
509
509
|
self.dfXstarcal, print_output=self.print_output
|
|
510
510
|
)
|
|
511
511
|
df_psi = self.get_psi_max(df_psi) if set_max else df_psi
|
|
512
|
-
df_phi = self.
|
|
512
|
+
df_phi = self.get_phi_min(df_phi) if set_max else df_phi
|
|
513
513
|
return df_phi, df_gamma, df_psi
|
|
514
514
|
|
|
515
515
|
def get_psi_max(self, dfpsi):
|
|
@@ -527,9 +527,12 @@ class Calibration:
|
|
|
527
527
|
Dataframe of :math:`\\psi` corresponding to maximum of each load effect.
|
|
528
528
|
|
|
529
529
|
"""
|
|
530
|
-
df_psi_max = dfpsi.copy()
|
|
530
|
+
df_psi_max = dfpsi[self.label_comb_vrs].copy()
|
|
531
531
|
np.fill_diagonal(df_psi_max.values, 0.0)
|
|
532
532
|
df_psi_max = df_psi_max.clip(df_psi_max.max(), axis=1)
|
|
533
|
+
np.fill_diagonal(df_psi_max.values, 1.0)
|
|
534
|
+
if len(self.label_other) > 0:
|
|
535
|
+
df_psi_max.loc[:, self.label_other] = dfpsi[self.label_other]
|
|
533
536
|
return df_psi_max
|
|
534
537
|
|
|
535
538
|
def _calibrate_design_param(self):
|
|
@@ -594,7 +597,8 @@ class Calibration:
|
|
|
594
597
|
df_phi, df_gamma, df_psi = self.calc_pg_matrix(
|
|
595
598
|
self.dfXstarcal, print_output=self.print_output
|
|
596
599
|
)
|
|
597
|
-
df_phi = self.
|
|
600
|
+
df_phi = self.get_phi_min(df_phi) if set_max else df_phi
|
|
601
|
+
df_psi = self.get_psi_max(df_psi) if set_max else df_psi
|
|
598
602
|
return df_phi, df_gamma, df_psi
|
|
599
603
|
|
|
600
604
|
def calc_pg_coeff(self, dfXst, print_output=False):
|
|
@@ -691,9 +695,9 @@ class Calibration:
|
|
|
691
695
|
df_phi = dfXstnom[self.label_R]
|
|
692
696
|
return df_phi
|
|
693
697
|
|
|
694
|
-
def
|
|
698
|
+
def get_phi_min(self, dfphi_):
|
|
695
699
|
dfphi = dfphi_.copy()
|
|
696
|
-
dfphi = dfphi.clip(dfphi.
|
|
700
|
+
dfphi = dfphi.clip(upper=dfphi.min(), axis=1)
|
|
697
701
|
return dfphi
|
|
698
702
|
|
|
699
703
|
def calc_gamma(self, dfXstnom):
|
|
@@ -807,6 +811,10 @@ class Calibration:
|
|
|
807
811
|
|
|
808
812
|
def calc_epgS_mat(self, dfgammanom):
|
|
809
813
|
"""Get LHS for matrix estimation method, :math:`\\gamma_j~S_j`.
|
|
814
|
+
The LHS is evaluated by evaluating the LSF with appropriate random
|
|
815
|
+
variables to account for any constant multipliers. The implementation
|
|
816
|
+
works for both, linear and non-linear LSFs. For more algorithmic
|
|
817
|
+
details, ref to Appendix A, Caprani and Khan, Structural Safety, 2023.
|
|
810
818
|
|
|
811
819
|
Parameters
|
|
812
820
|
----------
|
|
@@ -825,11 +833,11 @@ class Calibration:
|
|
|
825
833
|
epgS_mat = np.zeros((len(dfgammanom.index), len(self.label_comb_vrs)))
|
|
826
834
|
idx = 0
|
|
827
835
|
for comb in dfgammanom.index:
|
|
828
|
-
# Get
|
|
836
|
+
# Get load comb RV with other RVs
|
|
829
837
|
s_label = self.lc_obj.dict_comb_cases[comb]
|
|
830
|
-
|
|
831
|
-
# Pass
|
|
832
|
-
dfXstar_dict_comb = dfgammanom.loc[[comb],
|
|
838
|
+
rvs_for_lhs = list(set(self.label_other) | set(s_label))
|
|
839
|
+
# Pass load comb RV with other RVs to the LSF
|
|
840
|
+
dfXstar_dict_comb = dfgammanom.loc[[comb], rvs_for_lhs].to_dict("records")[
|
|
833
841
|
0
|
|
834
842
|
]
|
|
835
843
|
if len(self.label_other) > 0:
|
|
@@ -838,7 +846,7 @@ class Calibration:
|
|
|
838
846
|
)[0]
|
|
839
847
|
else:
|
|
840
848
|
dfXstar_dict_other = {}
|
|
841
|
-
epgS_mat[idx] = self.lc_obj.eval_lsf_kwargs(
|
|
849
|
+
epgS_mat[:, idx] = self.lc_obj.eval_lsf_kwargs(
|
|
842
850
|
**dfXstar_dict_comb
|
|
843
851
|
) - self.lc_obj.eval_lsf_kwargs(**dfXstar_dict_other)
|
|
844
852
|
idx += 1
|
|
@@ -910,7 +918,7 @@ class Calibration:
|
|
|
910
918
|
print(f"\n Design reliabilities = {arr_beta}")
|
|
911
919
|
return arr_beta
|
|
912
920
|
|
|
913
|
-
def calc_df_pgRS(self):
|
|
921
|
+
def calc_df_pgRS(self, min_phi, max_psi):
|
|
914
922
|
"""
|
|
915
923
|
Calculate the DataFrame of all resistance and load variables nominal
|
|
916
924
|
values multiplied by their respective factors, :math:`\\phi`, :math:`\\gamma`,
|
|
@@ -923,13 +931,14 @@ class Calibration:
|
|
|
923
931
|
|
|
924
932
|
"""
|
|
925
933
|
df_pgRS = self.df_nom.copy()
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
)
|
|
929
|
-
df_pgRS.loc[:, self.
|
|
934
|
+
df_phi = self.get_phi_min(self.df_phi) if min_phi else self.df_phi
|
|
935
|
+
df_psi = self.get_psi_max(self.df_psi) if max_psi else self.df_psi
|
|
936
|
+
df_gamma = self.df_gamma.max()
|
|
937
|
+
df_pgRS.loc[:, self.label_S] = df_pgRS[self.label_S] * df_gamma * df_psi
|
|
938
|
+
df_pgRS.loc[:, self.label_R] = df_pgRS[self.label_R] * df_phi
|
|
930
939
|
return df_pgRS
|
|
931
940
|
|
|
932
|
-
def get_design_param_factor(self):
|
|
941
|
+
def get_design_param_factor(self, min_phi=True, max_psi=True):
|
|
933
942
|
"""
|
|
934
943
|
Estimate the resistance design parameter for a given set of safety and
|
|
935
944
|
combination factors, and nominals.
|
|
@@ -940,17 +949,31 @@ class Calibration:
|
|
|
940
949
|
Array containing design parameters for all load combination cases.
|
|
941
950
|
|
|
942
951
|
"""
|
|
943
|
-
df_pgRS = self.calc_df_pgRS()
|
|
952
|
+
df_pgRS = self.calc_df_pgRS(min_phi, max_psi)
|
|
944
953
|
list_cols = [df_pgRS.loc[[xx], :] for xx in self.label_comb_cases]
|
|
945
954
|
array_z = np.array([self.calc_design_param_Xst(xx) for xx in list_cols])
|
|
946
955
|
return array_z
|
|
947
956
|
|
|
948
|
-
def print_detailed_output(self):
|
|
957
|
+
def print_detailed_output(self, precision=2):
|
|
958
|
+
"""
|
|
959
|
+
Print detailed outputs for Pystra Calibration, including calculations
|
|
960
|
+
from intermediate steps.
|
|
961
|
+
|
|
962
|
+
Parameters
|
|
963
|
+
----------
|
|
964
|
+
precision : float, optional
|
|
965
|
+
Decimal precision for roundingo off output. The default is 2.
|
|
966
|
+
|
|
967
|
+
Returns
|
|
968
|
+
-------
|
|
969
|
+
None.
|
|
970
|
+
|
|
971
|
+
"""
|
|
949
972
|
n = 54
|
|
950
973
|
print("\n")
|
|
951
974
|
print("=" * n)
|
|
952
|
-
print("X* = \n", self.dfXstarcal.round(
|
|
953
|
-
print("\nphi = ", "\n", self.df_phi.round(
|
|
954
|
-
print("\ngamma =", "\n", self.df_gamma.round(
|
|
955
|
-
print("\npsi = ", "\n", self.df_psi.round(
|
|
975
|
+
print("X* = \n", self.dfXstarcal.round(precision))
|
|
976
|
+
print("\nphi = ", "\n", self.df_phi.round(precision))
|
|
977
|
+
print("\ngamma =", "\n", self.df_gamma.round(precision))
|
|
978
|
+
print("\npsi = ", "\n", self.df_psi.round(precision))
|
|
956
979
|
print("=" * n)
|
|
@@ -20,7 +20,6 @@ class CorrelationMatrix(object):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
def __init__(self, matrix=None):
|
|
23
|
-
|
|
24
23
|
self.matrix = matrix
|
|
25
24
|
self.mu = None
|
|
26
25
|
self.sigma = None
|
|
@@ -66,7 +65,6 @@ def computeModifiedCorrelationMatrix(stochastic_model):
|
|
|
66
65
|
for j in range(i):
|
|
67
66
|
rho = R[i][j]
|
|
68
67
|
if rho != 0 or flag_sens:
|
|
69
|
-
|
|
70
68
|
margi = marg[i]
|
|
71
69
|
margj = marg[j]
|
|
72
70
|
|
|
File without changes
|
|
@@ -163,20 +163,25 @@ class Distribution:
|
|
|
163
163
|
samples = self.ppf(u)
|
|
164
164
|
return samples
|
|
165
165
|
|
|
166
|
-
def plot(self, ax=None):
|
|
166
|
+
def plot(self, ax=None, **kwargs):
|
|
167
167
|
"""
|
|
168
168
|
Plots the PDF of the distribution
|
|
169
169
|
"""
|
|
170
170
|
# auto-range
|
|
171
171
|
samples = self.sample()
|
|
172
172
|
x = np.linspace(np.min(samples), np.max(samples), 100)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
_, axs = plt.subplots()
|
|
176
|
-
axs.plot(x, self.pdf(x))
|
|
177
|
-
axs.set_title(self.name)
|
|
173
|
+
|
|
174
|
+
show = False
|
|
178
175
|
if ax is None:
|
|
176
|
+
show = True
|
|
177
|
+
_, ax = plt.subplots()
|
|
178
|
+
|
|
179
|
+
ax.plot(x, self.pdf(x), label=self.name, **kwargs)
|
|
180
|
+
ax.legend()
|
|
181
|
+
|
|
182
|
+
if show:
|
|
179
183
|
plt.show()
|
|
184
|
+
|
|
180
185
|
return ax
|
|
181
186
|
|
|
182
187
|
# The following must be overidden in derived classes that are not based on a
|
|
File without changes
|
|
@@ -26,7 +26,6 @@ class MaxParent(Distribution):
|
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
def __init__(self, name, max_dist, N, input_type=None, startpoint=None):
|
|
29
|
-
|
|
30
29
|
if not isinstance(max_dist, Distribution):
|
|
31
30
|
raise Exception(
|
|
32
31
|
f"MaxParent distribution of maximum requires input of type {type(Distribution)}"
|