repyability 0.11__tar.gz → 0.13__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.
Files changed (261) hide show
  1. {repyability-0.11 → repyability-0.13}/LICENSE +1 -1
  2. {repyability-0.11/repyability.egg-info → repyability-0.13}/PKG-INFO +68 -55
  3. {repyability-0.11 → repyability-0.13}/README.md +64 -32
  4. {repyability-0.11 → repyability-0.13}/pyproject.toml +33 -10
  5. {repyability-0.11 → repyability-0.13}/repyability/__init__.py +51 -4
  6. {repyability-0.11 → repyability-0.13}/repyability/_version.py +1 -1
  7. repyability-0.13/repyability/demonstration.py +870 -0
  8. {repyability-0.11 → repyability-0.13}/repyability/fault_tree.py +587 -114
  9. {repyability-0.11 → repyability-0.13}/repyability/network.py +517 -237
  10. {repyability-0.11 → repyability-0.13}/repyability/non_repairable.py +64 -36
  11. repyability-0.13/repyability/rbd/_bdd_kernel.py +183 -0
  12. {repyability-0.11 → repyability-0.13}/repyability/rbd/_block_replacement.py +5 -0
  13. repyability-0.13/repyability/rbd/_ccf_chain.py +1188 -0
  14. repyability-0.13/repyability/rbd/_ccf_modules.py +1123 -0
  15. {repyability-0.11 → repyability-0.13}/repyability/rbd/_chain_transient.py +153 -17
  16. {repyability-0.11 → repyability-0.13}/repyability/rbd/_compiled.py +112 -83
  17. {repyability-0.11 → repyability-0.13}/repyability/rbd/_condition_replacement.py +285 -7
  18. repyability-0.13/repyability/rbd/_conditional.py +651 -0
  19. {repyability-0.11 → repyability-0.13}/repyability/rbd/_crew_chain.py +49 -11
  20. {repyability-0.11 → repyability-0.13}/repyability/rbd/_dependent_lifetimes.py +6 -5
  21. repyability-0.13/repyability/rbd/_differential.py +110 -0
  22. {repyability-0.11 → repyability-0.13}/repyability/rbd/_exact.py +58 -0
  23. {repyability-0.11 → repyability-0.13}/repyability/rbd/_hidden_life.py +6 -4
  24. repyability-0.13/repyability/rbd/_hidden_tests.py +1682 -0
  25. repyability-0.13/repyability/rbd/_importance_time.py +397 -0
  26. {repyability-0.11 → repyability-0.13}/repyability/rbd/_kernel.py +609 -1226
  27. repyability-0.13/repyability/rbd/_mean_lifetime.py +327 -0
  28. {repyability-0.11 → repyability-0.13}/repyability/rbd/_model_utils.py +77 -9
  29. {repyability-0.11 → repyability-0.13}/repyability/rbd/_montecarlo.py +33 -4
  30. {repyability-0.11 → repyability-0.13}/repyability/rbd/_ordered_bdd.py +6 -0
  31. repyability-0.13/repyability/rbd/_philox.py +67 -0
  32. repyability-0.13/repyability/rbd/_philox_kernel.py +44 -0
  33. {repyability-0.11 → repyability-0.13}/repyability/rbd/_point_availability.py +428 -51
  34. repyability-0.13/repyability/rbd/_quadrature.py +280 -0
  35. repyability-0.13/repyability/rbd/_rates.py +230 -0
  36. repyability-0.13/repyability/rbd/_repairable_uncertainty.py +650 -0
  37. repyability-0.13/repyability/rbd/_sampling.py +288 -0
  38. repyability-0.13/repyability/rbd/_sensitivity.py +900 -0
  39. repyability-0.13/repyability/rbd/_spares.py +1658 -0
  40. {repyability-0.11 → repyability-0.13}/repyability/rbd/_streams.py +71 -44
  41. repyability-0.13/repyability/rbd/_timeline_runs.py +399 -0
  42. repyability-0.13/repyability/rbd/bdd.py +720 -0
  43. {repyability-0.11 → repyability-0.13}/repyability/rbd/capacity.py +10 -2
  44. {repyability-0.11 → repyability-0.13}/repyability/rbd/ccf.py +355 -43
  45. {repyability-0.11 → repyability-0.13}/repyability/rbd/chunks.py +2 -0
  46. {repyability-0.11 → repyability-0.13}/repyability/rbd/degrading_node.py +26 -12
  47. {repyability-0.11 → repyability-0.13}/repyability/rbd/engines.py +5 -3
  48. {repyability-0.11 → repyability-0.13}/repyability/rbd/helper_classes.py +37 -6
  49. {repyability-0.11 → repyability-0.13}/repyability/rbd/load_sharing_node.py +87 -92
  50. {repyability-0.11 → repyability-0.13}/repyability/rbd/modular.py +439 -27
  51. {repyability-0.11 → repyability-0.13}/repyability/rbd/non_repairable_rbd.py +2099 -546
  52. {repyability-0.11 → repyability-0.13}/repyability/rbd/numerical_convolution.py +2 -3
  53. {repyability-0.11 → repyability-0.13}/repyability/rbd/phased_mission.py +7 -0
  54. {repyability-0.11 → repyability-0.13}/repyability/rbd/rare_event.py +5 -2
  55. {repyability-0.11 → repyability-0.13}/repyability/rbd/rbd.py +450 -72
  56. {repyability-0.11 → repyability-0.13}/repyability/rbd/rbd_graph.py +6 -3
  57. {repyability-0.11 → repyability-0.13}/repyability/rbd/regression_node.py +7 -10
  58. {repyability-0.11 → repyability-0.13}/repyability/rbd/repairable_rbd.py +9277 -1846
  59. {repyability-0.11 → repyability-0.13}/repyability/rbd/repeated_node.py +15 -20
  60. {repyability-0.11 → repyability-0.13}/repyability/rbd/repeated_standby_node.py +5 -24
  61. {repyability-0.11 → repyability-0.13}/repyability/rbd/results.py +1002 -137
  62. {repyability-0.11 → repyability-0.13}/repyability/rbd/routes.py +32 -14
  63. {repyability-0.11 → repyability-0.13}/repyability/rbd/serialisation.py +30 -26
  64. {repyability-0.11 → repyability-0.13}/repyability/rbd/shannon.py +148 -110
  65. {repyability-0.11 → repyability-0.13}/repyability/rbd/shards.py +34 -0
  66. {repyability-0.11 → repyability-0.13}/repyability/rbd/standby_node.py +149 -142
  67. {repyability-0.11 → repyability-0.13}/repyability/rbd/uncertainty.py +250 -5
  68. {repyability-0.11 → repyability-0.13}/repyability/repairable.py +16 -48
  69. repyability-0.13/repyability/tests/__init__.py +0 -0
  70. repyability-0.13/repyability/tests/_bdd_cases.py +239 -0
  71. repyability-0.13/repyability/tests/bdd_records.json +30363 -0
  72. repyability-0.13/repyability/tests/catalogue.py +600 -0
  73. {repyability-0.11 → repyability-0.13}/repyability/tests/keyed_draws.py +18 -14
  74. repyability-0.13/repyability/tests/repository.py +33 -0
  75. repyability-0.13/repyability/tests/seeded_event_loop.json +763 -0
  76. repyability-0.13/repyability/tests/test_allocation_trains.py +330 -0
  77. {repyability-0.11 → repyability-0.13}/repyability/tests/test_analysis_routes.py +340 -444
  78. repyability-0.13/repyability/tests/test_api_consistency.py +454 -0
  79. {repyability-0.11 → repyability-0.13}/repyability/tests/test_availability_allocation.py +1 -1
  80. repyability-0.13/repyability/tests/test_bdd_records.py +102 -0
  81. {repyability-0.11 → repyability-0.13}/repyability/tests/test_block_replacement.py +13 -16
  82. repyability-0.13/repyability/tests/test_call_forms.py +158 -0
  83. {repyability-0.11 → repyability-0.13}/repyability/tests/test_capacity.py +25 -6
  84. {repyability-0.11 → repyability-0.13}/repyability/tests/test_capacity_over_time.py +3 -3
  85. {repyability-0.11 → repyability-0.13}/repyability/tests/test_capacity_simulation.py +28 -2
  86. repyability-0.13/repyability/tests/test_catalogue.py +419 -0
  87. repyability-0.13/repyability/tests/test_ccf_allocations.py +348 -0
  88. {repyability-0.11 → repyability-0.13}/repyability/tests/test_ccf_lifetime.py +7 -3
  89. repyability-0.13/repyability/tests/test_ccf_modules.py +319 -0
  90. repyability-0.13/repyability/tests/test_ccf_over_time.py +494 -0
  91. repyability-0.13/repyability/tests/test_ccf_repairable_modules.py +487 -0
  92. repyability-0.13/repyability/tests/test_ccf_timed.py +225 -0
  93. {repyability-0.11 → repyability-0.13}/repyability/tests/test_chains_over_time.py +98 -21
  94. {repyability-0.11 → repyability-0.13}/repyability/tests/test_condition_long_run.py +5 -4
  95. repyability-0.13/repyability/tests/test_condition_over_time.py +175 -0
  96. {repyability-0.11 → repyability-0.13}/repyability/tests/test_condition_replacement.py +33 -24
  97. repyability-0.13/repyability/tests/test_conditional.py +924 -0
  98. {repyability-0.11 → repyability-0.13}/repyability/tests/test_control_variate.py +208 -3
  99. {repyability-0.11 → repyability-0.13}/repyability/tests/test_crew_chain.py +3 -1
  100. {repyability-0.11 → repyability-0.13}/repyability/tests/test_demonstration.py +8 -4
  101. repyability-0.13/repyability/tests/test_demonstration_plans.py +176 -0
  102. {repyability-0.11 → repyability-0.13}/repyability/tests/test_dependent_lifetimes.py +11 -19
  103. repyability-0.13/repyability/tests/test_differential_importance.py +456 -0
  104. repyability-0.13/repyability/tests/test_discounting.py +250 -0
  105. repyability-0.13/repyability/tests/test_docs_examples.py +253 -0
  106. {repyability-0.11 → repyability-0.13}/repyability/tests/test_engine_plugins.py +0 -2
  107. repyability-0.13/repyability/tests/test_evaluation_costs.py +347 -0
  108. {repyability-0.11 → repyability-0.13}/repyability/tests/test_exact_mttf.py +16 -24
  109. {repyability-0.11 → repyability-0.13}/repyability/tests/test_expected_window.py +14 -16
  110. {repyability-0.11 → repyability-0.13}/repyability/tests/test_fault_tree.py +382 -1
  111. repyability-0.13/repyability/tests/test_fitted_models_in_parallel.py +72 -0
  112. repyability-0.13/repyability/tests/test_greeks.py +173 -0
  113. repyability-0.13/repyability/tests/test_help.py +53 -0
  114. {repyability-0.11 → repyability-0.13}/repyability/tests/test_hidden_failures_any_life.py +44 -35
  115. repyability-0.13/repyability/tests/test_hidden_failures_timed.py +453 -0
  116. {repyability-0.11 → repyability-0.13}/repyability/tests/test_imperfect_repair.py +3 -3
  117. repyability-0.13/repyability/tests/test_importance_over_time.py +363 -0
  118. repyability-0.13/repyability/tests/test_input_checks.py +149 -0
  119. {repyability-0.11 → repyability-0.13}/repyability/tests/test_inspection.py +34 -22
  120. repyability-0.13/repyability/tests/test_inspection_offsets.py +233 -0
  121. repyability-0.13/repyability/tests/test_intervals_with_crews.py +198 -0
  122. repyability-0.13/repyability/tests/test_joint_importance.py +284 -0
  123. repyability-0.13/repyability/tests/test_junctions.py +465 -0
  124. repyability-0.13/repyability/tests/test_levers.py +364 -0
  125. {repyability-0.11 → repyability-0.13}/repyability/tests/test_limited_failure_population.py +39 -39
  126. {repyability-0.11 → repyability-0.13}/repyability/tests/test_load_sharing.py +25 -30
  127. {repyability-0.11 → repyability-0.13}/repyability/tests/test_maintenance_intervals.py +55 -1
  128. repyability-0.13/repyability/tests/test_meshed_structures.py +255 -0
  129. repyability-0.13/repyability/tests/test_messages.py +375 -0
  130. repyability-0.13/repyability/tests/test_mixture_lives.py +207 -0
  131. {repyability-0.11 → repyability-0.13}/repyability/tests/test_monte_carlo.py +132 -43
  132. {repyability-0.11 → repyability-0.13}/repyability/tests/test_network.py +109 -4
  133. {repyability-0.11 → repyability-0.13}/repyability/tests/test_non_repairable.py +7 -20
  134. repyability-0.13/repyability/tests/test_one_expected_value.py +184 -0
  135. {repyability-0.11 → repyability-0.13}/repyability/tests/test_opportunistic_maintenance.py +19 -7
  136. repyability-0.13/repyability/tests/test_packaging.py +41 -0
  137. {repyability-0.11 → repyability-0.13}/repyability/tests/test_performance_equivalence.py +64 -95
  138. {repyability-0.11 → repyability-0.13}/repyability/tests/test_point_availability.py +64 -8
  139. {repyability-0.11 → repyability-0.13}/repyability/tests/test_preventive_maintenance.py +10 -4
  140. repyability-0.13/repyability/tests/test_quadrature.py +273 -0
  141. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rare_event.py +5 -4
  142. repyability-0.13/repyability/tests/test_rates.py +625 -0
  143. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_analytic_solvability.py +2 -6
  144. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_imperfect_repair.py +201 -3
  145. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_misc.py +2 -2
  146. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_non_repairable.py +0 -16
  147. {repyability-0.11 → repyability-0.13}/repyability/tests/test_redundancy_strategies.py +1 -1
  148. repyability-0.13/repyability/tests/test_refused_inputs.py +281 -0
  149. {repyability-0.11 → repyability-0.13}/repyability/tests/test_regression_node.py +1 -21
  150. repyability-0.13/repyability/tests/test_removed_in_0_12.py +287 -0
  151. repyability-0.13/repyability/tests/test_removed_in_0_13.py +52 -0
  152. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repair_crews.py +7 -3
  153. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_ccf.py +7 -11
  154. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_cost.py +16 -7
  155. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_rbd.py +1 -1
  156. repyability-0.13/repyability/tests/test_repairable_sensitivity.py +399 -0
  157. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_standby.py +17 -7
  158. repyability-0.13/repyability/tests/test_repairable_uncertainty.py +237 -0
  159. repyability-0.13/repyability/tests/test_result_objects.py +233 -0
  160. repyability-0.13/repyability/tests/test_safety_edges.py +131 -0
  161. {repyability-0.11 → repyability-0.13}/repyability/tests/test_serialisation.py +1 -11
  162. {repyability-0.11 → repyability-0.13}/repyability/tests/test_shards.py +10 -4
  163. {repyability-0.11 → repyability-0.13}/repyability/tests/test_simulation_chunks.py +123 -9
  164. {repyability-0.11 → repyability-0.13}/repyability/tests/test_simulation_engines.py +103 -63
  165. {repyability-0.11 → repyability-0.13}/repyability/tests/test_small_probabilities.py +22 -1
  166. {repyability-0.11 → repyability-0.13}/repyability/tests/test_spares.py +146 -10
  167. repyability-0.13/repyability/tests/test_spares_block_and_tested.py +660 -0
  168. {repyability-0.11 → repyability-0.13}/repyability/tests/test_staggered_and_partial_tests.py +34 -9
  169. {repyability-0.11 → repyability-0.13}/repyability/tests/test_standby.py +9 -14
  170. {repyability-0.11 → repyability-0.13}/repyability/tests/test_start_from_state.py +20 -9
  171. repyability-0.13/repyability/tests/test_streams.py +79 -0
  172. {repyability-0.11 → repyability-0.13}/repyability/tests/test_structure_messages.py +89 -2
  173. repyability-0.13/repyability/tests/test_threads.py +130 -0
  174. repyability-0.13/repyability/tests/test_time_order.py +178 -0
  175. {repyability-0.11 → repyability-0.13}/repyability/tests/test_timelines.py +97 -63
  176. {repyability-0.11 → repyability-0.13}/repyability/tests/test_total_cost.py +25 -1
  177. repyability-0.13/repyability/tests/test_unavailability.py +130 -0
  178. repyability-0.13/repyability/tests/test_uncertainty_arrays.py +113 -0
  179. repyability-0.13/repyability/tests/test_uncertainty_importance.py +185 -0
  180. repyability-0.13/repyability/tests/test_uncertainty_sharing.py +115 -0
  181. {repyability-0.11 → repyability-0.13}/repyability/tests/test_warm_standby.py +7 -10
  182. {repyability-0.11 → repyability-0.13}/repyability/timelines.py +180 -40
  183. repyability-0.13/repyability/utils/checks.py +167 -0
  184. repyability-0.13/repyability/utils/deprecation.py +190 -0
  185. repyability-0.13/repyability/utils/docs.py +48 -0
  186. repyability-0.13/repyability/utils/vectors.py +16 -0
  187. repyability-0.13/repyability/utils/wrappers.py +161 -0
  188. {repyability-0.11 → repyability-0.13/repyability.egg-info}/PKG-INFO +68 -55
  189. {repyability-0.11 → repyability-0.13}/repyability.egg-info/SOURCES.txt +69 -3
  190. {repyability-0.11 → repyability-0.13}/repyability.egg-info/requires.txt +2 -2
  191. repyability-0.11/repyability/demonstration.py +0 -495
  192. repyability-0.11/repyability/rbd/_ccf_chain.py +0 -274
  193. repyability-0.11/repyability/rbd/_mean_lifetime.py +0 -216
  194. repyability-0.11/repyability/rbd/_sampling.py +0 -145
  195. repyability-0.11/repyability/rbd/_spares.py +0 -549
  196. repyability-0.11/repyability/rbd/_timeline_runs.py +0 -699
  197. repyability-0.11/repyability/rbd/bdd.py +0 -352
  198. repyability-0.11/repyability/tests/test_deprecated_models.py +0 -165
  199. repyability-0.11/repyability/tests/test_deprecated_names.py +0 -109
  200. repyability-0.11/repyability/tests/test_docs_examples.py +0 -90
  201. repyability-0.11/repyability/tests/test_fussell_vesely_deprecation.py +0 -44
  202. repyability-0.11/repyability/tests/test_spares_block_and_tested.py +0 -215
  203. repyability-0.11/repyability/utils/deprecation.py +0 -149
  204. repyability-0.11/repyability/utils/wrappers.py +0 -87
  205. {repyability-0.11 → repyability-0.13}/repyability/maintenance.py +0 -0
  206. /repyability-0.11/repyability/rbd/__init__.py → /repyability-0.13/repyability/py.typed +0 -0
  207. {repyability-0.11/repyability/tests → repyability-0.13/repyability/rbd}/__init__.py +0 -0
  208. {repyability-0.11 → repyability-0.13}/repyability/rbd/_standby_chain.py +0 -0
  209. {repyability-0.11 → repyability-0.13}/repyability/rbd/min_path_sets.py +0 -0
  210. {repyability-0.11 → repyability-0.13}/repyability/rbd/node_state.py +0 -0
  211. {repyability-0.11 → repyability-0.13}/repyability/rbd/redundancy_allocation.py +0 -0
  212. {repyability-0.11 → repyability-0.13}/repyability/tests/conftest.py +0 -0
  213. {repyability-0.11 → repyability-0.13}/repyability/tests/test_api_docstrings.py +0 -0
  214. {repyability-0.11 → repyability-0.13}/repyability/tests/test_api_standardisation.py +0 -0
  215. {repyability-0.11 → repyability-0.13}/repyability/tests/test_bdd_core.py +0 -0
  216. {repyability-0.11 → repyability-0.13}/repyability/tests/test_bx_life.py +0 -0
  217. {repyability-0.11 → repyability-0.13}/repyability/tests/test_ccf.py +0 -0
  218. {repyability-0.11 → repyability-0.13}/repyability/tests/test_ccf_analyses.py +0 -0
  219. {repyability-0.11 → repyability-0.13}/repyability/tests/test_condition_based.py +0 -0
  220. {repyability-0.11 → repyability-0.13}/repyability/tests/test_curve_points.py +0 -0
  221. {repyability-0.11 → repyability-0.13}/repyability/tests/test_fussell_vesely_exact.py +0 -0
  222. {repyability-0.11 → repyability-0.13}/repyability/tests/test_helper_classes.py +0 -0
  223. {repyability-0.11 → repyability-0.13}/repyability/tests/test_model_utils.py +0 -0
  224. {repyability-0.11 → repyability-0.13}/repyability/tests/test_papercuts.py +0 -0
  225. {repyability-0.11 → repyability-0.13}/repyability/tests/test_parameter_sensitivity.py +0 -0
  226. {repyability-0.11 → repyability-0.13}/repyability/tests/test_phased_mission.py +0 -0
  227. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_allocation.py +0 -0
  228. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_berge_cut_sets.py +0 -0
  229. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_exact_probability.py +0 -0
  230. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_exponential_standby.py +0 -0
  231. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_get_min_cut_sets.py +0 -0
  232. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_get_min_path_sets.py +0 -0
  233. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_hazard.py +0 -0
  234. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_importances.py +0 -0
  235. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_koon.py +0 -0
  236. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_modular.py +0 -0
  237. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_numerical_convolution.py +0 -0
  238. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_repeated_standby.py +0 -0
  239. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_set_working_failed.py +0 -0
  240. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_sf.py +0 -0
  241. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_structure.py +0 -0
  242. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rbd_switching_probability.py +0 -0
  243. {repyability-0.11 → repyability-0.13}/repyability/tests/test_redundancy_allocation.py +0 -0
  244. {repyability-0.11 → repyability-0.13}/repyability/tests/test_redundancy_front.py +0 -0
  245. {repyability-0.11 → repyability-0.13}/repyability/tests/test_redundancy_options.py +0 -0
  246. {repyability-0.11 → repyability-0.13}/repyability/tests/test_reliability_redundancy.py +0 -0
  247. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable.py +0 -0
  248. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_accounting.py +0 -0
  249. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repairable_metrics.py +0 -0
  250. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repeated_node.py +0 -0
  251. {repyability-0.11 → repyability-0.13}/repyability/tests/test_repeated_nodes.py +0 -0
  252. {repyability-0.11 → repyability-0.13}/repyability/tests/test_results.py +0 -0
  253. {repyability-0.11 → repyability-0.13}/repyability/tests/test_rng_reproducibility.py +0 -0
  254. {repyability-0.11 → repyability-0.13}/repyability/tests/test_simulation_validation.py +0 -0
  255. {repyability-0.11 → repyability-0.13}/repyability/tests/test_startup.py +0 -0
  256. {repyability-0.11 → repyability-0.13}/repyability/tests/test_structural_importance.py +0 -0
  257. {repyability-0.11 → repyability-0.13}/repyability/tests/test_uncertainty.py +0 -0
  258. {repyability-0.11 → repyability-0.13}/repyability/utils/json_io.py +0 -0
  259. {repyability-0.11 → repyability-0.13}/repyability.egg-info/dependency_links.txt +0 -0
  260. {repyability-0.11 → repyability-0.13}/repyability.egg-info/top_level.txt +0 -0
  261. {repyability-0.11 → repyability-0.13}/setup.cfg +0 -0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 The Python Packaging Authority
