"""
Solar PV reliability: inverter, tracker, WST and combiner analysis
==================================================================

Analyse published evidence without mixing failure rates, time availability,
survival and individual instrument ages. An illustrative combiner bill of
materials turns attributed part rates into a component-event planning scenario.

See the `research and limitations <../../_generated/guides/pv-device-reliability.html>`_.
"""

import matplotlib.pyplot as plt

from energy_analysis.pv_device_reliability import (
    combiner_box_case,
    plot_pv_reliability_evidence,
    published_rate_scenarios,
)

print("Unflagged component-rate alternatives:", len(published_rate_scenarios()))
parts, scenario = combiner_box_case(boxes=500)
print(parts[["device", "parts_per_box", "events_per_box_year"]].to_string(index=False))
print("Illustrative CBX case:", scenario)
print("These are component events, not complete box outages or predicted replacements.")
figure = plot_pv_reliability_evidence()
plt.show()
