# Lifetime and Warranty of Solar Panels

A solar panel consists of arrays of photovoltaic cells. Each array has 10 cells. The solar panel requires three out of five arrays and an inverter to work. Simulate the lifetime of solar panels and calculate pricing for a warranty extension from 10 to 20 years.
 In:= Xdists = Table[{Subscript[x, i], WeibullDistribution[5.87, 50]}, {i, 10}]; bexpr = And @@ Table[Subscript[x, i], {i, 10}]; \[ScriptCapitalD] = ReliabilityDistribution[bexpr, dists];
 In:= X\[ScriptCapitalR]SolarGrid = ReliabilityDistribution[ BooleanCountingFunction[{3, 5}, {x, y, z, v, w}] \[And] inverter, {{x, \[ScriptCapitalD]}, {y, \[ScriptCapitalD]}, {z, \ \[ScriptCapitalD]}, {v, \[ScriptCapitalD]}, {w, \[ScriptCapitalD]}, \ {inverter, ExponentialDistribution[1/170]}}];
 In:= XListPlot[{RandomVariate[\[ScriptCapitalR]SolarGrid, 100], {{0, NExpectation[t, t \[Distributed] \[ScriptCapitalR]SolarGrid]}, {100, NExpectation[t, t \[Distributed] \[ScriptCapitalR]SolarGrid]}}}, Joined -> {False, True}, Filling -> Axis, AxesOrigin -> {0, 0}, ImageSize -> Medium, PlotLabel -> "MTTF and Individual Lifetimes"]
 Out= In:= XProbability[10 < t <= 20, t \[Distributed] \[ScriptCapitalR]SolarGrid]* meanCostOfRepair + profit
 Out= 