1
+ Copyright (c) 2023 Derryn Knife
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,27 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repyability
3
- Version: 0.11
3
+ Version: 0.13
4
4
  Summary: Reliability engineering tools for Python
5
5
  Author-email: derrynknife <derrynknife@gmail.com>
6
- License: Copyright (c) 2020 The Python Packaging Authority
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy
9
- of this software and associated documentation files (the "Software"), to deal
10
- in the Software without restriction, including without limitation the rights
11
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- copies of the Software, and to permit persons to whom the Software is
13
- furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all
16
- copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- SOFTWARE.
6
+ License-Expression: MIT
25
7
  Project-URL: Homepage, https://github.com/derrynknife/RePyability
26
8
  Project-URL: Documentation, https://derrynknife.github.io/RePyability/
27
9
  Project-URL: Repository, https://github.com/derrynknife/RePyability
@@ -30,7 +12,6 @@ Keywords: reliability,reliability-engineering,reliability-block-diagram,rbd,surv
30
12
  Classifier: Development Status :: 4 - Beta
31
13
  Classifier: Intended Audience :: Science/Research
32
14
  Classifier: Intended Audience :: Education
33
- Classifier: License :: OSI Approved :: MIT License
34
15
  Classifier: Operating System :: OS Independent
35
16
  Classifier: Programming Language :: Python :: 3
