api581-engine 0.1.4__py3-none-any.whl

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 (139) hide show
  1. api581/__init__.py +80 -0
  2. api581/_amine_tables.py +105 -0
  3. api581/_h2sh2_tables.py +161 -0
  4. api581/_slabx_worker.py +174 -0
  5. api581/_sulfidic_tables.py +517 -0
  6. api581/_sulfuric_tables.py +328 -0
  7. api581/acid_sour_water.py +238 -0
  8. api581/acscc_screening.py +88 -0
  9. api581/alkaline_sour_water.py +267 -0
  10. api581/amine_corrosion.py +277 -0
  11. api581/amine_screening.py +103 -0
  12. api581/api/__init__.py +4 -0
  13. api581/api/api520.py +88 -0
  14. api581/api/bundle.py +121 -0
  15. api581/api/consequence.py +102 -0
  16. api581/api/damage.py +1831 -0
  17. api581/api/dispersion.py +121 -0
  18. api581/api/effects.py +318 -0
  19. api581/api/events.py +96 -0
  20. api581/api/financial.py +115 -0
  21. api581/api/frequency.py +40 -0
  22. api581/api/inspection.py +96 -0
  23. api581/api/level1.py +238 -0
  24. api581/api/level2.py +74 -0
  25. api581/api/planning.py +17 -0
  26. api581/api/prd.py +190 -0
  27. api581/api/properties.py +130 -0
  28. api581/api/release.py +252 -0
  29. api581/api/reliability.py +40 -0
  30. api581/api/risk.py +71 -0
  31. api581/api/tank.py +490 -0
  32. api581/api520.py +205 -0
  33. api581/area_contribution.py +72 -0
  34. api581/blast.py +232 -0
  35. api581/brittle.py +205 -0
  36. api581/bundle.py +300 -0
  37. api581/catalog.py +442 -0
  38. api581/caustic_screening.py +103 -0
  39. api581/clad_thinning.py +146 -0
  40. api581/clscc_screening.py +55 -0
  41. api581/co2_corrosion.py +313 -0
  42. api581/co2_screening.py +205 -0
  43. api581/consequences.py +250 -0
  44. api581/contracts.py +1038 -0
  45. api581/cooling_selection.py +204 -0
  46. api581/cooling_water.py +305 -0
  47. api581/core.py +126 -0
  48. api581/corrosion_rate.py +38 -0
  49. api581/cost_tables.py +175 -0
  50. api581/cracking.py +74 -0
  51. api581/data/coverage.json +21361 -0
  52. api581/data/digital-twin.schema.json +538 -0
  53. api581/data/direct-test-queue.json +7 -0
  54. api581/data/native-engine-evidence.json +44 -0
  55. api581/data/python-api.schema.json +92706 -0
  56. api581/data/reference-fixture-evidence.json +2956 -0
  57. api581/data/scope-boundaries.schema.json +58 -0
  58. api581/data/software-test-evidence.json +4278 -0
  59. api581/data/standard-metadata.json +1328 -0
  60. api581/data/standard.schema.json +233 -0
  61. api581/data/supporting-text-review.json +1319 -0
  62. api581/digital_twin.py +491 -0
  63. api581/dispersion.py +45 -0
  64. api581/effects.py +232 -0
  65. api581/evaporation.py +181 -0
  66. api581/evidence.py +81 -0
  67. api581/external_corrosion.py +148 -0
  68. api581/external_cracking.py +63 -0
  69. api581/fatigue.py +56 -0
  70. api581/fireball.py +163 -0
  71. api581/flash_pool.py +111 -0
  72. api581/flash_solver.py +122 -0
  73. api581/groundwater.py +101 -0
  74. api581/h2sh2_corrosion.py +128 -0
  75. api581/hic_screened.py +89 -0
  76. api581/htha.py +45 -0
  77. api581/hydrochloric_acid.py +272 -0
  78. api581/hydrofluoric_acid.py +236 -0
  79. api581/ignition.py +204 -0
  80. api581/inspection_effectiveness.py +601 -0
  81. api581/jet_handoff.py +60 -0
  82. api581/level1.py +311 -0
  83. api581/level1_summary.py +35 -0
  84. api581/level1_toxic.py +313 -0
  85. api581/level1_type1.py +91 -0
  86. api581/level2_summary.py +237 -0
  87. api581/lining.py +173 -0
  88. api581/native_toxic.py +67 -0
  89. api581/outputs.py +5672 -0
  90. api581/oxidation.py +145 -0
  91. api581/pascc_screening.py +78 -0
  92. api581/physical_explosion.py +190 -0
  93. api581/pof.py +207 -0
  94. api581/pool_fire.py +273 -0
  95. api581/portfolio.py +68 -0
  96. api581/prd.py +204 -0
  97. api581/prd_consequences.py +245 -0
  98. api581/prd_history.py +44 -0
  99. api581/py.typed +0 -0
  100. api581/release.py +307 -0
  101. api581/representative_fluids.py +172 -0
  102. api581/result.py +50 -0
  103. api581/risk.py +191 -0
  104. api581/saturation.py +66 -0
  105. api581/scc_mechanisms.py +242 -0
  106. api581/schema.py +45 -0
  107. api581/slabx_adapter.py +261 -0
  108. api581/soil_corrosion.py +191 -0
  109. api581/source_partition.py +169 -0
  110. api581/spatial.py +87 -0
  111. api581/ssc_screening.py +77 -0
  112. api581/standard.py +281 -0
  113. api581/storage.py +42 -0
  114. api581/sulfidic_corrosion.py +197 -0
  115. api581/sulfuric_acid.py +209 -0
  116. api581/tank.py +260 -0
  117. api581/tank_corrosion.py +256 -0
  118. api581/tank_environment.py +186 -0
  119. api581/tank_financial.py +202 -0
  120. api581/tank_integrated.py +51 -0
  121. api581/tank_shell.py +141 -0
  122. api581/tank_source.py +152 -0
  123. api581/tank_thinning.py +204 -0
  124. api581/temper.py +105 -0
  125. api581/thinning.py +172 -0
  126. api581/thinning_conditions.py +212 -0
  127. api581/thinning_history.py +118 -0
  128. api581/thinning_selection.py +81 -0
  129. api581/thinning_type.py +34 -0
  130. api581/toxic_criteria.py +111 -0
  131. api581/toxic_level2.py +233 -0
  132. api581/two_phase_events.py +120 -0
  133. api581/workflow.py +42 -0
  134. api581_engine-0.1.4.dist-info/METADATA +419 -0
  135. api581_engine-0.1.4.dist-info/RECORD +139 -0
  136. api581_engine-0.1.4.dist-info/WHEEL +5 -0
  137. api581_engine-0.1.4.dist-info/licenses/LICENSE +161 -0
  138. api581_engine-0.1.4.dist-info/licenses/NOTICE.md +18 -0
  139. api581_engine-0.1.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,115 @@
