Rework ProbabilityBox and Interval
This PR introduces two main changes:
- The
ProbabilityBoxis now withoutnameand has to be wrapped inside aRandomVariable(now a parametric type)
- Additionally, a pbox is now constructed using a Dictionary mapping the parameters of the distribution to either a
Realor aInterval - I think this is a lot cleaner than before and also easier to handle in the code.
- The
Intervaltype is now mainly used internally for the propagation of epistemic uncertainties and to construct p-boxes
- A new
IntervalVariableis introduced to be used as inputs
This gives us more flexibility and allows us to use intervals and pboxes inside other structs in downstream packages.
As an added benefit this gives us dependent pboxes.
I've also added documentation on imprecise reliability analysis.
Closes #196
Codecov Report
:x: Patch coverage is 96.21212% with 5 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 94.45%. Comparing base (af39f5d) to head (9038054).
:warning: Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #248 +/- ##
==========================================
+ Coverage 94.19% 94.45% +0.25%
==========================================
Files 42 43 +1
Lines 1808 1856 +48
==========================================
+ Hits 1703 1753 +50
+ Misses 105 103 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Very nice to have dependent p-boxes working!
Overall I think it's nice. I do find it slightly confusing that we now need to wrap the p-box type in a
RandomVariable. Also at some point people will probably be confused by the distinction betweenIntervalandIntervalVariable.But I guess the distinction is required for other codes to use this features?
Yes this allows not only other but also us to use p-boxes and intervals internally where we might not necessarily have an associated Symbol.
I'll work on the documentation to make the distinction clear to the user.