36
17
  Classifier: Programming Language :: Python :: 3.11
@@ -43,9 +24,9 @@ Requires-Python: >=3.11
43
24
  Description-Content-Type: text/markdown
44
25
  License-File: LICENSE
45
26
  Requires-Dist: numpy<3,>=2.0
46
- Requires-Dist: scipy>=1.7
27
+ Requires-Dist: scipy>=1.13
47
28
  Requires-Dist: networkx>=3.0
48
- Requires-Dist: surpyval>=0.21
29
+ Requires-Dist: surpyval>=0.23
49
30
  Requires-Dist: tqdm>=4.64
50
31
  Provides-Extra: fast
51
32
  Requires-Dist: numba>=0.60; extra == "fast"
@@ -79,8 +60,8 @@ taking already-fitted lifetime models (from
79
60
  `sf`/`ff`) as its components:
80
61
 
81
62
  - **Fault trees**: static fault trees (OR, AND and VOTE gates, repeated
82
- events) evaluated exactly, with cut sets, importance measures and
83
- conversion to and from block diagrams.
63
+ events) evaluated exactly, with common-cause groups, cut sets, importance
64
+ measures and conversion to and from block diagrams.
84
65
  - **Reliability**: exact system reliability, hazard and conditional survival;
85
66
  the exact MTTF (or simulated, with confidence intervals); B*X* life;
