|
|
|
@ -352,8 +352,9 @@ def get_distribution_from_db(parameters: dict, is_repairable: bool = True, best_
|
|
|
|
return "Weibull3", beta, eta
|
|
|
|
return "Weibull3", beta, eta
|
|
|
|
elif method == "Exponential-2P":
|
|
|
|
elif method == "Exponential-2P":
|
|
|
|
lambda_val = parameters.get("lambda_value", 0.00001)
|
|
|
|
lambda_val = parameters.get("lambda_value", 0.00001)
|
|
|
|
|
|
|
|
mttf = 1/lambda_val
|
|
|
|
gamma = parameters.get("gamma", 0)
|
|
|
|
gamma = parameters.get("gamma", 0)
|
|
|
|
return "Exponential2", lambda_val, gamma
|
|
|
|
return "Exponential2", mttf, gamma
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# Default to NHPP
|
|
|
|
# Default to NHPP
|
|
|
|
return "NHPPTTFF", 1.0, 100000
|
|
|
|
return "NHPPTTFF", 1.0, 100000
|
|
|
|
@ -363,7 +364,9 @@ def get_distribution_from_db(parameters: dict, is_repairable: bool = True, best_
|
|
|
|
|
|
|
|
|
|
|
|
if distribution == "Lognormal":
|
|
|
|
if distribution == "Lognormal":
|
|
|
|
mu = parameters.get("mu", 0)
|
|
|
|
mu = parameters.get("mu", 0)
|
|
|
|
sigma = parameters.get("sigma", 1)
|
|
|
|
sigma = parameters.get("sigma", 1.0)
|
|
|
|
|
|
|
|
# Ensure log dev (sigma) is strictly within Aeros' boundaries of [0.01, 3.0]
|
|
|
|
|
|
|
|
sigma = max(0.01, min(3.0, float(sigma)))
|
|
|
|
return "Lognormal", mu, sigma
|
|
|
|
return "Lognormal", mu, sigma
|
|
|
|
elif distribution == "Normal":
|
|
|
|
elif distribution == "Normal":
|
|
|
|
mu = parameters.get("mu", 100000)
|
|
|
|
mu = parameters.get("mu", 100000)
|
|
|
|
@ -378,8 +381,9 @@ def get_distribution_from_db(parameters: dict, is_repairable: bool = True, best_
|
|
|
|
return "Weibull2", beta, eta
|
|
|
|
return "Weibull2", beta, eta
|
|
|
|
elif distribution == "Exponential-2P":
|
|
|
|
elif distribution == "Exponential-2P":
|
|
|
|
lambda_val = parameters.get("Lambda", 0.00001)
|
|
|
|
lambda_val = parameters.get("Lambda", 0.00001)
|
|
|
|
|
|
|
|
mttf = 1/lambda_val
|
|
|
|
gamma = parameters.get("gamma", 0)
|
|
|
|
gamma = parameters.get("gamma", 0)
|
|
|
|
return "Exponential2", lambda_val, gamma
|
|
|
|
return "Exponential2", mttf, gamma
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# Default to Normal
|
|
|
|
# Default to Normal
|
|
|
|
mu = parameters.get("mu", 100000)
|
|
|
|
mu = parameters.get("mu", 100000)
|
|
|
|
|