|
|
|
|
@ -265,6 +265,7 @@ def get_asset_batch(location_tags: List[str], nr_location_tags: List[str],
|
|
|
|
|
results[location_tag]["relDisType"] = item["distribution"] if is_nr else "NHPPTTFF"
|
|
|
|
|
results[location_tag]["relDisP1"] = item.get("parameters", 0).get("beta", 0) if not is_nr else item.get("mbtf", 0)
|
|
|
|
|
results[location_tag]["relDisP2"] = item.get("parameters", 0).get("eta", 0)
|
|
|
|
|
results[location_tag]["parameters"] = item.get("parameters", {})
|
|
|
|
|
|
|
|
|
|
return results
|
|
|
|
|
|
|
|
|
|
@ -346,7 +347,7 @@ async def update_equipment_for_simulation(*, db_session: DbSession, project_name
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
eq["cmDisP1"] = reliabiility.get("cmDisP1", 0)
|
|
|
|
|
eq["relDisType"] = "NHPPTTFF"
|
|
|
|
|
eq["relDisType"] = reliabiility.get("relDisType", "NHPPTTFF")
|
|
|
|
|
eq["relDisP1"] = reliabiility.get("relDisP1", 0)
|
|
|
|
|
eq["relDisP2"] = reliabiility.get("relDisP2", 0)
|
|
|
|
|
|
|
|
|
|
@ -355,7 +356,8 @@ async def update_equipment_for_simulation(*, db_session: DbSession, project_name
|
|
|
|
|
"mttr": eq["cmDisP1"],
|
|
|
|
|
"distribution": eq["relDisType"],
|
|
|
|
|
"beta": eq["relDisP1"],
|
|
|
|
|
"eta": eq["relDisP2"]
|
|
|
|
|
"eta": eq["relDisP2"],
|
|
|
|
|
"parameters": eq.get("parameters", {})
|
|
|
|
|
}
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(f"Error fetching data for {eq['equipmentName']}: {e}")
|
|
|
|
|
|