86
67
  uncertainty intervals on the reliability, MTTF, B*X* life and time to a
@@ -92,28 +73,43 @@ taking already-fitted lifetime models (from
92
73
  landing), each with its own diagram over the same components: the exact
93
74
  mission reliability and the chance of failing in each phase.
94
75
  - **Testing**: demonstration test plans (the units, or the test time, that
95
- demonstrate a reliability or an MTBF), what a test demonstrated, and the
76
+ demonstrate a reliability or an MTBF), plans that keep both the
77
+ producer's and the consumer's risk, what a test demonstrated, and the
96
78
  chance a design passes.
97
79
  - **Importance**: Birnbaum, improvement potential, RAW, RRW, criticality,
98
- Fussell–Vesely, structural importance and parameter sensitivity.
80
+ Fussell–Vesely, structural importance and parameter sensitivity, on
81
+ repairable systems in the long run or over time.
82
+ - **Sensitivity, the Greeks**: how far the system moves with each
83
+ component (delta) and with each lever, a life, a repair, the maintenance
84
+ or a crew; the shares of a change, which add up (differential
85
+ importance); whether two improvements are complements or substitutes
86
+ (gamma); which component is moving the availability now, and which
87
+ caused the failures (theta, Barlow–Proschan); and whose parameter
88
+ uncertainty widens the answer (vega).
99
89
  - **Live state**: reliability, remaining life and importance given each
100
90
  component's current age, and covariate-dependent components.
101
91
  - **Redundancy and dependence**: cold, warm and hot standby; repeated nodes;
102
- load sharing; beta-factor and MGL common-cause groups.
92
+ load sharing; junctions (a vote point that never fails); beta-factor and
93
+ MGL common-cause groups, splitting a probability or a failure rate, in
94
+ block diagrams, repairable systems and fault trees.
103
95
  - **Repairable systems**: exact long-run availability, failure frequency and
104
- MUT/MDT/MTBF; exact availability over time and over a mission; simulated
96
+ MUT/MDT/MTBF; exact availability over time and over a mission, and the
97
+ unavailability to its own precision (a PFD of 1e-17); simulated
105
98
  histories with criticality measures; shared repair crews, exact for
106
99
  exponential components in the long run and numerical over time, with