1
+ """Public financial calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+ from ..cost_tables import ComponentOutage as Cost_tablesComponentOutageInput
8
+ from ..consequences import HoleFinancial as HoleFinancialInput
9
+ from ..cost_tables import RepairCost as RepairCostInput
10
+
11
+ from ..consequences import SurroundingCost as SurroundingDamageInput
12
+ from ..outputs import FinancialSurroundingDamageOutput as SurroundingDamageOutput
13
+
14
+ def surrounding_damage(inputs: SurroundingDamageInput, *, context: Context | None = None) -> CalculationResult[SurroundingDamageOutput]:
15
+ 'Surrounding equipment damage cost'
16
+ return calculate('financial/surrounding-damage', inputs, output_type=SurroundingDamageOutput, context=context)
17
+
18
+
19
+ from ..consequences import ProductionCost as ProductionLossInput
20
+ from ..outputs import FinancialProductionLossOutput as ProductionLossOutput
21
+
22
+ def production_loss(inputs: ProductionLossInput, *, context: Context | None = None) -> CalculationResult[ProductionLossOutput]:
23
+ 'Business interruption cost'
24
+ return calculate('financial/production-loss', inputs, output_type=ProductionLossOutput, context=context)
25
+
26
+
27
+ from ..consequences import InjuryCost as InjuryInput
28
+ from ..outputs import FinancialInjuryOutput as InjuryOutput
29
+
30
+ def injury(inputs: InjuryInput, *, context: Context | None = None) -> CalculationResult[InjuryOutput]:
31
+ 'Potential injury cost'
32
+ return calculate('financial/injury', inputs, output_type=InjuryOutput, context=context)
33
+
34
+
35
+ from ..consequences import Spill as SpillCleanupInput
36
+ from ..outputs import FinancialSpillCleanupOutput as SpillCleanupOutput
37
+
38
+ def spill_cleanup(inputs: SpillCleanupInput, *, context: Context | None = None) -> CalculationResult[SpillCleanupOutput]:
39
+ 'Liquid spill remediation volume and cost'
40
+ return calculate('financial/spill-cleanup', inputs, output_type=SpillCleanupOutput, context=context)
41
+
42
+
43
+ from ..consequences import FinancialByHole as HoleTotalInput
44
+ from ..outputs import FinancialHoleTotalOutput as HoleTotalOutput
45
+
46
+ def hole_total(inputs: HoleTotalInput, *, context: Context | None = None) -> CalculationResult[HoleTotalOutput]:
47
+ 'Four-hole financial consequence and annual risk roll-up'
48
+ return calculate('financial/hole-total', inputs, output_type=HoleTotalOutput, context=context)
49
+
50
+
51
+ from ..pof import Component as RepairTableInput
52
+ from ..outputs import FinancialRepairTableOutput as RepairTableOutput
53
+
54
+ def repair_table(inputs: RepairTableInput, *, context: Context | None = None) -> CalculationResult[RepairTableOutput]:
55
+ '2001 USD component repair cost table'
56
+ return calculate('financial/repair-table', inputs, output_type=RepairTableOutput, context=context)
57
+
58
+
59
+ from ..cost_tables import Material as MaterialFactorInput
60
+ from ..outputs import FinancialMaterialFactorOutput as MaterialFactorOutput
61
+
62
+ def material_factor(inputs: MaterialFactorInput, *, context: Context | None = None) -> CalculationResult[MaterialFactorOutput]:
63
+ 'Material repair cost multiplier'
64
+ return calculate('financial/material-factor', inputs, output_type=MaterialFactorOutput, context=context)
65
+
66
+
67
+ from ..pof import Component as OutageTableInput
68
+ from ..outputs import FinancialOutageTableOutput as OutageTableOutput
69
+
70
+ def outage_table(inputs: OutageTableInput, *, context: Context | None = None) -> CalculationResult[OutageTableOutput]:
71
+ 'Estimated equipment outage table'
72
+ return calculate('financial/outage-table', inputs, output_type=OutageTableOutput, context=context)
73
+
74
+
75
+ from ..cost_tables import RepairCost as ComponentRepairInput
76
+ from ..outputs import FinancialComponentRepairOutput as ComponentRepairOutput
77
+
78
+ def component_repair(inputs: ComponentRepairInput, *, context: Context | None = None) -> CalculationResult[ComponentRepairOutput]:
79
+ 'GFF-weighted material-adjusted component repair cost'
80
+ return calculate('financial/component-repair', inputs, output_type=ComponentRepairOutput, context=context)
81
+
82
+
83
+ from ..cost_tables import ComponentOutage as ComponentOutageInput
84
+ from ..outputs import FinancialComponentOutageOutput as ComponentOutageOutput
85
+
86
+ def component_outage(inputs: ComponentOutageInput, *, context: Context | None = None) -> CalculationResult[ComponentOutageOutput]:
87
+ 'GFF-weighted component outage duration'
88
+ return calculate('financial/component-outage', inputs, output_type=ComponentOutageOutput, context=context)
89
+
90
+
91
+ from ..cost_tables import SurroundingOutage as SurroundingOutageInput
92
+ from ..outputs import FinancialSurroundingOutageOutput as SurroundingOutageOutput
93
+
94
+ def surrounding_outage(inputs: SurroundingOutageInput, *, context: Context | None = None) -> CalculationResult[SurroundingOutageOutput]:
95
+ 'Surrounding equipment repair outage correlation'
96
+ return calculate('financial/surrounding-outage', inputs, output_type=SurroundingOutageOutput, context=context)
97
+
98
+
99
+ from ..cost_tables import CleanupEligibility as CleanupEligibilityInput
100
+ from ..outputs import FinancialCleanupEligibilityOutput as CleanupEligibilityOutput
101
+
102
+ def cleanup_eligibility(inputs: CleanupEligibilityInput, *, context: Context | None = None) -> CalculationResult[CleanupEligibilityOutput]:
103
+ 'Level 1 environmental cleanup screening'
104
+ return calculate('financial/cleanup-eligibility', inputs, output_type=CleanupEligibilityOutput, context=context)
105
+
106
+
107
+ from ..cost_tables import FinancialConsequence as Level1ConsequenceInput
108
+ from ..outputs import FinancialLevel1ConsequenceOutput as Level1ConsequenceOutput
109
+
110
+ def level1_consequence(inputs: Level1ConsequenceInput, *, context: Context | None = None) -> CalculationResult[Level1ConsequenceOutput]:
111
+ 'Compose five Level 1 financial consequence categories'
112
+ return calculate('financial/level1-consequence', inputs, output_type=Level1ConsequenceOutput, context=context)
113
+
114
+
115
+ __all__ = ['Cost_tablesComponentOutageInput', 'HoleFinancialInput', 'RepairCostInput', 'surrounding_damage', 'SurroundingDamageInput', 'SurroundingDamageOutput', 'production_loss', 'ProductionLossInput', 'ProductionLossOutput', 'injury', 'InjuryInput', 'InjuryOutput', 'spill_cleanup', 'SpillCleanupInput', 'SpillCleanupOutput', 'hole_total', 'HoleTotalInput', 'HoleTotalOutput', 'repair_table', 'RepairTableInput', 'RepairTableOutput', 'material_factor', 'MaterialFactorInput', 'MaterialFactorOutput', 'outage_table', 'OutageTableInput', 'OutageTableOutput', 'component_repair', 'ComponentRepairInput', 'ComponentRepairOutput', 'component_outage', 'ComponentOutageInput', 'ComponentOutageOutput', 'surrounding_outage', 'SurroundingOutageInput', 'SurroundingOutageOutput', 'cleanup_eligibility', 'CleanupEligibilityInput', 'CleanupEligibilityOutput', 'level1_consequence', 'Level1ConsequenceInput', 'Level1ConsequenceOutput']
@@ -0,0 +1,40 @@
1
+ """Public frequency calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+
8
+ from ..pof import Component as GenericInput
9
+ from ..outputs import FrequencyGenericOutput as GenericOutput
10
+
11
+ def generic(inputs: GenericInput, *, context: Context | None = None) -> CalculationResult[GenericOutput]:
12
+ 'Component generic failure frequencies'
13
+ return calculate('frequency/generic', inputs, output_type=GenericOutput, context=context)
14
+
15
+
16
+ from ..pof import Management as ManagementFactorInput
17
+ from ..outputs import FrequencyManagementFactorOutput as ManagementFactorOutput
18
+
19
+ def management_factor(inputs: ManagementFactorInput, *, context: Context | None = None) -> CalculationResult[ManagementFactorOutput]:
20
+ 'Management systems factor'
21
+ return calculate('frequency/management-factor', inputs, output_type=ManagementFactorOutput, context=context)
22
+
23
+
24
+ from ..pof import Frequency as AdjustedInput
25
+ from ..outputs import FrequencyAdjustedOutput as AdjustedOutput
26
+
27
+ def adjusted(inputs: AdjustedInput, *, context: Context | None = None) -> CalculationResult[AdjustedOutput]:
28
+ 'Damage-adjusted annual failure frequency'
29
+ return calculate('frequency/adjusted', inputs, output_type=AdjustedOutput, context=context)
30
+
31
+
32
+ from ..pof import PofMethodSelection as PofMethodSelectionInput
33
+ from ..outputs import FrequencyPofMethodSelectionOutput as PofMethodSelectionOutput
34
+
35
+ def pof_method_selection(inputs: PofMethodSelectionInput, *, context: Context | None = None) -> CalculationResult[PofMethodSelectionOutput]:
36
+ 'Probability-of-failure methodology selection'
37
+ return calculate('frequency/pof-method-selection', inputs, output_type=PofMethodSelectionOutput, context=context)
38
+
39
+
40
+ __all__ = ['generic', 'GenericInput', 'GenericOutput', 'management_factor', 'ManagementFactorInput', 'ManagementFactorOutput', 'adjusted', 'AdjustedInput', 'AdjustedOutput', 'pof_method_selection', 'PofMethodSelectionInput', 'PofMethodSelectionOutput']
@@ -0,0 +1,96 @@
1
+ """Public inspection calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+
8
+ from ..pof import InspectionEquivalent as EquivalentInput
9
+ from ..outputs import InspectionEquivalentOutput as EquivalentOutput
10
+
11
+ def equivalent(inputs: EquivalentInput, *, context: Context | None = None) -> CalculationResult[EquivalentOutput]:
12
+ 'Equivalent inspection counts'
13
+ return calculate('inspection/equivalent', inputs, output_type=EquivalentOutput, context=context)
14
+
15
+
16
+ from ..pof import InspectionEffectivenessSummary as EffectivenessSummaryInput
17
+ from ..outputs import InspectionEffectivenessSummaryOutput as EffectivenessSummaryOutput
18
+
19
+ def effectiveness_summary(inputs: EffectivenessSummaryInput, *, context: Context | None = None) -> CalculationResult[EffectivenessSummaryOutput]:
20
+ 'Combine inspection effectiveness history into highest category and equivalent counts'
21
+ return calculate('inspection/effectiveness-summary', inputs, output_type=EffectivenessSummaryOutput, context=context)
22
+
23
+
24
+ from ..inspection_effectiveness import EffectivenessCategory as EffectivenessCategoryInput
25
+ from ..outputs import InspectionEffectivenessCategoryOutput as EffectivenessCategoryOutput
26
+
27
+ def effectiveness_category(inputs: EffectivenessCategoryInput, *, context: Context | None = None) -> CalculationResult[EffectivenessCategoryOutput]:
28
+ 'API 581 Annex 2.C common inspection effectiveness category metadata'
29
+ return calculate('inspection/effectiveness-category', inputs, output_type=EffectivenessCategoryOutput, context=context)
30
+
31
+
32
+ from ..inspection_effectiveness import ThinningInspectionEffectiveness as ThinningEffectivenessInput
33
+ from ..outputs import InspectionThinningEffectivenessOutput as ThinningEffectivenessOutput
34
+
35
+ def thinning_effectiveness(inputs: ThinningEffectivenessInput, *, context: Context | None = None) -> CalculationResult[ThinningEffectivenessOutput]:
36
+ 'API 581 Annex 2.C.8 thinning inspection effectiveness category'
37
+ return calculate('inspection/thinning-effectiveness', inputs, output_type=ThinningEffectivenessOutput, context=context)
38
+
39
+
40
+ from ..inspection_effectiveness import SccInspectionEffectiveness as SccEffectivenessInput
41
+ from ..outputs import InspectionSccEffectivenessOutput as SccEffectivenessOutput
42
+
43
+ def scc_effectiveness(inputs: SccEffectivenessInput, *, context: Context | None = None) -> CalculationResult[SccEffectivenessOutput]:
44
+ 'API 581 Annex 2.C.9 stress-corrosion-cracking inspection effectiveness category'
45
+ return calculate('inspection/scc-effectiveness', inputs, output_type=SccEffectivenessOutput, context=context)
46
+
47
+
48
+ from ..inspection_effectiveness import ExternalInspectionEffectiveness as ExternalEffectivenessInput
49
+ from ..outputs import InspectionExternalEffectivenessOutput as ExternalEffectivenessOutput
50
+
51
+ def external_effectiveness(inputs: ExternalEffectivenessInput, *, context: Context | None = None) -> CalculationResult[ExternalEffectivenessOutput]:
52
+ 'API 581 Annex 2.C.10 external-damage inspection effectiveness category'
53
+ return calculate('inspection/external-effectiveness', inputs, output_type=ExternalEffectivenessOutput, context=context)
54
+
55
+
56
+ from ..inspection_effectiveness import BuriedInspectionEffectiveness as BuriedEffectivenessInput
57
+ from ..outputs import InspectionBuriedEffectivenessOutput as BuriedEffectivenessOutput
58
+
59
+ def buried_effectiveness(inputs: BuriedEffectivenessInput, *, context: Context | None = None) -> CalculationResult[BuriedEffectivenessOutput]:
60
+ 'API 581 Annex 2.C.7 buried-component inspection effectiveness category'
61
+ return calculate('inspection/buried-effectiveness', inputs, output_type=BuriedEffectivenessOutput, context=context)
62
+
63
+
64
+ from ..inspection_effectiveness import PrdInspectionEffectiveness as PrdEffectivenessInput
65
+ from ..outputs import InspectionPrdEffectivenessOutput as PrdEffectivenessOutput
66
+
67
+ def prd_effectiveness(inputs: PrdEffectivenessInput, *, context: Context | None = None) -> CalculationResult[PrdEffectivenessOutput]:
68
+ 'API 581 Annex 2.C.3 pressure-relief-device inspection effectiveness category'
69
+ return calculate('inspection/prd-effectiveness', inputs, output_type=PrdEffectivenessOutput, context=context)
70
+
71
+
72
+ from ..inspection_effectiveness import LiningInspectionEffectiveness as LiningEffectivenessInput
73
+ from ..outputs import InspectionLiningEffectivenessOutput as LiningEffectivenessOutput
74
+
75
+ def lining_effectiveness(inputs: LiningEffectivenessInput, *, context: Context | None = None) -> CalculationResult[LiningEffectivenessOutput]:
76
+ 'API 581 Annex 2.C.6 non-metallic lining inspection effectiveness category'
77
+ return calculate('inspection/lining-effectiveness', inputs, output_type=LiningEffectivenessOutput, context=context)
78
+
79
+
80
+ from ..inspection_effectiveness import TubeBundleInspectionUncertainty as TubeBundleUncertaintyInput
81
+ from ..outputs import InspectionTubeBundleUncertaintyOutput as TubeBundleUncertaintyOutput
82
+
83
+ def tube_bundle_uncertainty(inputs: TubeBundleUncertaintyInput, *, context: Context | None = None) -> CalculationResult[TubeBundleUncertaintyOutput]:
84
+ 'API 581 Annex 2.C.4.1 default tube-bundle inspection uncertainty'
85
+ return calculate('inspection/tube-bundle-uncertainty', inputs, output_type=TubeBundleUncertaintyOutput, context=context)
86
+
87
+
88
+ from ..inspection_effectiveness import AstInspectionEffectiveness as AstEffectivenessInput
89
+ from ..outputs import InspectionAstEffectivenessOutput as AstEffectivenessOutput
90
+
91
+ def ast_effectiveness(inputs: AstEffectivenessInput, *, context: Context | None = None) -> CalculationResult[AstEffectivenessOutput]:
92
+ 'API 581 Annex 2.C.5 atmospheric storage tank inspection effectiveness category'
93
+ return calculate('inspection/ast-effectiveness', inputs, output_type=AstEffectivenessOutput, context=context)
94
+
95
+
96
+ __all__ = ['equivalent', 'EquivalentInput', 'EquivalentOutput', 'effectiveness_summary', 'EffectivenessSummaryInput', 'EffectivenessSummaryOutput', 'effectiveness_category', 'EffectivenessCategoryInput', 'EffectivenessCategoryOutput', 'thinning_effectiveness', 'ThinningEffectivenessInput', 'ThinningEffectivenessOutput', 'scc_effectiveness', 'SccEffectivenessInput', 'SccEffectivenessOutput', 'external_effectiveness', 'ExternalEffectivenessInput', 'ExternalEffectivenessOutput', 'buried_effectiveness', 'BuriedEffectivenessInput', 'BuriedEffectivenessOutput', 'prd_effectiveness', 'PrdEffectivenessInput', 'PrdEffectivenessOutput', 'lining_effectiveness', 'LiningEffectivenessInput', 'LiningEffectivenessOutput', 'tube_bundle_uncertainty', 'TubeBundleUncertaintyInput', 'TubeBundleUncertaintyOutput', 'ast_effectiveness', 'AstEffectivenessInput', 'AstEffectivenessOutput']
api581/api/level1.py ADDED
@@ -0,0 +1,238 @@
1
+ """Public level1 calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+ from ..release import Gas as GasInput
8
+ from ..level1_summary import HoleAreas as HoleAreasInput
9
+ from ..release import Liquid as LiquidInput
10
+ from ..level1_toxic import MitigationCredits as MitigationCreditsInput
11
+ from ..level1_toxic import ToxicHoleCase as ToxicHoleCaseInput
12
+ from ..level1_toxic import ToxicMixtureComponentArea as ToxicMixtureComponentAreaInput
13
+
14
+ from ..consequences import Mitigation as MitigationInput
15
+ from ..outputs import Level1MitigationOutput as MitigationOutput
16
+
17
+ def mitigation(inputs: MitigationInput, *, context: Context | None = None) -> CalculationResult[MitigationOutput]:
18
+ 'Flammable consequence mitigation factor'
19
+ return calculate('level1/mitigation', inputs, output_type=MitigationOutput, context=context)
20
+
21
+
22
+ from ..consequences import ToxicSource as ToxicSourceInput
23
+ from ..outputs import Level1ToxicSourceOutput as ToxicSourceOutput
24
+
25
+ def toxic_source(inputs: ToxicSourceInput, *, context: Context | None = None) -> CalculationResult[ToxicSourceOutput]:
26
+ 'Toxic component rate and mass'
27
+ return calculate('level1/toxic-source', inputs, output_type=ToxicSourceOutput, context=context)
28
+
29
+
30
+ from ..consequences import ToxicDuration as ToxicDurationInput
31
+ from ..outputs import Level1ToxicDurationOutput as ToxicDurationOutput
32
+
33
+ def toxic_duration(inputs: ToxicDurationInput, *, context: Context | None = None) -> CalculationResult[ToxicDurationOutput]:
34
+ 'Toxic release exposure duration'
35
+ return calculate('level1/toxic-duration', inputs, output_type=ToxicDurationOutput, context=context)
36
+
37
+
38
+ from ..consequences import ToxicArea as ToxicAreaInput
39
+ from ..outputs import Level1ToxicAreaOutput as ToxicAreaOutput
40
+
41
+ def toxic_area(inputs: ToxicAreaInput, *, context: Context | None = None) -> CalculationResult[ToxicAreaOutput]:
42
+ 'Ammonia/chlorine toxic consequence area'
43
+ return calculate('level1/toxic-area', inputs, output_type=ToxicAreaOutput, context=context)
44
+
45
+
46
+ from ..consequences import Steam as SteamAreaInput
47
+ from ..outputs import Level1SteamAreaOutput as SteamAreaOutput
48
+
49
+ def steam_area(inputs: SteamAreaInput, *, context: Context | None = None) -> CalculationResult[SteamAreaOutput]:
50
+ 'Steam leak personnel consequence area'
51
+ return calculate('level1/steam-area', inputs, output_type=SteamAreaOutput, context=context)
52
+
53
+
54
+ from ..consequences import Acid as AcidCausticAreaInput
55
+ from ..outputs import Level1AcidCausticAreaOutput as AcidCausticAreaOutput
56
+
57
+ def acid_caustic_area(inputs: AcidCausticAreaInput, *, context: Context | None = None) -> CalculationResult[AcidCausticAreaOutput]:
58
+ 'Acid/caustic splash personnel consequence'
59
+ return calculate('level1/acid-caustic-area', inputs, output_type=AcidCausticAreaOutput, context=context)
60
+
61
+
62
+ from ..level1_toxic import HfH2sCoefficients as HfH2sToxicCoefficientsInput
63
+ from ..outputs import Level1HfH2sToxicCoefficientsOutput as HfH2sToxicCoefficientsOutput
64
+
65
+ def hf_h2s_toxic_coefficients(inputs: HfH2sToxicCoefficientsInput, *, context: Context | None = None) -> CalculationResult[HfH2sToxicCoefficientsOutput]:
66
+ 'HF/H2S native toxic log-correlation coefficients'
67
+ return calculate('level1/hf-h2s-toxic-coefficients', inputs, output_type=HfH2sToxicCoefficientsOutput, context=context)
68
+
69
+
70
+ from ..level1_toxic import HfH2sArea as HfH2sToxicAreaInput
71
+ from ..outputs import Level1HfH2sToxicAreaOutput as HfH2sToxicAreaOutput
72
+
73
+ def hf_h2s_toxic_area(inputs: HfH2sToxicAreaInput, *, context: Context | None = None) -> CalculationResult[HfH2sToxicAreaOutput]:
74
+ 'HF/H2S duration-dependent toxic consequence area'
75
+ return calculate('level1/hf-h2s-toxic-area', inputs, output_type=HfH2sToxicAreaOutput, context=context)
76
+
77
+
78
+ from ..level1_toxic import MiscCoefficients as MiscToxicCoefficientsInput
79
+ from ..outputs import Level1MiscToxicCoefficientsOutput as MiscToxicCoefficientsOutput
80
+
81
+ def misc_toxic_coefficients(inputs: MiscToxicCoefficientsInput, *, context: Context | None = None) -> CalculationResult[MiscToxicCoefficientsOutput]:
82
+ 'Miscellaneous continuous toxic SI coefficients'
83
+ return calculate('level1/misc-toxic-coefficients', inputs, output_type=MiscToxicCoefficientsOutput, context=context)
84
+
85
+
86
+ from ..level1_toxic import MiscArea as MiscToxicAreaInput
87
+ from ..outputs import Level1MiscToxicAreaOutput as MiscToxicAreaOutput
88
+
89
+ def misc_toxic_area(inputs: MiscToxicAreaInput, *, context: Context | None = None) -> CalculationResult[MiscToxicAreaOutput]:
90
+ 'Ten additional chemical continuous toxic consequence areas'
91
+ return calculate('level1/misc-toxic-area', inputs, output_type=MiscToxicAreaOutput, context=context)
92
+
93
+
94
+ from ..level1_toxic import ToxicCutoff as ToxicCutoffInput
95
+ from ..outputs import Level1ToxicCutoffOutput as ToxicCutoffOutput
96
+
97
+ def toxic_cutoff(inputs: ToxicCutoffInput, *, context: Context | None = None) -> CalculationResult[ToxicCutoffOutput]:
98
+ 'Historical Level1 toxic concentration screening'
99
+ return calculate('level1/toxic-cutoff', inputs, output_type=ToxicCutoffOutput, context=context)
100
+
101
+
102
+ from ..level1_toxic import ToxicMitigation as ToxicMitigationInput
103
+ from ..outputs import Level1ToxicMitigationOutput as ToxicMitigationOutput
104
+
105
+ def toxic_mitigation(inputs: ToxicMitigationInput, *, context: Context | None = None) -> CalculationResult[ToxicMitigationOutput]:
106
+ 'Apply explicit toxic source mitigation credits'
107
+ return calculate('level1/toxic-mitigation', inputs, output_type=ToxicMitigationOutput, context=context)
108
+
109
+
110
+ from ..level1_toxic import ToxicComponent as ToxicComponentConsequenceInput
111
+ from ..outputs import Level1ToxicComponentConsequenceOutput as ToxicComponentConsequenceOutput
112
+
113
+ def toxic_component_consequence(inputs: ToxicComponentConsequenceInput, *, context: Context | None = None) -> CalculationResult[ToxicComponentConsequenceOutput]:
114
+ 'Compose toxic source/duration/mitigation and per-component area'
115
+ return calculate('level1/toxic-component-consequence', inputs, output_type=ToxicComponentConsequenceOutput, context=context)
116
+
117
+
118
+ from ..level1_toxic import ToxicMixtureAreas as ToxicMixtureConsequenceInput
119
+ from ..outputs import Level1ToxicMixtureConsequenceOutput as ToxicMixtureConsequenceOutput
120
+
121
+ def toxic_mixture_consequence(inputs: ToxicMixtureConsequenceInput, *, context: Context | None = None) -> CalculationResult[ToxicMixtureConsequenceOutput]:
122
+ 'Largest individual Level 1 toxic consequence area for a mixture'
123
+ return calculate('level1/toxic-mixture-consequence', inputs, output_type=ToxicMixtureConsequenceOutput, context=context)
124
+
125
+
126
+ from ..level1_toxic import ToxicHoleSummary as ToxicHoleSummaryInput
127
+ from ..outputs import Level1ToxicHoleSummaryOutput as ToxicHoleSummaryOutput
128
+
129
+ def toxic_hole_summary(inputs: ToxicHoleSummaryInput, *, context: Context | None = None) -> CalculationResult[ToxicHoleSummaryOutput]:
130
+ 'Four-hole GFF-weighted Level 1 toxic consequence'
131
+ return calculate('level1/toxic-hole-summary', inputs, output_type=ToxicHoleSummaryOutput, context=context)
132
+
133
+
134
+ from ..level1 import Coefficients as FlammableCoefficientsInput
135
+ from ..outputs import Level1FlammableCoefficientsOutput as FlammableCoefficientsOutput
136
+
137
+ def flammable_coefficients(inputs: FlammableCoefficientsInput, *, context: Context | None = None) -> CalculationResult[FlammableCoefficientsOutput]:
138
+ 'SI flammable consequence coefficients'
139
+ return calculate('level1/flammable-coefficients', inputs, output_type=FlammableCoefficientsOutput, context=context)
140
+
141
+
142
+ from ..level1 import FinalPhase as ReleasePhaseInput
143
+ from ..outputs import Level1ReleasePhaseOutput as ReleasePhaseOutput
144
+
145
+ def release_phase(inputs: ReleasePhaseInput, *, context: Context | None = None) -> CalculationResult[ReleasePhaseOutput]:
146
+ 'Level 1 final consequence phase'
147
+ return calculate('level1/release-phase', inputs, output_type=ReleasePhaseOutput, context=context)
148
+
149
+
150
+ from ..level1 import Energy as EnergyEfficiencyInput
151
+ from ..outputs import Level1EnergyEfficiencyOutput as EnergyEfficiencyOutput
152
+
153
+ def energy_efficiency(inputs: EnergyEfficiencyInput, *, context: Context | None = None) -> CalculationResult[EnergyEfficiencyOutput]:
154
+ 'Instantaneous energy efficiency correction'
155
+ return calculate('level1/energy-efficiency', inputs, output_type=EnergyEfficiencyOutput, context=context)
156
+
157
+
158
+ from ..level1 import Blending as BlendingFactorsInput
159
+ from ..outputs import Level1BlendingFactorsOutput as BlendingFactorsOutput
160
+
161
+ def blending_factors(inputs: BlendingFactorsInput, *, context: Context | None = None) -> CalculationResult[BlendingFactorsOutput]:
162
+ 'Type 0 release/AIT blending factors'
163
+ return calculate('level1/blending-factors', inputs, output_type=BlendingFactorsOutput, context=context)
164
+
165
+
166
+ from ..level1 import Area as FlammableAreaInput
167
+ from ..outputs import Level1FlammableAreaOutput as FlammableAreaOutput
168
+
169
+ def flammable_area(inputs: FlammableAreaInput, *, context: Context | None = None) -> CalculationResult[FlammableAreaOutput]:
170
+ 'Type 0 per-hole blended flammable consequence'
171
+ return calculate('level1/flammable-area', inputs, output_type=FlammableAreaOutput, context=context)
172
+
173
+
174
+ from ..level1 import ReleaseToFlammable as ReleaseToFlammableInput
175
+ from ..outputs import Level1ReleaseToFlammableOutput as ReleaseToFlammableOutput
176
+
177
+ def release_to_flammable(inputs: ReleaseToFlammableInput, *, context: Context | None = None) -> CalculationResult[ReleaseToFlammableOutput]:
178
+ 'Compose source, inventory, controls and per-hole flammable area'
179
+ return calculate('level1/release-to-flammable', inputs, output_type=ReleaseToFlammableOutput, context=context)
180
+
181
+
182
+ from ..level1 import ReleaseToAcid as ReleaseToAcidInput
183
+ from ..outputs import Level1ReleaseToAcidOutput as ReleaseToAcidOutput
184
+
185
+ def release_to_acid(inputs: ReleaseToAcidInput, *, context: Context | None = None) -> CalculationResult[ReleaseToAcidOutput]:
186
+ 'Compose controlled release and ACID splash consequence'
187
+ return calculate('level1/release-to-acid', inputs, output_type=ReleaseToAcidOutput, context=context)
188
+
189
+
190
+ from ..level1 import ReleaseToSteam as ReleaseToSteamInput
191
+ from ..outputs import Level1ReleaseToSteamOutput as ReleaseToSteamOutput
192
+
193
+ def release_to_steam(inputs: ReleaseToSteamInput, *, context: Context | None = None) -> CalculationResult[ReleaseToSteamOutput]:
194
+ 'Compose controlled release and Level 1 steam consequence'
195
+ return calculate('level1/release-to-steam', inputs, output_type=ReleaseToSteamOutput, context=context)
196
+
197
+
198
+ from ..level1 import ReleaseToToxic as ReleaseToToxicInput
199
+ from ..outputs import Level1ReleaseToToxicOutput as ReleaseToToxicOutput
200
+
201
+ def release_to_toxic(inputs: ReleaseToToxicInput, *, context: Context | None = None) -> CalculationResult[ReleaseToToxicOutput]:
202
+ 'Compose controlled release and Level 1 toxic consequence'
203
+ return calculate('level1/release-to-toxic', inputs, output_type=ReleaseToToxicOutput, context=context)
204
+
205
+
206
+ from ..level1_summary import Summary as ConsequenceSummaryInput
207
+ from ..outputs import Level1ConsequenceSummaryOutput as ConsequenceSummaryOutput
208
+
209
+ def consequence_summary(inputs: ConsequenceSummaryInput, *, context: Context | None = None) -> CalculationResult[ConsequenceSummaryOutput]:
210
+ 'Four-hole mechanism-weighted final consequence areas'
211
+ return calculate('level1/consequence-summary', inputs, output_type=ConsequenceSummaryOutput, context=context)
212
+
213
+
214
+ from ..level1_type1 import Type1Area as Type1FlammableAreaInput
215
+ from ..outputs import Level1Type1FlammableAreaOutput as Type1FlammableAreaOutput
216
+
217
+ def type1_flammable_area(inputs: Type1FlammableAreaInput, *, context: Context | None = None) -> CalculationResult[Type1FlammableAreaOutput]:
218
+ 'Type1 single-effect flammable consequence area'
219
+ return calculate('level1/type1-flammable-area', inputs, output_type=Type1FlammableAreaOutput, context=context)
220
+
221
+
222
+ from ..level1_type1 import Type1Consequence as Type1FlammableConsequenceInput
223
+ from ..outputs import Level1Type1FlammableConsequenceOutput as Type1FlammableConsequenceOutput
224
+
225
+ def type1_flammable_consequence(inputs: Type1FlammableConsequenceInput, *, context: Context | None = None) -> CalculationResult[Type1FlammableConsequenceOutput]:
226
+ 'Type1 equipment and personnel flammable areas'
227
+ return calculate('level1/type1-flammable-consequence', inputs, output_type=Type1FlammableConsequenceOutput, context=context)
228
+
229
+
230
+ from ..level1_type1 import ReleaseToType1 as ReleaseToType1FlammableInput
231
+ from ..outputs import Level1ReleaseToType1FlammableOutput as ReleaseToType1FlammableOutput
232
+
233
+ def release_to_type1_flammable(inputs: ReleaseToType1FlammableInput, *, context: Context | None = None) -> CalculationResult[ReleaseToType1FlammableOutput]:
234
+ 'Compose controlled release and Type1 flammable consequence'
235
+ return calculate('level1/release-to-type1-flammable', inputs, output_type=ReleaseToType1FlammableOutput, context=context)
236
+
237
+
238
+ __all__ = ['GasInput', 'HoleAreasInput', 'LiquidInput', 'MitigationCreditsInput', 'ToxicHoleCaseInput', 'ToxicMixtureComponentAreaInput', 'mitigation', 'MitigationInput', 'MitigationOutput', 'toxic_source', 'ToxicSourceInput', 'ToxicSourceOutput', 'toxic_duration', 'ToxicDurationInput', 'ToxicDurationOutput', 'toxic_area', 'ToxicAreaInput', 'ToxicAreaOutput', 'steam_area', 'SteamAreaInput', 'SteamAreaOutput', 'acid_caustic_area', 'AcidCausticAreaInput', 'AcidCausticAreaOutput', 'hf_h2s_toxic_coefficients', 'HfH2sToxicCoefficientsInput', 'HfH2sToxicCoefficientsOutput', 'hf_h2s_toxic_area', 'HfH2sToxicAreaInput', 'HfH2sToxicAreaOutput', 'misc_toxic_coefficients', 'MiscToxicCoefficientsInput', 'MiscToxicCoefficientsOutput', 'misc_toxic_area', 'MiscToxicAreaInput', 'MiscToxicAreaOutput', 'toxic_cutoff', 'ToxicCutoffInput', 'ToxicCutoffOutput', 'toxic_mitigation', 'ToxicMitigationInput', 'ToxicMitigationOutput', 'toxic_component_consequence', 'ToxicComponentConsequenceInput', 'ToxicComponentConsequenceOutput', 'toxic_mixture_consequence', 'ToxicMixtureConsequenceInput', 'ToxicMixtureConsequenceOutput', 'toxic_hole_summary', 'ToxicHoleSummaryInput', 'ToxicHoleSummaryOutput', 'flammable_coefficients', 'FlammableCoefficientsInput', 'FlammableCoefficientsOutput', 'release_phase', 'ReleasePhaseInput', 'ReleasePhaseOutput', 'energy_efficiency', 'EnergyEfficiencyInput', 'EnergyEfficiencyOutput', 'blending_factors', 'BlendingFactorsInput', 'BlendingFactorsOutput', 'flammable_area', 'FlammableAreaInput', 'FlammableAreaOutput', 'release_to_flammable', 'ReleaseToFlammableInput', 'ReleaseToFlammableOutput', 'release_to_acid', 'ReleaseToAcidInput', 'ReleaseToAcidOutput', 'release_to_steam', 'ReleaseToSteamInput', 'ReleaseToSteamOutput', 'release_to_toxic', 'ReleaseToToxicInput', 'ReleaseToToxicOutput', 'consequence_summary', 'ConsequenceSummaryInput', 'ConsequenceSummaryOutput', 'type1_flammable_area', 'Type1FlammableAreaInput', 'Type1FlammableAreaOutput', 'type1_flammable_consequence', 'Type1FlammableConsequenceInput', 'Type1FlammableConsequenceOutput', 'release_to_type1_flammable', 'ReleaseToType1FlammableInput', 'ReleaseToType1FlammableOutput']
api581/api/level2.py ADDED
@@ -0,0 +1,74 @@
1
+ """Public level2 calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+ from ..cost_tables import ComponentOutage as ComponentOutageInput
8
+ from ..level2_summary import CorrelatedJetPool as Level2_summaryCorrelatedJetPoolInput
9
+ from ..level2_summary import FinancialBasis as FinancialBasisInput
10
+ from ..level2_summary import FlammableOutcome as FlammableOutcomeInput
11
+ from ..level2_summary import FrequencyScenario as FrequencyScenarioInput
12
+ from ..level2_summary import MechanismHole as MechanismHoleInput
13
+ from ..level2_summary import NfntAreas as NfntAreasInput
14
+ from ..cost_tables import RepairCost as RepairCostInput
15
+ from ..level2_summary import ScenarioCase as ScenarioCaseInput
16
+ from ..toxic_level2 import ToxicCloudArea as ToxicCloudAreaInput
17
+
18
+ from ..level2_summary import CorrelatedJetPool as CorrelatedJetPoolInput
19
+ from ..outputs import Level2CorrelatedJetPoolOutput as CorrelatedJetPoolOutput
20
+
21
+ def correlated_jet_pool(inputs: CorrelatedJetPoolInput, *, context: Context | None = None) -> CalculationResult[CorrelatedJetPoolOutput]:
22
+ 'One immediate-ignition branch with max(jet,pool) area'
23
+ return calculate('level2/correlated-jet-pool', inputs, output_type=CorrelatedJetPoolOutput, context=context)
24
+
25
+
26
+ from ..level2_summary import FlammableCase as FlammableCaseInput
27
+ from ..outputs import Level2FlammableCaseOutput as FlammableCaseOutput
28
+
29
+ def flammable_case(inputs: FlammableCaseInput, *, context: Context | None = None) -> CalculationResult[FlammableCaseOutput]:
30
+ 'Flammable areas with optional correlated immediate branch'
31
+ return calculate('level2/flammable-case', inputs, output_type=FlammableCaseOutput, context=context)
32
+
33
+
34
+ from ..level2_summary import FinalArea as FinalAreaInput
35
+ from ..outputs import Level2FinalAreaOutput as FinalAreaOutput
36
+
37
+ def final_area(inputs: FinalAreaInput, *, context: Context | None = None) -> CalculationResult[FinalAreaOutput]:
38
+ 'Final Level2 component/personnel consequence areas'
39
+ return calculate('level2/final-area', inputs, output_type=FinalAreaOutput, context=context)
40
+
41
+
42
+ from ..level2_summary import ConsequenceSummary as ConsequenceSummaryInput
43
+ from ..outputs import Level2ConsequenceSummaryOutput as ConsequenceSummaryOutput
44
+
45
+ def consequence_summary(inputs: ConsequenceSummaryInput, *, context: Context | None = None) -> CalculationResult[ConsequenceSummaryOutput]:
46
+ 'GFF mechanism averages followed by Level2 final selection'
47
+ return calculate('level2/consequence-summary', inputs, output_type=ConsequenceSummaryOutput, context=context)
48
+
49
+
50
+ from ..level2_summary import ScenarioCase as ScenarioConsequenceInput
51
+ from ..outputs import Level2ScenarioConsequenceOutput as ScenarioConsequenceOutput
52
+
53
+ def scenario_consequence(inputs: ScenarioConsequenceInput, *, context: Context | None = None) -> CalculationResult[ScenarioConsequenceOutput]:
54
+ 'One-hole flammable/toxic/NFNT mechanism consequences'
55
+ return calculate('level2/scenario-consequence', inputs, output_type=ScenarioConsequenceOutput, context=context)
56
+
57
+
58
+ from ..level2_summary import ScenarioSummary as ScenarioSummaryInput
59
+ from ..outputs import Level2ScenarioSummaryOutput as ScenarioSummaryOutput
60
+
61
+ def scenario_summary(inputs: ScenarioSummaryInput, *, context: Context | None = None) -> CalculationResult[ScenarioSummaryOutput]:
62
+ 'Four raw event scenarios to final Level2 consequence areas'
63
+ return calculate('level2/scenario-summary', inputs, output_type=ScenarioSummaryOutput, context=context)
64
+
65
+
66
+ from ..level2_summary import Assessment as AssessmentInput
67
+ from ..outputs import Level2AssessmentOutput as AssessmentOutput
68
+
69
+ def assessment(inputs: AssessmentInput, *, context: Context | None = None) -> CalculationResult[AssessmentOutput]:
70
+ 'Supplied Level2 event consequences to financial/annual risk'
71
+ return calculate('level2/assessment', inputs, output_type=AssessmentOutput, context=context)
72
+
73
+
74
+ __all__ = ['ComponentOutageInput', 'Level2_summaryCorrelatedJetPoolInput', 'FinancialBasisInput', 'FlammableOutcomeInput', 'FrequencyScenarioInput', 'MechanismHoleInput', 'NfntAreasInput', 'RepairCostInput', 'ScenarioCaseInput', 'ToxicCloudAreaInput', 'correlated_jet_pool', 'CorrelatedJetPoolInput', 'CorrelatedJetPoolOutput', 'flammable_case', 'FlammableCaseInput', 'FlammableCaseOutput', 'final_area', 'FinalAreaInput', 'FinalAreaOutput', 'consequence_summary', 'ConsequenceSummaryInput', 'ConsequenceSummaryOutput', 'scenario_consequence', 'ScenarioConsequenceInput', 'ScenarioConsequenceOutput', 'scenario_summary', 'ScenarioSummaryInput', 'ScenarioSummaryOutput', 'assessment', 'AssessmentInput', 'AssessmentOutput']
api581/api/planning.py ADDED
@@ -0,0 +1,17 @@
1
+ """Public planning calculations. Inputs and outputs use named SI units.
2
+ Generated by scripts/build_python_api.py; inspect the request model for fields.
3
+ """
4
+ from ..core import Context
5
+ from ..result import CalculationResult, calculate
6
+
7
+ from ..risk import RiskPoint as RiskPointInput
8
+
9
+ from ..risk import Crossing as TargetCrossingInput
10
+ from ..outputs import PlanningTargetCrossingOutput as TargetCrossingOutput
11
+
12
+ def target_crossing(inputs: TargetCrossingInput, *, context: Context | None = None) -> CalculationResult[TargetCrossingOutput]:
13
+ 'First target crossing on a supplied risk curve'
14
+ return calculate('planning/target-crossing', inputs, output_type=TargetCrossingOutput, context=context)
15
+
16
+
17
+ __all__ = ['RiskPointInput', 'target_crossing', 'TargetCrossingInput', 'TargetCrossingOutput']