With the clear goal of improving photovoltaic (PV) technology performance towards nearly-zero energy buildings, a graph theory-based model that characterizes photovoltaic panel structures is developed. An algorithm to obtain all possible configurations of a given number of PV panels is presented and the results are exposed for structures using 3 to 7 panels. Two different classifications of all obtained structures are carried out: the first one regarding the maximum power they can produce and the second according to their capability to produce energy under a given probability that the solar panels will fail. Finally, both classifications are considered simultaneously through the expected value of power production. This creates structures that are, at the same time, reliable and efficient in terms of production. The parallel associations turn out to be optimal, but some other less expected configurations prove to be rated high.