107
100
  their importance; repairable standby groups (a duty unit and its spares,
108
- repaired one at a time); and imperfect repair
109
- (Kijima's virtual age), with replacement at the N-th failure.
101
+ repaired one at a time); imperfect repair (Kijima's virtual age), with
102
+ replacement at the N-th failure; and uncertainty intervals on the
103
+ availability and the cost rate from uncertain (fitted) models of the
104
+ lives, repairs and maintenance.
110
105
  - **Capacity**: how much a system delivers, from its components'
111
106
  capacities (with several levels, or degrading through stages): the exact
112
107
  distribution of its capacity at a time or in the long run, the
113
108
  probability of meeting a demand, and the production availability.
114
109
  - **Spares**: how many spares each component uses over a horizon, for a
115
110
  system or a fleet, and the stock that meets a fill rate or a stock-out
116
- target for a replenishment lead time.
111
+ target for a replenishment lead time, with interchangeable components'
112
+ spares pooled on one shelf.
117
113
  - **Timelines**: up/down histories, from outage logs or simulated, with
118
114
  their measures (time up, failures and who caused them, first failure);
119
115
  merged as a diagram's structure, so a system's history follows from its
@@ -131,11 +127,15 @@ taking already-fitted lifetime models (from
131
127
  maintenance of grouped components at each other's stops,
132
128
  with its intervals chosen for a cost or availability target, hidden
133
129
  failures found by periodic inspection, with the test intervals chosen for a
134
- PFDavg target, the total cost of ownership, optimal redundancy allocation
135
- (for the lowest total cost of a repairable system, too), reliability
130
+ PFDavg target, the total cost of ownership, discounted to a present
131
+ value from new or in the long run, optimal redundancy allocation (for the
132
+ lowest total cost of a repairable system, too, with whole trains given
133
+ copies together), reliability
136
134
  allocation by the classic named methods (equal and ARINC-style
137
135
  apportionment, minimum effort, cost-based), availability allocation to
138
136
  MTTF and MTTR targets, and age-replacement and overhaul policies.
137
+ - **Saving**: diagrams to and from JSON, seeded results that repeat, and
138
+ every result as plain data (`to_dict()`, ready for `json.dumps`).
139
139
 
140
140
  ```python
141
141
  import surpyval as surv
@@ -178,8 +178,9 @@ only when
178
178
  places, nested diagrams):
179
179
 
180
180
  - **components:** surpyval lifetime distributions and fixed
181
- probabilities (non-parametric fits, such as Kaplan–Meier, are
182
- deprecated and go in 0.12); repeated nodes; cold standby with one or
181
+ probabilities (a diagram refuses a non-parametric fit, such as
182
+ Kaplan–Meier: fit a parametric distribution in surpyval); repeated
183
+ nodes; cold standby with one or
183
184
  two units operating (any units) or more (identical units); warm standby
184
185
  with one unit operating, and hot standby (any units); load sharing of
185
186
  identical units; common-cause groups, for the system's reliability,
@@ -189,17 +190,21 @@ places, nested diagrams):
189
190
  importance measures at any time, also given each component's current age;
190
191
  the distribution of the system's capacity;
191
192
  - **repairable questions,** for independent components repaired when they
192
- fail, replaced on age or block schedules or on condition at inspections
193
- (the long run), or tested for hidden failures (with instant tests and
194
- repairs, any life): the long-run availability,
193
+ fail, replaced on age or block schedules or on condition at inspections,
194
+ or tested for hidden failures (any life, the tests and repairs instant or
195
+ taking time, the tests finding every failure or missing some): the
196
+ long-run availability,
195
197
  failure frequency, MUT/MDT/MTBF and cost rate; the availability over time
196
198
  and over a mission, and the expected failures, outages, downtime and cost
197
199
  over a window, from new or from the components' current states (their
198
200
  ages, the repairs going on, where they are in their calendars, or the
199
201
  long run); the capacity distribution in the long run and over time, with
200
202
  the production availability of a window; and the spares used over a
201
- horizon, and the stock to hold for a lead time (but under block
202
- replacement).
203
+ horizon, and the stock to hold for a lead time (under block replacement,
204
+ with repairs and block replacements in no time). Common-cause groups of
205
+ members with exponential lives, tested or repaired, take nothing away:
206
+ the long-run values, importance and allocations stay exact, and the
207
+ values over time from new numerical.
203
208
 
204
209
  **Simulated**, or refused with the simulation to run instead:
205
210
 
@@ -207,25 +212,33 @@ places, nested diagrams):
207
212
  |---|---|---|
208
213
  | **What you ask** | | |
209
214
  | Sampled lifetimes or histories, and distributions or percentiles of an outcome over a window | Simulated (from new, or from the components' current states); each simulation's histories, the system's and its components', kept whole as timelines by `simulate_timelines` (from new) | Yes: the answer is a sample. Its mean over a window (failures, outages, downtime, cost, the capacity delivered) is exact, from new or from a state: `expected_events`, `expected_cost`, `mission_capacity`. |
210
- | Comparing two designs (`compare`) | Simulated, with common random numbers | No, where both are exact: compare their exact values. |
211
- | The uncertainty from fitted component parameters (`sf_uncertainty`, `mean_uncertainty`, `bx_life_uncertainty`, `time_to_reliability_uncertainty`) | Sampled over the parameters, each draw exact | Sampling is the method. |
212
- | Small failure probabilities, with a simulated node | Rare-event simulation (`unreliability_interval`) | Only while the node is simulated: an exact diagram gives `ff` directly, to full precision however small (a numerical node, such as a cold-standby group of non-exponential units, to its own accuracy, about 1e-6). |
215
+ | Comparing two designs (`compare`) | Exact where both designs' expected values are (their MTTFs; a repairable system's mission availability and expected cost), with no simulation (#236); otherwise, or on request (`method="simulate"`, `control_variate=False`), simulated with common random numbers | Only where a design's own values are simulated. |
216
+ | The uncertainty from fitted component parameters (`sf_uncertainty`, `mean_uncertainty`, `bx_life_uncertainty`, `time_to_reliability_uncertainty`; for a repairable system `mean_availability_uncertainty`, `point_availability_uncertainty`, `mission_availability_uncertainty`, `expected_cost_rate_uncertainty`) | Sampled over the parameters, randomly or quasi-randomly (`sampling="sobol"`), each draw exact or numerical as the diagram's own value is | Sampling is the method. |
217
+ | Small failure probabilities, with a node only simulations take | Rare-event simulation (`unreliability_interval`); `ff` refused | Only while the node has no reliability of its own: an exact diagram gives `ff` directly, to full precision however small (a numerical node, such as a cold-standby group of non-exponential units, to its own accuracy, about 1e-6). |
213
218
  | **Components** | | |
214
- | Warm standby with two or more units operating, of non-exponential units | Simulated: a fit to simulated lifetimes, deprecated (from 0.12, simulated only in the system's simulations: #149) | Yes, in general: which spare is switched in where, and how much each has aged, branch with the order of the failures. With one unit operating it is numerical, and hot standby (k-out-of-*n*) exact. |
215
- | Cold standby with three or more different units operating, and load sharing of different units | Simulated: a fit to simulated lifetimes, deprecated (from 0.12, simulated only in the system's simulations: #149) | Yes, in general: which spare goes where, and how old the others are, branch with the order of the failures. Identical units are numerical in both, and so are two different units operating. |
216
- | Anything a simulated node is part of | Simulated through that node | Only while the node is simulated. |
219
+ | Warm standby with two or more units operating, of non-exponential units | Simulated in the system's simulations; the analyses that need the group's reliability refused | Yes, in general: which spare is switched in where, and how much each has aged, branch with the order of the failures. With one unit operating it is numerical, and hot standby (k-out-of-*n*) exact. |
220
+ | Cold standby with three or more different units operating, and load sharing of different units | Simulated in the system's simulations; the analyses that need the group's reliability refused | Yes, in general: which spare goes where, and how old the others are, branch with the order of the failures. Identical units are numerical in both, and so are two different units operating. |
221
+ | Anything such a node is part of | Simulated in the system's simulations; the analyses that need the node's reliability refused | Only while the node has no reliability of its own. |
217
222
  | Common-cause groups: analyses given ages, and the MTTF of a group splitting a failure probability | Refused (a simulated MTTF leaves a probability split out) | No: the analyses given ages need a model of members of different ages. A group splitting the failure rate (`basis="rate"`) has an exact MTTF, and the simulations draw its shared shocks. Importance, parameter sensitivity and redundancy allocation are exact with groups (a beta-factor member's copies join its group), and parameter uncertainty is sampled with them. |
218
- | Kaplan–Meier lives in a repairable system | Long run refused; over time numerical | Non-parametric nodes are deprecated and go in 0.12 (#149): fit a parametric distribution in surpyval. |
219
223
  | **Architecture and maintenance** | | |
220
- | Phased missions and networks whose decision diagrams pass a million nodes | Refused, pointing to `method="simulate"` | Only in practice: the diagrams grow with the phases' and the network's width rather than their paths, so meshed missions and networks are exact (a grid of 64 nodes in about a second); a square grid of about 100 nodes passes the limit. |
221
- | Hidden failures whose tests or repairs take time, or whose tests miss failures of a life that is not exponential | Simulated (with instant tests and repairs, any life is numerical, summed over the test intervals; a constant failure rate is exact, staggered or with tests that miss failures too) | No: could be numerical, the next unit starting at a random phase of the test calendar, or the renewals on the lattice of the full tests (#159). |
222
- | Common-cause groups in a repairable diagram | Long run and importance exact, for exponential lives, tested or repaired; over time, allocation and the simulations refused | No: over time could be exact from the same Markov chain, the simulations could draw the shared causes, and an allocation could build each design's chain (#158). |
223
- | Replacement on condition at periodic inspections, over time | Simulated (the long-run values are numerical: a renewal cycle from one inspection that replaces the unit to the next) | No: could be numerical on the same grid (#161). |
224
- | Shared repair crews | For exponential lives and repairs, the long run and importance exact, and the values over time numerical (the same Markov chain, followed by uniformization), but the allocations; other lives simulated | Other lives: yes, in general. Around a nested RBD the expected events and the capacity over time are refused, and could be numerical too (#162). |
224
+ | Phased missions and networks too large for their decision diagrams | Refused, pointing to `method="simulate"` | Only in practice: the diagrams grow with the phases' and the network's width rather than their paths, so meshed missions and networks are exact (a network grid of 100 nodes in a second and a half); one of 121 nodes passes the limit, `repyability.network.MAX_STATES`, which can be raised. |
225
+ | Block diagrams too meshed for their decision diagrams | Simulated (lifetimes, availability, cost and timelines, in Python); the exact and numerical analyses refused | Only in practice: the diagram grows with how wide the mesh is rather than with its paths, so most meshes are exact (a 10 × 10 grid in 0.04 seconds, a random mesh of 60 nodes and 345 links in 2); one of 70 nodes and 485 links passes the limit, `repyability.rbd.bdd.STEP_LIMIT`, which can be raised. |
226
+ | Common-cause groups in a repairable diagram | For exponential lives, tested or repaired: the long run, importance and the allocations exact (a beta-factor member's copies join its group, and the availability allocations keep the members' availability), and numerical where the members' tests and repairs take a fixed or an exponential time (#220); the values over time from new numerical (the groups' Markov chains), and the simulations draw the shared causes, in Python. Members of other lives refused, as are tests and repairs of other lengths, copies of members whose tests or repairs take time, the failure frequency where their tests do, and members held or started from a current state | Other lives: a shared cause has no one rate for members of different ages, so they need a model first. Tests and repairs of other lengths, no: the chain could follow them on a grid, as a single component's model does. From a current state, no: the chains and the simulations could start from the members' states. |
227
+ | Shared repair crews | For exponential lives and repairs, the long run and importance exact, and the values over time numerical (the same Markov chain, followed by uniformization), but the allocations; other lives simulated. The maintenance and test intervals are chosen as if every repair started at once on request (`assume_unlimited_crews=True`), for a plan to simulate with the crews | Other lives: yes, in general. |
225
228
  | Standby groups (a duty unit and its spares, repaired) | For exponential units, the long run and importance exact, and the values over time numerical (the units' Markov chain, followed by uniformization); other units simulated | Other units: yes, in general. |
226
229
  | Opportunistic maintenance (renewals at a group's stops) | Simulated | Yes: each member's renewals depend on the others' ages. |
227
- | Imperfect repair (Kijima), with or without replacement at the *N*-th failure | Simulated | Yes, in general: a repair does not renew the unit. |
228
- | Spares of tested components whose tests or repairs take time, and the stock of block-replaced ones | Simulated (`spares_demand(method="simulate")`); the stock refused (block-replaced components' demand, and tested ones', are numerical) | No: the tests' calendar phase (#159) and the stock over the block calendar (#160) could be numerical. With crews, standby groups, opportunistic maintenance or imperfect repair: yes. |
230
+ | Imperfect repair (Kijima), with or without replacement at the *N*-th failure | Simulated; but minimal repair (`q = 1`) in no time is numerical over a window from new (it fails `H(t)` times by `t`), its long run refused | Yes, in general: a repair does not renew the unit. |
231
+ | Spares with repair crews, standby groups, opportunistic maintenance or imperfect repair | Refused, pointing to `spares_demand(method="simulate")`. Otherwise numerical, demand and stock: block-replaced components' whether their repairs and block replacements take time or not (from a typical replacement in the long run), but for one dead on arrival while they may take none, and tested components', whatever their tests and repairs take and whether their tests miss failures | Yes, in general: a crew's queue, a group's switching or stops and an imperfect repair make the replacements depend on more than each unit's own lives. A unit dead on arrival whose renewals may take no time: no, the replacements at one instant could be counted. |
232
+
233
+ Where a system's expected values over a window are exact,
234
+ `availability()` and `cost()` give them by default, with no error, and the
235
+ simulations give their spread. Where a system needs simulating for a few of
236
+ its nodes (a standby group of other lives, a nested RBD sharing a crew, a
237
+ unit repaired imperfectly), their mean intervals by default take each
238
+ simulation's expected values given those nodes' histories, every other node
239
+ exact given their states: a fraction of the error of the simulations' own.
240
+ `conditional=True` simulates only those nodes, for the same means in less
241
+ time.
229
242
 
230
243
  For your own diagram, `analysis_routes()` says how each analysis will be
231
244
  computed (exact, numerical, simulated or refused) and why, without running
@@ -13,8 +13,8 @@ taking already-fitted lifetime models (from
13
13
  `sf`/`ff`) as its components:
14
14
 
15
15
  - **Fault trees**: static fault trees (OR, AND and VOTE gates, repeated
16
- events) evaluated exactly, with cut sets, importance measures and
17
- conversion to and from block diagrams.
16
+ events) evaluated exactly, with common-cause groups, cut sets, importance
17
+ measures and conversion to and from block diagrams.
18
18
  - **Reliability**: exact system reliability, hazard and conditional survival;
19
19
  the exact MTTF (or simulated, with confidence intervals); B*X* life;
20
20
  uncertainty intervals on the reliability, MTTF, B*X* life and time to a
@@ -26,28 +26,43 @@ taking already-fitted lifetime models (from
26
26
  landing), each with its own diagram over the same components: the exact
27
27
  mission reliability and the chance of failing in each phase.
28
28
  - **Testing**: demonstration test plans (the units, or the test time, that
29
- demonstrate a reliability or an MTBF), what a test demonstrated, and the
29
+ demonstrate a reliability or an MTBF), plans that keep both the
30
+ producer's and the consumer's risk, what a test demonstrated, and the
30
31
  chance a design passes.
31
32
  - **Importance**: Birnbaum, improvement potential, RAW, RRW, criticality,
32
- Fussell–Vesely, structural importance and parameter sensitivity.
33
+ Fussell–Vesely, structural importance and parameter sensitivity, on
34
+ repairable systems in the long run or over time.
35
+ - **Sensitivity, the Greeks**: how far the system moves with each
36
+ component (delta) and with each lever, a life, a repair, the maintenance
37
+ or a crew; the shares of a change, which add up (differential
38
+ importance); whether two improvements are complements or substitutes
39
+ (gamma); which component is moving the availability now, and which
40
+ caused the failures (theta, Barlow–Proschan); and whose parameter
41
+ uncertainty widens the answer (vega).
33
42
  - **Live state**: reliability, remaining life and importance given each
34
43
  component's current age, and covariate-dependent components.
35
44
  - **Redundancy and dependence**: cold, warm and hot standby; repeated nodes;
36
- load sharing; beta-factor and MGL common-cause groups.
45
+ load sharing; junctions (a vote point that never fails); beta-factor and
46
+ MGL common-cause groups, splitting a probability or a failure rate, in
47
+ block diagrams, repairable systems and fault trees.
37
48
  - **Repairable systems**: exact long-run availability, failure frequency and
38
- MUT/MDT/MTBF; exact availability over time and over a mission; simulated
49
+ MUT/MDT/MTBF; exact availability over time and over a mission, and the
50
+ unavailability to its own precision (a PFD of 1e-17); simulated
39
51
  histories with criticality measures; shared repair crews, exact for
40
52
  exponential components in the long run and numerical over time, with
41
53
  their importance; repairable standby groups (a duty unit and its spares,
42
- repaired one at a time); and imperfect repair
43
- (Kijima's virtual age), with replacement at the N-th failure.
54
+ repaired one at a time); imperfect repair (Kijima's virtual age), with
55
+ replacement at the N-th failure; and uncertainty intervals on the
56
+ availability and the cost rate from uncertain (fitted) models of the
57
+ lives, repairs and maintenance.
44
58
  - **Capacity**: how much a system delivers, from its components'
45
59
  capacities (with several levels, or degrading through stages): the exact
46
60
  distribution of its capacity at a time or in the long run, the
47
61
  probability of meeting a demand, and the production availability.
48
62
  - **Spares**: how many spares each component uses over a horizon, for a
49
63
  system or a fleet, and the stock that meets a fill rate or a stock-out
50
- target for a replenishment lead time.
64
+ target for a replenishment lead time, with interchangeable components'
65
+ spares pooled on one shelf.
51
66
  - **Timelines**: up/down histories, from outage logs or simulated, with
52
67
  their measures (time up, failures and who caused them, first failure);
53
68
  merged as a diagram's structure, so a system's history follows from its
@@ -65,11 +80,15 @@ taking already-fitted lifetime models (from
65
80
  maintenance of grouped components at each other's stops,
66
81
  with its intervals chosen for a cost or availability target, hidden
67
82
  failures found by periodic inspection, with the test intervals chosen for a
68
- PFDavg target, the total cost of ownership, optimal redundancy allocation
69
- (for the lowest total cost of a repairable system, too), reliability
83
+ PFDavg target, the total cost of ownership, discounted to a present
84
+ value from new or in the long run, optimal redundancy allocation (for the
85
+ lowest total cost of a repairable system, too, with whole trains given
86
+ copies together), reliability
70
87
  allocation by the classic named methods (equal and ARINC-style
71
88
  apportionment, minimum effort, cost-based), availability allocation to
72
89
  MTTF and MTTR targets, and age-replacement and overhaul policies.
90
+ - **Saving**: diagrams to and from JSON, seeded results that repeat, and
91
+ every result as plain data (`to_dict()`, ready for `json.dumps`).
73
92
 
74
93
  ```python
75
94
  import surpyval as surv
@@ -112,8 +131,9 @@ only when
112
131
  places, nested diagrams):
113
132
 
114
133
  - **components:** surpyval lifetime distributions and fixed
115
- probabilities (non-parametric fits, such as Kaplan–Meier, are
116
- deprecated and go in 0.12); repeated nodes; cold standby with one or
134
+ probabilities (a diagram refuses a non-parametric fit, such as
135
+ Kaplan–Meier: fit a parametric distribution in surpyval); repeated
136
+ nodes; cold standby with one or
117
137
  two units operating (any units) or more (identical units); warm standby
118
138
  with one unit operating, and hot standby (any units); load sharing of
119
139
  identical units; common-cause groups, for the system's reliability,
@@ -123,17 +143,21 @@ places, nested diagrams):
123
143
  importance measures at any time, also given each component's current age;
