Skip to main content

HazardExposureScenario

Statistics scenarios · Implementation: mlsysim/engine/scenario_definitions/statistics.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

Failure-free exposure that bounds each of rates (constant hazards per hour) at one-sided confidence, against what rigs rigs or one rig over rig_time accumulate.

Notes

Equation: The zero-event Poisson relation exp(-rate*time)=1-confidence gives exposure by inversion.

Assumptions: A constant hazard, independent exposure, and no observed failures; rig exposure pools linearly.

Excludes: Changing operating conditions, reset downtime beyond the supplied duty schedule, and field-safety certification.

References

Derivation: The zero-event Poisson relation exp(-rate*time)=1-confidence gives exposure by inversion. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.

Examples

Evaluate a named scenario using its declared inputs.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.HazardExposureWall
>>> round(float(scenario.ln_inv_alpha), 4)
2.9957

Attributes

Name Description
confidence
hours_per_day
ln_inv_alpha Dimensionless negative logarithm of the one-sided confidence tail.
rates
rig_rate Smallest constant hazard in inverse hours that one rig’s failure-free rig_time can
rig_time
rigs

Methods

Name Description
calendar_days Calendar days needed at the supplied per-rig operating hours per day.
exposure Failure-free operating hours needed to bound the supplied constant hazard rate.
fleet_time Hours per rig when the required exposure is shared evenly across the independent rigs.
shortfall Dimensionless ratio of the one-rig demonstrated rate to the target rate.

calendar_days

engine.scenario_types.HazardExposureScenario.calendar_days(rate)

Calendar days needed at the supplied per-rig operating hours per day.

Days the rigs need, at hours_per_day each, to accumulate the exposure (added 2026-10-20).

Equation: (fleet_time(rate) / hours_per_day).to('day').

exposure

engine.scenario_types.HazardExposureScenario.exposure(rate)

Failure-free operating hours needed to bound the supplied constant hazard rate.

Equation: calc_empirical_testing_exposure(rate, confidence=confidence).to('hour').

fleet_time

engine.scenario_types.HazardExposureScenario.fleet_time(rate)

Hours per rig when the required exposure is shared evenly across the independent rigs.

Equation: (exposure(rate) / rigs).to('hour').

shortfall

engine.scenario_types.HazardExposureScenario.shortfall(rate)

Dimensionless ratio of the one-rig demonstrated rate to the target rate.

Equation: (rig_rate / rate).to('').magnitude.

rates

Type: List[Quantity].

Declared default: required.

confidence

Type: float.

Declared default: required.

rigs

Type: int.

Declared default: required.

rig_time

Type: Optional[Quantity].

Declared default: None.

hours_per_day

Type: Optional[Quantity].

Declared default: None.

ln_inv_alpha

engine.scenario_types.HazardExposureScenario.ln_inv_alpha

Dimensionless negative logarithm of the one-sided confidence tail.

Equation: -_math.log(1.0 - confidence).

rig_rate

engine.scenario_types.HazardExposureScenario.rig_rate

Smallest constant hazard in inverse hours that one rig’s failure-free rig_time can bound.

The smallest constant rate one rig running for rig_time can bound.

Equation: (ln_inv_alpha / rig_time).to('1/hour').

Back to top