bluemira.fuel_cycle.timeline_tools
Distribution and timeline utilities
Classes
Uniform learning strategy |
|
User-specified learning strategy to hard-code the operational availabilities at |
|
Gompertz learning strategy. |
|
Log-normal distribution strategy |
|
Truncated normal distribution strategy |
|
Exponential distribution strategy |
Module Contents
- class bluemira.fuel_cycle.timeline_tools.UniformLearningStrategy
Bases:
LearningStrategyUniform learning strategy
- static generate_phase_availabilities(lifetime_op_availability: float, op_durations: collections.abc.Iterable[float]) collections.abc.Iterable[float]
Generate operational availabilities for the specified phase durations.
- Parameters:
lifetime_op_availability (float) – Operational availability averaged over the lifetime
op_durations (collections.abc.Iterable[float]) – Durations of the operational phases [fpy]
- Returns:
Operational availabilities at each operational phase
- Return type:
collections.abc.Iterable[float]
- class bluemira.fuel_cycle.timeline_tools.UserSpecifiedLearningStrategy(operational_availabilities: collections.abc.Iterable[float])
Bases:
LearningStrategyUser-specified learning strategy to hard-code the operational availabilities at each operational phase.
- Parameters:
operational_availabilities (collections.abc.Iterable[float])
- operational_availabilities
- generate_phase_availabilities(lifetime_op_availability: float, op_durations: collections.abc.Iterable[float]) collections.abc.Iterable[float]
Generate operational availabilities for the specified phase durations.
- Parameters:
lifetime_op_availability (float) – Lifetime operational availability
op_durations (collections.abc.Iterable[float]) – Durations of the operational phases [fpy]
- Returns:
Operational availabilities at each operational phase
- Raises:
FuelCycleError – Number of phases should be equal to the number of operational availabilities
- Return type:
collections.abc.Iterable[float]
- class bluemira.fuel_cycle.timeline_tools.GompertzLearningStrategy(learn_rate: float, min_op_availability: float, max_op_availability: float)
Bases:
LearningStrategyGompertz learning strategy.
- Parameters:
learn_rate (float)
min_op_availability (float)
max_op_availability (float)
- learn_rate
- min_op_a
- max_op_a
- _f_op_availabilities(t, x, arg_dates)
- generate_phase_availabilities(lifetime_op_availability: float, op_durations: collections.abc.Iterable[float]) collections.abc.Iterable[float]
Generate operational availabilities for the specified phase durations.
- Parameters:
lifetime_op_availability (float) – Operational availability averaged over the lifetime
op_durations (collections.abc.Iterable[float]) – Durations of the operational phases [fpy]
- Returns:
Operational availabilities at each operational phase
- Raises:
FuelCycleError – Input lifetimes must be in range
- Return type:
collections.abc.Iterable[float]
- class bluemira.fuel_cycle.timeline_tools.LogNormalAvailabilityStrategy(sigma: float, rng_seed: int | numpy.random.SeedSequence = RNGSeeds.timeline_tools_lognorm.value)
Bases:
OperationalAvailabilityStrategyLog-normal distribution strategy
- Parameters:
sigma (float) – Standard deviation of the underlying normal distribution
rng_seed (int | numpy.random.SeedSequence) – random number generator seed for the normal distribution
- sigma
- generate_distribution(n: int, integral: float) numpy.ndarray
Generate a log-normal distribution with a specified number of entries and integral.
- Parameters:
n (int) – Number of entries in the distribution
integral (float) – Integral of the distribution
- Returns:
The distribution of size n and of the correct integral value
- Return type:
numpy.ndarray
- class bluemira.fuel_cycle.timeline_tools.TruncNormAvailabilityStrategy(sigma: float, rng_seed: int | numpy.random.SeedSequence = RNGSeeds.timeline_tools_truncnorm.value)
Bases:
OperationalAvailabilityStrategyTruncated normal distribution strategy
- Parameters:
sigma (float) – Standard deviation of the underlying normal distribution
rng_seed (int | numpy.random.SeedSequence) – random number generator seed for the normal distribution
- sigma
- generate_distribution(n: int, integral: float) numpy.ndarray
Generate a truncated normal distribution with a specified number of entries and integral.
- Parameters:
n (int) – Number of entries in the distribution
integral (float) – Integral of the distribution
- Returns:
The distribution of size n and of the correct integral value
- Return type:
numpy.ndarray
- class bluemira.fuel_cycle.timeline_tools.ExponentialAvailabilityStrategy(lambdda: float, rng_seed: int | numpy.random.SeedSequence = RNGSeeds.timeline_tools_expo.value)
Bases:
OperationalAvailabilityStrategyExponential distribution strategy
- Parameters:
lambdda (float) – Rate of the distribution
rng_seed (int | numpy.random.SeedSequence) – random number generator seed for the exponential distribution
- lambdda
- generate_distribution(n: int, integral: float) numpy.ndarray
Generate an exponential distribution with a specified number of entries and integral.
- Parameters:
n (int) – Number of entries in the distribution
integral (float) – Integral of the distribution
- Returns:
The distribution of size n and of the correct integral value
- Return type:
numpy.ndarray