124
144
  the distribution of the system's capacity;
125
145
  - **repairable questions,** for independent components repaired when they
126
- fail, replaced on age or block schedules or on condition at inspections
127
- (the long run), or tested for hidden failures (with instant tests and
128
- repairs, any life): the long-run availability,
146
+ fail, replaced on age or block schedules or on condition at inspections,
147
+ or tested for hidden failures (any life, the tests and repairs instant or
148
+ taking time, the tests finding every failure or missing some): the
149
+ long-run availability,
129
150
  failure frequency, MUT/MDT/MTBF and cost rate; the availability over time
130
151
  and over a mission, and the expected failures, outages, downtime and cost
131
152
  over a window, from new or from the components' current states (their
132
153
  ages, the repairs going on, where they are in their calendars, or the
133
154
  long run); the capacity distribution in the long run and over time, with
134
155
  the production availability of a window; and the spares used over a
135
- horizon, and the stock to hold for a lead time (but under block
136
- replacement).
156
+ horizon, and the stock to hold for a lead time (under block replacement,
157
+ with repairs and block replacements in no time). Common-cause groups of
158
+ members with exponential lives, tested or repaired, take nothing away:
159
+ the long-run values, importance and allocations stay exact, and the
160
+ values over time from new numerical.
137
161
 
138
162
  **Simulated**, or refused with the simulation to run instead:
139
163
 
@@ -141,25 +165,33 @@ places, nested diagrams):
141
165
  |---|---|---|
142
166
  | **What you ask** | | |
143
167
  | Sampled lifetimes or histories, and distributions or percentiles of an outcome over a window | Simulated (from new, or from the components' current states); each simulation's histories, the system's and its components', kept whole as timelines by `simulate_timelines` (from new) | Yes: the answer is a sample. Its mean over a window (failures, outages, downtime, cost, the capacity delivered) is exact, from new or from a state: `expected_events`, `expected_cost`, `mission_capacity`. |
144
- | Comparing two designs (`compare`) | Simulated, with common random numbers | No, where both are exact: compare their exact values. |
145
- | The uncertainty from fitted component parameters (`sf_uncertainty`, `mean_uncertainty`, `bx_life_uncertainty`, `time_to_reliability_uncertainty`) | Sampled over the parameters, each draw exact | Sampling is the method. |
146
- | Small failure probabilities, with a simulated node | Rare-event simulation (`unreliability_interval`) | Only while the node is simulated: an exact diagram gives `ff` directly, to full precision however small (a numerical node, such as a cold-standby group of non-exponential units, to its own accuracy, about 1e-6). |
168
+ | Comparing two designs (`compare`) | Exact where both designs' expected values are (their MTTFs; a repairable system's mission availability and expected cost), with no simulation (#236); otherwise, or on request (`method="simulate"`, `control_variate=False`), simulated with common random numbers | Only where a design's own values are simulated. |
169
+ | The uncertainty from fitted component parameters (`sf_uncertainty`, `mean_uncertainty`, `bx_life_uncertainty`, `time_to_reliability_uncertainty`; for a repairable system `mean_availability_uncertainty`, `point_availability_uncertainty`, `mission_availability_uncertainty`, `expected_cost_rate_uncertainty`) | Sampled over the parameters, randomly or quasi-randomly (`sampling="sobol"`), each draw exact or numerical as the diagram's own value is | Sampling is the method. |
170
+ | Small failure probabilities, with a node only simulations take | Rare-event simulation (`unreliability_interval`); `ff` refused | Only while the node has no reliability of its own: an exact diagram gives `ff` directly, to full precision however small (a numerical node, such as a cold-standby group of non-exponential units, to its own accuracy, about 1e-6). |
147
171
  | **Components** | | |
148
- | Warm standby with two or more units operating, of non-exponential units | Simulated: a fit to simulated lifetimes, deprecated (from 0.12, simulated only in the system's simulations: #149) | Yes, in general: which spare is switched in where, and how much each has aged, branch with the order of the failures. With one unit operating it is numerical, and hot standby (k-out-of-*n*) exact. |
149
- | Cold standby with three or more different units operating, and load sharing of different units | Simulated: a fit to simulated lifetimes, deprecated (from 0.12, simulated only in the system's simulations: #149) | Yes, in general: which spare goes where, and how old the others are, branch with the order of the failures. Identical units are numerical in both, and so are two different units operating. |
150
- | Anything a simulated node is part of | Simulated through that node | Only while the node is simulated. |
172
+ | Warm standby with two or more units operating, of non-exponential units | Simulated in the system's simulations; the analyses that need the group's reliability refused | Yes, in general: which spare is switched in where, and how much each has aged, branch with the order of the failures. With one unit operating it is numerical, and hot standby (k-out-of-*n*) exact. |
173
+ | Cold standby with three or more different units operating, and load sharing of different units | Simulated in the system's simulations; the analyses that need the group's reliability refused | Yes, in general: which spare goes where, and how old the others are, branch with the order of the failures. Identical units are numerical in both, and so are two different units operating. |
174
+ | Anything such a node is part of | Simulated in the system's simulations; the analyses that need the node's reliability refused | Only while the node has no reliability of its own. |
151
175
  | Common-cause groups: analyses given ages, and the MTTF of a group splitting a failure probability | Refused (a simulated MTTF leaves a probability split out) | No: the analyses given ages need a model of members of different ages. A group splitting the failure rate (`basis="rate"`) has an exact MTTF, and the simulations draw its shared shocks. Importance, parameter sensitivity and redundancy allocation are exact with groups (a beta-factor member's copies join its group), and parameter uncertainty is sampled with them. |
152
- | Kaplan–Meier lives in a repairable system | Long run refused; over time numerical | Non-parametric nodes are deprecated and go in 0.12 (#149): fit a parametric distribution in surpyval. |
153
176
  | **Architecture and maintenance** | | |
154
- | Phased missions and networks whose decision diagrams pass a million nodes | Refused, pointing to `method="simulate"` | Only in practice: the diagrams grow with the phases' and the network's width rather than their paths, so meshed missions and networks are exact (a grid of 64 nodes in about a second); a square grid of about 100 nodes passes the limit. |
155
- | Hidden failures whose tests or repairs take time, or whose tests miss failures of a life that is not exponential | Simulated (with instant tests and repairs, any life is numerical, summed over the test intervals; a constant failure rate is exact, staggered or with tests that miss failures too) | No: could be numerical, the next unit starting at a random phase of the test calendar, or the renewals on the lattice of the full tests (#159). |
156
- | Common-cause groups in a repairable diagram | Long run and importance exact, for exponential lives, tested or repaired; over time, allocation and the simulations refused | No: over time could be exact from the same Markov chain, the simulations could draw the shared causes, and an allocation could build each design's chain (#158). |
157
- | Replacement on condition at periodic inspections, over time | Simulated (the long-run values are numerical: a renewal cycle from one inspection that replaces the unit to the next) | No: could be numerical on the same grid (#161). |
158
- | Shared repair crews | For exponential lives and repairs, the long run and importance exact, and the values over time numerical (the same Markov chain, followed by uniformization), but the allocations; other lives simulated | Other lives: yes, in general. Around a nested RBD the expected events and the capacity over time are refused, and could be numerical too (#162). |
177
+ | Phased missions and networks too large for their decision diagrams | Refused, pointing to `method="simulate"` | Only in practice: the diagrams grow with the phases' and the network's width rather than their paths, so meshed missions and networks are exact (a network grid of 100 nodes in a second and a half); one of 121 nodes passes the limit, `repyability.network.MAX_STATES`, which can be raised. |
178
+ | Block diagrams too meshed for their decision diagrams | Simulated (lifetimes, availability, cost and timelines, in Python); the exact and numerical analyses refused | Only in practice: the diagram grows with how wide the mesh is rather than with its paths, so most meshes are exact (a 10 × 10 grid in 0.04 seconds, a random mesh of 60 nodes and 345 links in 2); one of 70 nodes and 485 links passes the limit, `repyability.rbd.bdd.STEP_LIMIT`, which can be raised. |
179
+ | Common-cause groups in a repairable diagram | For exponential lives, tested or repaired: the long run, importance and the allocations exact (a beta-factor member's copies join its group, and the availability allocations keep the members' availability), and numerical where the members' tests and repairs take a fixed or an exponential time (#220); the values over time from new numerical (the groups' Markov chains), and the simulations draw the shared causes, in Python. Members of other lives refused, as are tests and repairs of other lengths, copies of members whose tests or repairs take time, the failure frequency where their tests do, and members held or started from a current state | Other lives: a shared cause has no one rate for members of different ages, so they need a model first. Tests and repairs of other lengths, no: the chain could follow them on a grid, as a single component's model does. From a current state, no: the chains and the simulations could start from the members' states. |
180
+ | Shared repair crews | For exponential lives and repairs, the long run and importance exact, and the values over time numerical (the same Markov chain, followed by uniformization), but the allocations; other lives simulated. The maintenance and test intervals are chosen as if every repair started at once on request (`assume_unlimited_crews=True`), for a plan to simulate with the crews | Other lives: yes, in general. |
159
181
  | Standby groups (a duty unit and its spares, repaired) | For exponential units, the long run and importance exact, and the values over time numerical (the units' Markov chain, followed by uniformization); other units simulated | Other units: yes, in general. |
160
182
  | Opportunistic maintenance (renewals at a group's stops) | Simulated | Yes: each member's renewals depend on the others' ages. |
161
- | Imperfect repair (Kijima), with or without replacement at the *N*-th failure | Simulated | Yes, in general: a repair does not renew the unit. |
162
- | Spares of tested components whose tests or repairs take time, and the stock of block-replaced ones | Simulated (`spares_demand(method="simulate")`); the stock refused (block-replaced components' demand, and tested ones', are numerical) | No: the tests' calendar phase (#159) and the stock over the block calendar (#160) could be numerical. With crews, standby groups, opportunistic maintenance or imperfect repair: yes. |
183
+ | Imperfect repair (Kijima), with or without replacement at the *N*-th failure | Simulated; but minimal repair (`q = 1`) in no time is numerical over a window from new (it fails `H(t)` times by `t`), its long run refused | Yes, in general: a repair does not renew the unit. |
184
+ | Spares with repair crews, standby groups, opportunistic maintenance or imperfect repair | Refused, pointing to `spares_demand(method="simulate")`. Otherwise numerical, demand and stock: block-replaced components' whether their repairs and block replacements take time or not (from a typical replacement in the long run), but for one dead on arrival while they may take none, and tested components', whatever their tests and repairs take and whether their tests miss failures | Yes, in general: a crew's queue, a group's switching or stops and an imperfect repair make the replacements depend on more than each unit's own lives. A unit dead on arrival whose renewals may take no time: no, the replacements at one instant could be counted. |
185
+
186
+ Where a system's expected values over a window are exact,
187
+ `availability()` and `cost()` give them by default, with no error, and the
188
+ simulations give their spread. Where a system needs simulating for a few of
189
+ its nodes (a standby group of other lives, a nested RBD sharing a crew, a
190
+ unit repaired imperfectly), their mean intervals by default take each
191
+ simulation's expected values given those nodes' histories, every other node
192
+ exact given their states: a fraction of the error of the simulations' own.
193
+ `conditional=True` simulates only those nodes, for the same means in less
194
+ time.
163
195
 
164
196
  For your own diagram, `analysis_routes()` says how each analysis will be
165
197
  computed (exact, numerical, simulated or refused) and why, without running
@@ -1,5 +1,6 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61", "wheel"]
2
+ # 77 reads the licence as an SPDX expression (PEP 639).
3
+ requires = ["setuptools>=77", "wheel"]
3
4
  build-backend = "setuptools.build_meta"
4
5
 
5
6
  [project]
@@ -7,7 +8,8 @@ name = "repyability"
7
8
  dynamic = ["version"]
8
9
  description = "Reliability engineering tools for Python"
9
10
  readme = "README.md"
10
- license = { file = "LICENSE" }
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
11
13
  requires-python = ">=3.11"
12
14
  authors = [{ name = "derrynknife", email = "derrynknife@gmail.com" }]
13
15
  keywords = [
@@ -23,7 +25,6 @@ classifiers = [
23
25
  "Development Status :: 4 - Beta",
24
26
  "Intended Audience :: Science/Research",
25
27
  "Intended Audience :: Education",
26
- "License :: OSI Approved :: MIT License",
27
28
  "Operating System :: OS Independent",
28
29
  "Programming Language :: Python :: 3",
29
30
  "Programming Language :: Python :: 3.11",
@@ -35,16 +36,20 @@ classifiers = [
35
36
  ]
36
37
  dependencies = [
37
38
  "numpy>=2.0,<3",
38
- "scipy>=1.7",
39
+ # The first SciPy built for NumPy 2.
40
+ "scipy>=1.13",
39
41
  "networkx>=3.0",
40
42
  # Deliberately uncapped: RePyability consumes a small surface of surpyval
41
43
  # (sf/ff/qf/random/mean, extras/with_params, regression sf/sf_tvc,
42
44
  # to_dict/from_dict). A surpyval release reaches every fresh install at
43
45
  # once, so the upstream workflow runs the tests against surpyval's
44
46
  # development branch to show a break before it is released. CI also tests
45
- # this minimum. 0.21 draws lifetimes of limited-failure and zero-inflated
46
- # models, and takes random_state, as RePyability relies on.
47
- "surpyval>=0.21",
47
+ # this minimum. 0.23 names the limited-failure proportion lfp_p (p goes
48
+ # in its next release), takes success_run's level as alpha_ci, and
49
+ # pickles its fits (for n_jobs' worker processes), as RePyability relies
50
+ # on; 0.22 named a distribution's parameters parameter_names and
51
+ # computes the Normal and LogNormal quantiles directly.
52
+ "surpyval>=0.23",
48
53
  "tqdm>=4.64",
49
54
  ]
50
55
 
@@ -85,6 +90,12 @@ Issues = "https://github.com/derrynknife/RePyability/issues"
85
90
  # cannot silently rot.
86
91
  testpaths = ["repyability"]
87
92
  addopts = "--doctest-modules"
93
+ # A surpyval deprecation that RePyability or its tests run into fails them
94
+ # ("... will be removed in v0.23"), so that the upstream workflow, on
95
+ # surpyval's development branch, shows it before the name is removed.
96
+ filterwarnings = [
97
+ "error:.*will be removed in v[0-9]:DeprecationWarning:repyability",
98
+ ]
88
99
 
89
100
  [tool.setuptools.dynamic]
90
101
  version = { attr = "repyability._version.__version__" }
@@ -92,6 +103,12 @@ version = { attr = "repyability._version.__version__" }
92
103
  [tool.setuptools.packages.find]
93
104
  include = ["repyability*"]
94
105
 
106
+ # The type-checking marker, and the data the installed tests read (#167):
107
+ # test_packaging checks that every data file in the package is listed here.
108
+ [tool.setuptools.package-data]
109
+ "repyability" = ["py.typed"]
110
+ "repyability.tests" = ["*.json"]
111
+
95
112
  # For Black pre-commit hook
96
113
  [tool.black]
97
114
  line-length = 79
@@ -131,9 +148,15 @@ follow_imports = 'skip'
131
148
  # Coverage
132
149
  [tool.coverage.run]
133
150
  source = ["repyability"]
134
- # The compiled loop runs as machine code, which coverage cannot trace (its
135
- # equivalence with the Python loop is tested instead).
136
- omit = ["*/tests/*", "*/rbd/_kernel.py"]
151
+ # The compiled loop, decision diagram and random streams' Philox run as
152
+ # machine code, which coverage cannot trace (their equivalence with the
153
+ # Python code is tested instead).
154
+ omit = [
155
+ "*/tests/*",
156
+ "*/rbd/_kernel.py",
157
+ "*/rbd/_bdd_kernel.py",
158
+ "*/rbd/_philox_kernel.py",
159
+ ]
137
160
 
138
161
  [tool.coverage.report]
139
162
  # The library (excluding tests) must stay above this bar.