 Research
 Open access
 Published:
Solar farm cable layout optimization as a graph problem
Energy Informatics volume 5, Article number: 25 (2022)
Abstract
We introduce the Solar Farm Cable Layout Problem (SoFaCLaP), a novel graphtheoretic optimization problem. SoFaCLaP formalizes the task of finding a costoptimal cable layout in a solar farm where PV string positions are already determined but the positions of other components such as transformers can be picked from a set of candidate positions. The problem statement incorporates a network flow model in which the flow value of a connection represents the number of strings that are (indirectly) connected to a transformer via this connection. A mixedinteger linear program (MILP) formulation is proposed that uses binary variables to indicate which of several available cable types is chosen for each connection. We propose a framework to randomly generate benchmark instances to evaluate any algorithmic approach to SoFaCLaP. In particular, we generate a set of instances based on realworld solar farm characteristics. With an extensive evaluation of the MILP formulation on those instances we establish mixedinteger linear programming as a baseline for future algorithmic approaches to finding solar farm cable layouts.
Introduction
The previous decade has seen a boom in the commission of renewable energy power plants, in particular for solar farms. The global installed capacity in photovoltaic (PV) systems has seen a 16fold increase to over 707 GW between 2010 and 2020 (IRENA 2021). During the same time, the weightedaverage cost per newly installed megawatt has decreased by approximately 93%, mainly—but not solely—due to a decrease in cost of PV modules (IRENA 2021). In 2019, 116.9 GW of new PV capacity were added worldwide, out of which 75.3 GW were installed in utilityscale solar farms (SolarPower Europe 2020).
For the convenience of the reader, we give a general description of the main components of a utilityscale solar farm. For further details, we refer to ABB Ltd (2019), Mertens (2019), which also served as references for the following elaboration. The most visible parts of a solar farm are the solar cells. In those, sunlight is converted to tiny amounts of electric current. The cells are connected forming a PV module. These modules, in turn, are connected in series to form a string which is mounted on a rack. For the remainder of this work, we will consider the PV strings as the smallest building block, since we are mainly interested in optimizing the cable layout. The strings supply electricity in form of Direct Current (DC), which is converted to Alternating Current (AC) in inverters. Strings can have their own inverters (string inverters, connected to one or at most to a few strings) or a larger number of strings is connected to only a few central inverters. We focus on central inverters but everything in this work can also be adapted to string inverters. In general, inverters have more functions than only conversion. They are used for monitoring and safety purposes and generally also incorporate control elements such as maximum power point trackers, by which the DC voltage in the connected components is adjusted according to environmental conditions to maximize electrical power harvest. Solar farms typically operate at lowvoltage levels (the DC side is usually aimed at a maximum voltage of 1 kV or 1.5 kV), so that stepup transformers are needed to feed the generated power into the grid. Since inverters have only a finite number of input circuits, additional devices are installed between strings and inverters. These devices have different names, depending on the monitoring and safety equipment installed in them and on the components they connect. Yconnectors are the most simple device. They normally connect just two strings with no additional equipment [except maybe for fuses (Every 2022)]. Combiner boxes connect a larger number of strings (or Yconnectors) and have additional safety and monitoring equipment. Recombiner boxes have the same equipment as combiner boxes but connect combiner boxes instead of strings. Which kind of components, in particular between strings and inverters, are used ultimately depends on a decision by the solar farm planners. In any case, the components need to be connected by cables. For electrical reasons the cable layout should be balanced to some extent, e. g. to avoid reverse current. In particular, the layered structure should be respected, for example, connecting a recombiner box (to which multiple strings are connected) and a single string to an inverter should be avoided.
With all those restrictions in mind, solar farms appear to be mostly constructed on flat ground following one (of maybe several) prespecified templates. However, there are exceptions: The Monte Mele photovoltaic plant is situated on the slope of a hill on Sicily, Italy, and has irregular distances between its strings (Alpiq Holding AG 2022). For a solar farm of the size of the Monte Mele plant with its capacity of 718 kW, drawing a cable layout by hand might be feasible. For larger solar farms [the world’s currently largest stands at 2245 MW (Sanjay 2022)], algorithmic approaches computing neartocostoptimal cable layouts might be the way to go.
Related work
Various aspects of solar farms have been a target for optimization in the literature. Solar cells can be manifactured from different socalled photovoltaic absorber materials that influence the performance of a cell, for a review see (Kirchartz and Rau 2018). The efficiency of transformers can be influenced by using appropriate control methods (Liu et al. 2019) and realized in a prototype. Shifting the focus to the overall electrical system of a solar farm and its operation, a variety of maximum power point tracking techniques can be employed to maximize the power output of the farm (Bollipo et al. 2020). Concerning the early stages of the planning process, a fuzzy Analytic Hierarchy Process has been proposed to find an optimal site for a solar farm (Tavana et al. 2017).
A more holistic view on solar farm design is employed at Siemens Energy: In a multicriteria decision support system a set of precomputed designs for a given site can be compared and investigated by planners visually and with respect to different “key performance indicators” (Bischoff et al. 2014). The designs are computed using several (unspecified) heuristics in a threestage process involving three subproblems: placing service ways, placing strings in the area between ways, and inverter placement. Given the positions of strings and inverters, a cable layout is computed in “singleobjective manner, [minimizing] cable cross sections such that specified losses are not exceeded” (Bischoff et al. 2014, p.337). The exact optimization problem is not stated.
Using a different setting, a formalization of the optimization problem of finding a costminimal cable layout is given in Luo et al. (2021). Computing cable layouts and the placement of combiner boxes assigned to a single inverter is modelled as a generalized capacitated minimum spanning tree problem and solved by a branchandpriceandcut algorithm. In this setting, strings are placed on a grid and edge lengths are given by the \(\ell _1\) metric. A capacitated spanning tree connecting strings and the inverter yields a cable layout in which a combiner box is placed at each child string of the inverter such that the capacity of the combiner box is not exceeded. The costs arise from a linearcost flow on edges between any two strings and from a stepcost function between combiner boxes and inverter. The latter models the installation costs of the combiner boxes.
This paper generalizes the task of determining an optimal cable layout and optimal positions of combiner boxes in a solar farm. It is assumed that the positions of the strings are already determined and that candidate positions for all other components, e. g. (re)combiner boxes or transformers, of a solar farm are given. The goal is to find an optimal subset of the candidate positions that allows all strings to be connected to a transformer such that the total cabling costs are minimized—in Luo et al. (2021) only candidate positions of combiner boxes are considered and they are colocated with strings. As for the cabling, a set of available cable types is given (each with a thermal capacity and a cost per unit of length). For any two components that can be connected according to the aforementioned layered structure one of the cable types should be chosen such that the cable has sufficient capacity and is as cheap as possible. This gives rise to a stepcost function for each connection, not only between combiner boxes and inverters. Such cost functions have been used in papers on optimizing the cable layout of a wind farm (Dutta and Overbye 2011, Lehmann et al. 2017), in which a network flow model with a stepcost function is used). The main difference between our solar farm model and the wind farm models lies in the way in which vertices can be connected. Our model has a layered structure which allows connections only between adjacent layers. In wind farms, there are only two types of vertices (turbines and substations) and turbines are connected to each other.
Contribution
On our endeavour to generalize the task of determining an optimal layout of a solar farm, we introduce a graph problem called the Solar Farm Cable Layout Problem (SoFaCLaP, Problem formulation). The problem statement uses a network flow model to identify the pointtopoint connections (edges) that are used for the cable layout and to identify how many strings use each connection. The flow on each connection is used to identify which cable type is used for the respective connection. SoFaCLaP bears resemblance to the Steiner Arborescence Problem (Ljubić 2021) and to the Multilevel Facility Location Problem (OrtizAstorquiza et al. 2018).
We propose a mixedinteger linear program (MILP) formulation (A mixedinteger linear program) to provide a first solution method for SoFaCLaP. This formulation uses real variables for the flow values and binary variables to indicate which cable type is used for which edge. An extensive evaluation of the performance of the optimizer Gurobi on the MILP formulation is carried out (Results: optimality and (in)feasibility, Results: running time, and Results: solution quality) to establish mixedinteger linear programming as a baseline for performance evaluations of future approaches to solving SoFaCLaP. For the evaluation of the MILP formulation we propose a framework to randomly generate synthetic benchmark instances (Framework for benchmark generation). We employ this framework using parameters based on realworld solar farms (Generating benchmark instances). The benchmark instances used in the evaluation are publicly available.
The problem statement and the MILP formulation can be adapted to cover further aspects of solar farm layouting (cf. Variants of the problem and SoFaCLaP from a practical perspective). The process for generating benchmark instances can incorporate such aspects. It can also be customized to address further requirements of solar farm planners and to use different characteristics of various electrical devices.
To summarize, this paper has four main purposes: to introduce SoFaCLaP as a graph optimization problem, to establish an MILP formulation as a standalone solution method that can also be used as a baseline for future algorithms, to introduce a framework for generating synthetic input instances, and to provide an example set of instances based on realworld characteristics.
Problem formulation
The Solar Farm Cable Layout Problem (SoFaCLaP) is a minimumcost flow problem on a directed layered graph \(G = (V,E)\). The vertex set consists of the strings \(V_{S}\) that need to be connected, as well as of the potential Yconnectors \(V_{Y}\), combiner boxes \(V_{C}\), recombiner boxes \(V_{R}\), inverters \(V_{I}\), and transformers \(V_{T}\). Edges have a length \(\mathrm {len} :E \rightarrow \mathbb {R}\) and only exist between one layer and the next, i.e.,
For easier reference, the layers are enumerated from \(V_1 = V_{S}\) to \(V_6 = V_{T}\). Vertices from layers \(V_2, \ldots , V_6\) have an upper capacity \(\mathrm {u} _i \in \mathbb {N}\) for \(i=2, \ldots , 6\) on the amount of strings that can be routed via these vertices. Inverters also have a lower capacity \(\mathrm {\ell } _5\). We may refer to the capacity bounds of a layer by a vertex of that layer, e. g. \(\mathrm {u} _2 = \mathrm {u} (v)\) for any \(v \in V _2\). The lefthand side of Fig. 1 shows an example of layered graph with capacities as given by a SoFaCLaP instance.
The inverters split the instance into an ACside with the transformers and a DCside with the strings. Denote the edges on the ACside by\(E _{\mathrm {AC}} = \{(i,j) \in E :i \in V_{I}, j \in V_{T} \}\) and by \(E _{\mathrm {DC}} = E \setminus E _{\mathrm {AC}}\) the edges on the DCside. For either side, there is a set of possible cable types \(K _{\mathrm {AC}}\) and \(K _{\mathrm {DC}}\). Each cable type \(k\) has a thermal capacity \(\mathrm {cap} (k)\) and a cost per unit of length \(c (k)\). For easier notation, the subscripts AC and DC are omitted. The cable types include a dummy cable type of capacity and cost 0.
The goal of SoFaCLaP is to find a minimumcost flow on G, i. e. a function \(f :E \rightarrow \mathbb {R}_{\ge 0}\) of minimal cost. The flow must transport one unit of flow from each string to a transformer, conserve the flow at intermediate vertices, respect the vertex capacities, and have at most one outgoing edge from each vertex with positive flow. The latter enforces a cyclefree cable layout. The righthand side of Fig. 1 shows an example layout. The cost of a flow on an edge is given by \(c (k ^\star ) \cdot \mathrm {len}(e)\) where \(k ^\star\) is the cheapest cable type with sufficient capacity to carry the flow. The total cost of a flow is the sum of costs over all edges. A flow that exceeds the maximum cable capacity on one or more edges is not considered a feasible solution.
SoFaCLaP is a computationally difficult problem.
Theorem 1
It is strongly NPcomplete to decide if an instance of the Solar Farm Cable Layout Problem has a feasible solution.
Proof A candidate for a feasible solution to SoFaCLaP can be provided by specifying the flow values on the edges. To verify feasibility, it must be checked that flow conservation holds and that all vertex and cable capacities are respected. This is possible in polynomial time. Thus, membership in NP is shown. Note that it is not necessary to compute the costs, which could involve computations with real numbers.
The hardness proof uses a reduction from the strongly NPhard problem 3Partition (Garey and Johnson 1979, SP15): Let \(m, T \in \mathbb {N}\) and let \(S :=\{s_1, \ldots , s_{3m}\}\) be a multiset of natural numbers such that \({T}/{4}< s < {T}/{2}\) for all \(s \in S\) and \(\sum _{s \in S} s = mT\). Can S be partitioned into triplets \(S_1, \ldots , S_m\) such that \(\sum _{s \in S_i} s = T\) for all \(i = 1, \ldots , m\)?
In the reduction, the Yconnectors represent the elements of the multiset and the combiner boxes the triplets. The edges between strings and Yconnectors force an outflow from the Yconnector equal to the respective element of the multiset. So given an instance of 3Partition, we construct an instance of SoFaCLaP with 3m Yconnectors \(y_1, \ldots , y_{3m}\), each with capacity \({T}/{2}\), and mT strings such that the \(s_i\) strings have an edge only to \(y_i\) for all \(i = 1, \ldots , 3m\). The instance has m combiner boxes \(c_1, \ldots , c_m\), each with capacity T. Recombiner boxes, inverters and transformers are not needed for this reduction, and neither are cable types, so there one of each, with capacity mT. All layers are fully connected except for the string layer as mentioned above. This graph has \(mT + 3m + T + 3\) vertices and \(mT + 3mT + m + 2\) edges. Thus, the construction is possible in polynomial time since we may assume that T is polynomial in the size of the input.
We show that the instance of 3Partition is a yesinstance if and only if the SoFaCLaP instance has a feasible solution. If the instance of 3Partition is a yesinstance, then we connect a Yconnector \(y_i\) to a combiner box \(c_j\) if and only if \(s_i \in S_j\). The edges between the strings and the Yconnectors yield that \(y_i\) has an outflow of exactly \(s_i < {T}/{2} = \mathrm {u} (y_i)\). Since \(\sum _{s \in S_j} s = T\), the capacity of \(c_j\) is not exceeded either. Thus, we obtain a feasible SoFaCLaP instance.
On the other hand, let the constructed instance of SoFaCLaP be feasible. By means of \({T}/{4} < s\), it follows that each combiner box has at most three Yconnectors connected to it. If one combiner box had only two Yconnectors, another one would have four. Thus, each combiner box is connected to exactly three Yconnectors. Since the total capacity of all combiner boxes is exactly mT, the inflow at each combiner box equals T. Thus, the assignment of Yconnectors to combiner boxes gives an assignment of the elements of S to m triplets with the desired property. \(\square\)
We have shown that already finding a feasible solution is a difficult task, at least in the most general setting of SoFaCLaP. One might hope that the whole problem becomes a lot easier with additional simplifications. On the positive side, we suspect that finding a feasible solution is easy (Conjecture 1). On the negative side, it can be shown the optimization remains difficult (Theorem 2, proof omitted).
Theorem 2
It is strongly NPhard to decide if an instance admits a solution with a value below a given threshold, even if the instance respects all of the following:

Vertex positions are given by points in \(\mathbb {Q}^2\) and no two vertices have the same positions.

Edge lengths are given by the Euclidean distance of the endvertices.

All layers are fully connected.

There is only one cable type, which has unlimited capacity.

Lower vertex capacities do not apply.
Conjecture 1
In the setting of Theorem 2, a feasible solution can be computed in polynomial time.
These simplifications have multiple motivations: Euclidean coordinates and edge lengths are in line with realworld applications where vertices are placed in the plane. Fully connected layers occur when no connection is forbidden a priori by the solar farm planner (and on top of that, the construction in the proof of Theorem 1 that forces a certain input to each Yconnector cannot be readily replicated). The remaining simplifications are rather a feature of the complexity proof, i.e., we do not need multiple cable types nor lower capacities to show NPhardness. Nonetheless, they may be reasons for hardness themselves.
Variants of the problem
The order of the layers in the graph resembles a solar farm with central inverters. Solar farms can also be designed using string inverters (Mertens 2019), in which case \(V_{S}, V_{Y}, V_{I}, V_{C}, V_{R}, V_{T}\) would be the order of the layers. The MILP formulation proposed in this paper can easily be adapted to the setting with string inverters.
Strings can also be understood as having multiple connection points (outlets), out of which one is chosen for the cable layout. Each outlet may have different Yconnectors it can be connected to. The model above already covers this variant: For any pair of string and Yconnector, only the connection point closest to the Yconnector could possibly be used in an optimal solution. Therefore, all outlets of a string can be contracted into a single one (and therefore identified with the string itself). The edge lengths from the string to Yconnectors are then adjusted to reflect the actual distance between Yconnector and closest outlet. The synthetic benchmark instances proposed in this paper employ this variant using three connection points per string.
The problem statement can naturally be extended to incorporate more potentially interesting aspects of solar farm layouting. Cable types can not only vary between the AC and the DCside but also between the layers. They may even vary between the edges, i. e. each edge may have its own set of cable types. This can for example be used to incorporate vertex installation costs or costs for different levels of utilization in relation to the capacity of a vertex.
SoFaCLaP from a practical perspective
We have mentioned that SoFaCLaP cooptimizes two aspects: picking a subset of potential intermediate vertices and finding a cable layout using vertices from that subset. A solar farm planner who wishes to use SoFaCLaP and any algorithmic approach has to specify the input, i.e., graph and cable types. For the graph, the planner has to decide on the (fixed) positions of all strings. They also have to provide possible locations for any intermediate device and the respective capacities. From those locations, the algorithmic approach will pick a suitable subset to be used in the cable layout. In their decisions, the planner has many degrees of freedom, which might not be obvious. Take, for example the edge set and the edge lengths. The planner can (but need not) choose to disallow certain connections from the graph for whichever reason. The edge lengths can (but need not) represent Euclidean lengths. One might choose to use the \(\ell _1\) metric [“Manhattan metric”, as in Luo et al. (2021)] which only allows “horizontal” and “vertical” cable sections. Or the planner can assign arbitrary lengths to account for difficult terrain. This also includes a constant additive offset to edge lengths to account for necessary cables used inside the different devices.
With these and many more degrees of freedom, SoFaCLaP is supposed to be adaptable to many different modelling decisions a solar farm planner might want to take.
A mixedinteger linear program
SoFaCLaP can be formulated as a MILP using variables \(f _{ij} \ge 0\) for the flow on \((i,j) \in E\) and binary variables \(x _{ijk}\) stating whether cable type \(k\) is used on edge (i, j). Here, the zerocapacity cable type is omitted. This way of modelling the cable types has been used for the Wind Farm Cabling Problem (Lehmann et al. 2017). The following formulation is based on the standard variant of SoFaCLaP with the implicit inclusion of string connection points as outlined in Variants of the problem.
The goal of SoFaCLaP is to minimize the total installation cost
The total flow leaving each string is the production of the string
and flow must be conserved at intermediate vertices
The capacities at the vertices must be respected
whereas lower capacities only apply if a vertex is indeed used.
For all vertices except transformers, only one outgoing edge may have flow and thereby nonzero capacity
which implies that only one cable type is used per edge. This cable type must have sufficient capacity to hold the flow
In total, this linear program has \(\mathcal {O}(\vert K \vert \cdot \vert E \vert )\) binary and \(\vert E \vert\) real variables as well as \(\mathcal {O}(\vert V \vert + \vert E \vert )\) constraints.
Simulations and evaluation
An evaluation of the solution methods outlined in A mixedinteger linear program on example instances shall give the reader insights into the performance of the MILP and thereby establish it as a (first) solution method to SoFaCLaP. Since we have not been able to obtain suitable realworld instances^{Footnote 1} to evaluate the MILP, we resort to generating synthetic instances as described in Framework for benchmark generation and in Generating benchmark instances. The benchmark instances use the GraphML format (Brandes et al. 2002) and are available from http://www.doi.org/10.35097/676, where a thorough specification of the format can be found as well.
If the benchmark instances are sufficiently variable to cover a wide range of plausible inputs to the solution approaches, the use of synthetic instances has multiple advantages. First, a larger number of different instances can be generated so that tendencies in the comparison of two approaches are less likely to be a result of statistical noise. Second, the solar farms in consideration can include more strings than any currently existing solar farms. Thus, the applicability of the algorithms for a future increase in solar farm sizes can already be investigated now.
Framework for benchmark generation
We describe the general approach we propose for the generation of benchmark instances on a high level in this section. The next section is dedicated to breathing life into the framework by describing the process in more detailed steps with concrete values for the parameters. These values are based on realworld examples of devices used in solar farms as evidenced by Tables 1 and 2.
The first steps in the framework deal with placing the strings. For synthetic instances we opt for randomly sampling the strings with a minimum distance. Next, the location of vertices of higher layers are determined, starting at the Yconnectors. We let the number of vertices in a layer depend on the number of vertices in a previous layer. We assume fully connected layers, which leads to the maximum number of possible connections between layers. After the graph is determined, vertex capacities are set. We choose these randomly with bounds based on the minimum capacity necessary to connect all strings. Lastly, cable types are included which we derive from realworld photovoltaic cables.
Users of the proposed framework may want to alter any intermediate step to realize certain additionally desired properties on the solar farm instances. For example, users could prespecify all the string positions or fix the number of vertices within a layer. They may want to change the sampling process, for example to have all recombiner boxes close to each other. The edge set can be thinned out if, for example, cables should not exceed a certain length. Users can define their own cable types.
Generating benchmark instances
For our purposes, the framework introduced in the previous section is used as follows. Benchmark instances are generated in three categories: Small (120–180 strings per instance), Medium (500–750 strings), and Large (1200–1500 strings). We describe the process of generating an instance: First, a rectangle is fixed that simulates the area of the solar farm. One of the corners is defined as the origin giving rise to a coordinate system. The (virtual) unit of length is irrelevant since SoFaCLaP solution values scale with the underlying unit of length. Next, an angle \(\alpha\) for the orientation of the strings in relation to the coordinate system is chosen randomly. The total number of strings is drawn from the intervals above and, one after another, the strings are placed in the rectangle: A random point P is sampled from the rectangle serving as one of the connection points of the string. For the purpose of describing the process, we refer to this point as the base of the string. If P respects a globally specified minimum distance from the bases of all previously successfully sampled strings, the connection points are defined. On a ray starting at P with angle \(\alpha\) to the coordinate system’s xaxis two more connection points are placed equidistantly, with the distance being the same for all strings. If, however, P is too close to another base, a new base P is sampled. If the process of placing a string fails too often, the whole instance is discarded and a new rectangle is chosen.
With all the strings placed, the higher layers of vertices are randomly placed, starting with the Yconnectors. For each layer, a ratio according to Table 1 is chosen randomly and the number of vertices on the next layer is defined as \(V _{\mathrm {next}} = \lceil {V _{\mathrm {reference}}}/ {\text {ratio}}\rceil\). The ratios are chosen in a way to ensure decreasing sizes of layers. For the small instances, the number of transformers and inverters is fixed as 1. Yconnectors and combiner boxes are placed in close proximity to string connection points. Recombiner boxes are placed close to combiner boxes. Inverters and transformers are placed on random points in the rectangle, respecting minimum distances to the string bases as well as previously placed inverters and transformers. The reasoning is that strings, inverters and transformers are themselves bigger components and need to be more easily accessible for maintenance.
Picking (upper and lower) capacity values for the different layers can be a delicate issue from an algorithmic point of view: With very tight capacities, the design questions of picking one position for a, say, combiner box over another becomes easy: all possible positions have to be used. Very loose capacities mitigate the algorithmic difficulty of picking a suitable subset of, say, strings to be assigned to a specific Yconnector. We deem the assumption fair that all vertices of a layer have the same capacities since planners presumably would not design solar farms with two different versions of, say, inverters. Given a layer \(V _i\) a capacity of at least \(\mathrm {lb}_i :=\lceil {\vert V_{S} \vert }/{\vert V _i \vert }\rceil\) is required. For each layer, a random integer between \(\mathrm {lb}_i\) and \(\lambda \cdot \mathrm {lb}_i\) is chosen, where \(\lambda = 1.2\) for inverters and \(\lambda = 1.5\) for all other layers. The smaller value for inverters is selected with the idea in mind that solar farm planners will not overly deviate the capacities of inverters from the capacity best suited for the intended use. For recombiner boxes and inverters only, the capacity will, however, be at least twice the capacity of the previous layer to ensure that two fullyused vertices of the previous layer can be connected. The randomly chosen lower capacity for inverters is at least 0.5 and at most 0.8 times the inverters’ upper capacity.
The edge set is assumed to be complete, i.e., equality holds in Eq. (2). We have no reason to prohibit specific edges (although solar farm planners might). Thus, we leave it to the algorithms to pick the most suitable edges from the complete set.
The cable types for the simulations as shown in Table 2 are based on the photovoltaics cable SOLARFLEXX PV1F by HELUKABEL (HELUKABEL GmbH 2021). Four sizes are considered, the forth one being the biggest size available. The rated ampacity is approximately translated into a capacity on the amount of strings, where a current of 10 A per string is assumed (ABB Ltd 2019, p. 121). Since cost quotations are not readily available, we assumed that the costs are in essence proportional to the amount of copper used in a cable. The exact unit for the costs is irrelevant since the optimization function in SoFaCLaP can be scaled arbitrarily. For aesthetical reasons, we opted for somewhat round values in the bigger cable types. No influence on the performance of algorithms is expected from those changes. These four cable types are not big enough to be used in the largest benchmark instances. Thus, we included two artificial cable types to conduct meaningful experiments on the biggest instances. These cable types were extrapolated from the smaller cables types, roughly following the motto “Doubling the capacities yields triple the cost.”
Some of the benchmark instances generated as outlined above may be infeasible. Since capacities are chosen in a way that the total capacity of a layer is at least the number of strings and since the edge set is complete, infeasibility can only arise from the interaction of the sizes and capacities of the layers as a whole. A toy example of such a constellation can be seen in Fig. 2. We purposefully keep such instances because it may be a feature of algorithms developed for SoFaCLaP to be able to detect infeasibility (see also “Results: optimality and (in)feasibility”).
Simulation setup
The MILP formulation from A mixedinteger linear program is translated into C\({{\textbf {++}}}\)14 code. The code uses the Open Graph Drawing Framework (Catalpa release) (Chimani et al. 2013) for parsing the benchmark instances and the C\({{\textbf {++}}}\)API provided by Gurobi (Gurobi Optimization, Inc. 2018). For compilation, GCC 10.3.0 is used with the Ofast march=native flags. All simulations are run on a 64bit architecture with four 12core AMD CPUs each with 2.1 GHz with the openSUSE Leap 15.3 operating system. The MILP formulation is solved by Gurobi 9.5.0 in singlethreaded mode with a maximum running time of one day per instance, with 40 instances running simultaneously.
For the simulations, 80 randomly generated instances of each of the three categories Small, Medium, and Large are considered. An overview of the characteristics of these 240 instances is shown in Table 3.
The ranges for the number of strings are almost fully used. It stands out that the median of number of strings in the large instances is much smaller than 1350, which is what one would naïvely expect. A possible reason is that the process of placing a large number of strings, inverters and transformers, each of which observe a minimum distance to each other, failed too often. In that case, the instances would be discarded and a new number of strings would be drawn randomly. A possible remedy is to enlarge the initial rectangle for the solar farms for the large instances.
The number of vertices is linear in the number of strings with a small coefficient. This is as expected from the ratios shown in Table 1. The number of edges grows fast with over 1.3 million edges for instances with up to 1500 strings. From a theoretical perspective, a fast increase is expected: Layers are fully connected and the number of vertices per layer is linear in the number of strings. Thus, the number of edges grows quadratically with the number of strings.
Results: optimality and (in)feasibility
In our setting, Gurobi terminates with one of four optimization states: Ideally, an instance is solved to (proven) optimality (Status: optimal). Secondly, Gurobi may find a feasible solution but fail to prove that it is optimal (Status: feasible). In that case, the best proven lower bound (\(\mathrm {lb}\)) does not match the solution value (\(\mathrm {ub}\)), and the feasible solution may or may not be optimal. Thirdly, Gurobi may be able to prove that an instance does not admit any feasible solution (Status: infeasible). Lastly, Gurobi may not find any feasible solution but fail to prove infeasibility. In that case, the instance may or may not be feasible (Status: unknown).
In the following, we want to investigate how often Gurobi terminates in each of those states across the different categories of instances to see what we can learn about the applicability of the MILP formulation and Gurobi to solve SoFaCLaP.
The upper part of Table 4 shows how often Gurobi terminates in the different states at the end of the maximum running time of one day. Nearly all of the small instances are solved to optimality within one day. A solution is considered optimal once the MIP gap^{Footnote 2} is below the optimality tolerance of 0.0001%. Since the number of variables and constraints in the MILP formulation grow linearly with the number of edges, Gurobi can most probably not uphold the performance on bigger instances.
Indeed, for the medium instances, the number of instances that are solved to optimality decreases by a big margin compared to the small instances, but still one in five instances is solved optimally. About one in seven instances are shown to be infeasible. The fact that Gurobi does not find any feasible solution on 4 out of 80 instances within one day (optimization status: unknown) makes us suspect that those instances are infeasible. On instances of those sizes one would expect that Gurobi would find a feasible solution within one day if a solution existed. We come back to those “unknown” instances later in this section.
As for the biggest instances, Gurobi is not able to solve any instance to optimality. For more than one in four instances, Gurobi can neither find an optimal solution nor prove infeasibility. We speculate that allowing Gurobi more time or simplifying the model can give further insights into the true status of these instances.
Thus, we run two additional sets of simulations on the remaining “unknown” instances. The first set is intended to find feasible solutions. We suspect any then remaining unknown instance to be infeasible. On those instances, we use a more restricted but (in the context of infeasibility) equivalent MILP formulation which we believe helps Gurobi to prove infeasibility. We describe the two sets of simulations in more detail and see what we can learn about the instances of unknown status.
To make Gurobi’s life (supposedly) easier on the remaining instances of unknown status, we allow only one cable type. This greatly reduces the number of binary variables at the start of the optimization. If the capacity of the cable type is set to a value higher than the maximum vertex capacity, the simplified instance is feasible if and only if the original instance is, since the biggest cable capacity exceeds the biggest vertex capacity in all instances in question here. Again, we give Gurobi a maximum running time of one day per instance in singlethreaded mode. The outcome of these simulations is shown in the middle part of Table . Gurobi can prove infeasibility on two additional medium and on five additional large instances. Gurobi also finds a first feasible solution on 14 out of 25 large instances. Yet, two medium and six large instances remain unknown.
Given the amount of help we gave Gurobi to find feasible solutions, we believe that the remaining instances are in fact infeasible. To facilitate Gurobi’s proof of infeasibility, we again change the MILP formulation. Since the capacities within a layer are equal and layers are fully connected, we observe that any feasible solution can be transformed into other feasible solutions by a permutation of the vertices of a layer. In order to prove infeasibility, Gurobi needs to outrule all these possibilities. Presumably, this can be facilitated by imposing a fixed order on the vertices of each layer, in which the inflow into the vertices decreases. In formulae, fix a layer \(V ^\prime\) (other than the strings) and enumerate the vertices inside this layer as \(V ^\prime = \{v_1, \ldots , v_k\}\). Then, add the constraints
for all layers \(V ^\prime\). Additionally, we set the target function to a constant, so that Gurobi terminates once it finds a feasible solution. With this formulation, we allow Gurobi four threads per instance and lift the time limit. Surprisingly, these changes do not help Gurobi much. Even with a total computation time over all threads per instance of more than six weeks, only two additional instances are proven infeasible (cf. lower part of Table 4). At the time of writing, the simulations are still running.
We conclude from these investigations on the optimization status with which Gurobi terminates that Gurobi is very well suited for solving small instances and obtaining feasible solutions on quite a number of instances representing medium and large solar farms. We also note that Gurobi is able to prove infeasibility quite often in reasonable time (with a bit of help), even though our trick with the additional constraints from Eq. (10) proved less useful than hoped for. For some large instances, Gurobi cannot find a feasible solution within one day even though these instances are in fact feasible. While allowing Gurobi more time is always an option, one could think about other approaches to find a feasible solution (cf. Conjecture 1), give it to Gurobi as a warmstart and see what Gurobi can do from there.
Results: running time
We take another look into the instances that are solved to optimality concerning the time Gurobi needs to reach this state. 79 out of 80 small instances are solved to optimality. Gurobi reaches this result within half a minute on 55 instances and within 5 min on 78 instances. The longest proof of optimality on the small instances needs just under 10 min. We suspect that Gurobi has no difficulties on the small instances, since the number of potentially nonzero binary variables can be greatly reduced by combining the constraints: For string edges it is never beneficial to use another than the smallest cable type. Also, the biggest cable type is never used on small instances since the second biggest suffices. More sophisticatedly, the small number of strings and therefore small number of vertices in further layers limits the number of cable types that can be used to due the vertex capacities. For example, consider a solar farm with 180 strings and 60 Yconnectors. By the formulae outlined in Generating benchmark instances, Yconnectors can only have a capacity of 3 or 4. In both cases, the smallest cable type also suffices for the edges between Yconnectors and combiner boxes. For all these reasons, we believe Gurobi is able to cut off many suboptimal solutions very easily, which results in short running times.
One medium instance is solved to optimality within 1 h (within 20 min actually) and seven more within 4 h. The longest time for a proof of optimality here is 18 h. Clearly, with more running time, the number of instances solved to optimality would increase further. Unfortunately, it cannot be known how long Gurobi needs. So it is more insightful to look into the worstcase deviation of a best solution from the (unknown) optimal solution value. For this, we go back to the MIP gap in the following section.
Results: solution quality
We look into the quality of the solutions Gurobi has found within one day using the original MILP formulation. By the upper part of Table , the instances in consideration are all with status optimal or feasible. These are 80 small, 64 medium and 50 large instances. There is not much to say about the small instances; they are almost all solved to optimality. The remaining instance has 180 strings (the maximum) and 11749 edges. On this instance, Gurobi terminates with a MIP gap of 0.0161%. That means between the best solution found is at most 0.0161% worse than the optimal solution.
In the other two categories, there are a lot more feasible but not optimal instances. Figure depicts the gaps sorted increasingly for the medium and large instances. Note that these instances include all instances for which Gurobi has found a solution, whether these solutions have been proven to be optimal or not. All but one medium instance are solved with a gap of less than 5%, that means that the best solution found by Gurobi is at most 5% worse than the optimal solution. A gap of less than 1% has been computed for 53 out of 64 instances and a gap of less than 0.1% for 29 instances. On the large instances, the gap remains bigger than 10% on twelve instances. A gap of less than 5% has been proven for 30 instances and of less than 1% for 17 instances. The smallest gap on the large instances is at approximately 0.13%.
One may reasonably expect that the bigger the instances, the more difficult it is for Gurobi to prove optimality or infeasibility. While this is certainly true when comparing medium with large instances (evidence shown in Fig. 3 and Table 4), it is not clear when only somewhat similarly sized instances are considered, e. g. only the medium instances. Since the number of provably infeasible and of “unknown” instances is very small, we will not address that relation in the context of infeasibility. Any observation on such a small data set might be pure coincidence. Concerning the proof of optimality, however, we depict the MIP gaps as a function of the number of edges for the aforementioned 64 medium and 50 large instances in Fig. 4. For the medium instances it stands out is that the smallest instance in terms of edges has the second highest gap and that the three biggest instances have very small gaps, including the fifth lowest. Looking at the bulk of the instances, no tendency between MIP gap and number of edges is apparent. In the large instances, the gaps are more spread but also no pattern can be seen. With these pieces of evidence, we conclude that the number of edges cannot solely explain the different performance of Gurobi within the categories of instances. Presumably, the interaction of layer sizes with vertex and cable capacities also plays a role here.
As a side note: Fig. 4 shows only a small number of instances at the upper end of the edge set sizes. We have made a similar observation concerning the number of vertices of large instances in the discussion of Table 3 in Simulation Setup. We believe that the problem that many of the bigger instances in the category large are discarded in the process of placing strings, inverters, and transformers also persists for the medium instances (and maybe even for the small instances).
Comparison to gaps from a similar optimization problem
Having small MIP gaps provides certainty that the best solution found is close to the optimal. As we have seen, Gurobi delivers this certainty on a vast amount of instances across all categories. One might suspect that Gurobi is just very good in general at proving such small gaps. We look into simulations using Gurobi for a somewhat similar optimization problem to see if that is the case.
As we have mentioned in Contribution, a similar MILP formulation has been used for computing cable layouts of wind farms. The difference lies in the layered structure of solar farms including vertex capacities and the tree structure enforced by Eq. (8). [Gritzbach et al. (2019), ArXiv version, Fig. 6] report MIP gaps for their MILP simulations on the synthetic benchmark instances proposed in Lehmann et al. (2017). These benchmark instances each supposedly have a number of edges linear in the number of vertices, since an approach employing knearest neighbours is used to define the edge set. To the contrary, the edge sets of the solar farm instances proposed here grow quadratically in the number of vertices. One set of wind farm instances (originally denoted by \(\mathcal {N} _3\)) has between 80 and 180 turbines per instance and is therefore a bit smaller but still comparable to our small instances. Another set of wind farms (denoted by \(\mathcal {N} _4\)) has between 200 and 499 turbines. These wind farms are a lot smaller than our medium instances. The MIP gaps reported by Gritzbach et al. for these wind farm benchmark sets are roughly between 25% and 30% with no outliers after a running time of one day per instance. In comparison, all but one small solar farm have been solved to optimality and all but one medium solar farm have a MIP gap below 5%. Even for the large solar farms, our MIP gaps look better, at least as long Gurobi finds a feasible solution. To be fair, Gritzbach et al. have used Gurobi 8.0.0, while we use Gurobi 9.5.0. Still, this cannot explain the remarkable difference in the MIP gaps. The reason for the low MIP gaps probably lies within the structural properties of SoFaCLaP and the corresponding MILP formulation. Most notably, the layered structure of the graph yields MILP constraints that only involve a local part of the graph.
Parting notes about the evaluation
The goal of the extensive evaluation of Gurobi’s performance on synthetic instances was to establish the MILP as a first solution approach to SoFaCLaP. The performance characteristics we have reported can serve as a baseline for future evaluations of other algorithmic methods, be it improvements to the MILP itself or any other way of solving SoFaCLaP. In Conclusion, we give some hints on how SoFaCLaP can be approached alternatively.
Conclusion
The Solar Farm Cable Layout Problem is, to the best of our knowledge, the first graphtheoretic model of the optimization problem to find a costoptimal cable layout from strings to transformers in a solar farm while also deciding which of several positions for intermediate vertices such as combiner boxes are best. This model can not only be easily adapted to consider solar farms with string inverters instead of central inverters. It also allows the inclusion of further aspects for the optimization such as vertex installation costs or further constraints such as prohibiting the use of mutually exclusive candidate positions. We introduce a MILP formulation to solve SoFaCLaP and propose a process to generate synthetic benchmark instances. This process builds instances modularly and customizations can be included at various points. We populate this process with input parameters based on realworld solar farms and electrical equipment to obtain three categories of benchmark instances covering solar farms with between 120 and 1500 strings.
The simulations on the MILP formulation from A mixedinteger linear program using our synthetic benchmark instances show that Gurobi is able to efficiently solve small and mediumsized solar farm instances; almost all small and many medium instances are solved to optimality within one day. For the larger instances, one day is not quite enough on some instances to find feasible solutions. But when Gurobi does find solutions, these are for the most part already quite acceptable in terms of the MIP gap.
Moving forward, we see two main directions. From a practical perspective, the vast amount of customization in the problem formulation and in the process of generating benchmark instances can be exploited to investigate different aspects of optimizing the layout of solar farms. From an algorithmic perspective, Gurobi could use some help to find feasible solutions. Solutions from any heuristic approach could be passed on to Gurobi as a warmstart solution. Inspiration for algorithmic approaches can be found in similar optimization problems: Network flows in many variations are a very classical and wellstudied problem in theoretical computer science. Equation (8) enforces a tree structure, so the Steiner Tree Problem could be a different point of attack. There a given subset of vertices (think: strings) of a directed graph need to be connected to a specified vertex (here: grid point beyond the transformers) using a directed tree incorporating a subset of intermediate vertices. The layers in SoFaCLaP already give a sense of direction. A similar problem is the MultiLevel Facility Location Problem, in which in a layered graph lowerlevel vertices need to be assigned to higherlevel vertices. Any algorithmic approach can of course also stand on its own. To evaluate these, we have established the MILP as a possible baseline, which is one of the main purposes of this work.
Availability of data and materials
The benchmark instances introduced in this work are available in the RADAR4KIT repository, http://www.doi.org/10.35097/676. The dataset supporting the conclusions of this article is available in the RADAR4KIT repository, http://doi.org/10.35097/683.
Notes
As alluded to in SoFaCLaP from a practical perspective, it does not suffice to merely have the positions of the strings and other devices in an existing solar farm. We rather need all potential positions of devices. This represents an intermediate step in the planning process which is, understandibly, not publicly available.
Gurobi can bound the optimal value from above by the best incumbent solution (value of ub) and from below by more sophisticated considerations (lb). The MIP Gap is defined as \({(\mathrm {ub}\mathrm {lb})}/{\mathrm {lb}}\).
References
ABB Ltd.: Photovoltaic Plants. (2019). Retrieved on January 20, 2022. https://library.abb.com/d/9AKK107492A3277
Alpiq Holding AG: Società Agricola Solar Farm 2. Retrieved on January 24, 2022. https://www.alpiq.com/powergeneration/newrenewableenergysources/solarenergy/societaagricolasolarfarm2/
Bischoff M, Ewe H, Plociennik K, Schüle I (2014) Multiobjective planning of largescale photovoltaic power plants. In: Helber S, Breitner M, Rösch D, Schön C, Graf von der Schulenburg JM, Sibbertsen P, Steinbach M, Weber S, Wolter A (eds) Operations research proceedings 2012. Springer, Cham, pp 333–338
Bollipo RB, Mikkili S, Bonthagorla PK (2020) Critical review on pv mppt techniques: classical, intelligent and optimisation. IET Renew Power Gener 14(9):1433–1452
Brandes U, Eiglsperger M, Herman I, Himsolt M, Marshall MS (2002) Graphml progress report structural layer proposal. In: Mutzel P, Jünger M, Leipert S (eds) Graph Drawing. Springer, Berlin, pp 501–512
Chimani M, Gutwenger C, Jünger M, Klau GW, Klein K, Mutzel P (2013) The open graph drawing framework (OGDF). In: Tamassia R (ed) Handbook of graph drawing and visualization. CRC Press, Boca Raton, pp 543–569
Dutta S, Overbye TJ (2011) A clustering based wind farm collector system cable layout design. In: Power and Energy Conference at Illinois (PECI), IEEE, pp. 1–6
Every E (2022) Using Y Connectors in String Inverter Systems. Retrieved on January 24. https://solectria.com/blog/usingyconnectorsinstringinvertersystemsparti/
Gajda JW (2022) Solar Farms: Design & Construction. Retrieved on February 1. https://standards.ieee.org/wpcontent/uploads/import/documents/presentations/nesc_workshop__solar_farmsdesign_construction.pdf
Garey MR, Johnson DS (1979) Computers and Intractability: a Guide to the Theory of NPcompleteness. A series of books in the mathematical sciences. W. H. Freeman & Co., New York
Gritzbach S, Ueckerdt T, Wagner D, Wegner F, Wolf M (2019) Engineering Negative Cycle Canceling for Wind Farm Cabling. In: Bender, M.A., Svensson, O., Herman, G. (eds.) 27th Annual European Symposium on Algorithms (ESA 2019). Leibniz International Proceedings in Informatics (LIPIcs), vol. 144, pp. 55:1–55:16. Schloss Dagstuhl–LeibnizZentrum fuer Informatik, Dagstuhl. ArXiv version available at https://arxiv.org/abs/1908.02129. http://drops.dagstuhl.de/opus/volltexte/2019/11176
Gurobi Optimization, Inc.: Gurobi Optimizer Reference Manual. (2018). Gurobi Optimization, Inc. http://www.gurobi.com
HELUKABEL GmbH: Cables and Cable Systems for Photovoltaic Installations. Retrieved on December 11, 2021. https://www.helukabel.com/media/publication/de/brochures/pv_20/PV_BROCHURE_Photovoltaik_EN~1.pdf
IRENA: Renewable power generation costs in 2020. Technical report, International Renewable Energy Agency, Abu Dhabi (June 2021). Retrieved on January 24, (2022). https://www.irena.org/publications/2021/Jun/RenewablePowerCostsin2020
Kirchartz T, Rau U (2018) What makes a good solar cell? Adv Energy Mater 8(28):1703385
Lehmann S, Rutter I, Wagner D, Wegner F (2017) A simulatedannealingbased approach for wind farm cabling. In: Proceedings of the Eighth International Conference on Future Energy Systems. eEnergy ’17, pp. 203–215. ACM, New York
Liu T, Yang X, Chen W, Li Y, Xuan Y, Huang L, Hao X (2019) Design and implementation of high efficiency control scheme of dual active bridge based 10 kv/1 mw solid state transformer for pv application. IEEE Trans Power Electron 34(5):4223–4238
Ljubić I (2021) Solving steiner trees: recent advances, challenges, and perspectives. Networks 77(2):177–204. https://doi.org/10.1002/net.22005
LS ELECTRIC Co., Ltd.: Photovoltaic Combiner Box. (2021). Retrieved on January 20, 2022. https://www.lselectric.com/
Luo Z, Qin H, Cheng T, Wu Q, Lim A (2021) A branchandpriceandcut algorithm for the cablerouting problem in solar power plants. INFORMS J Comput 33(2):452–476
Mertens K (2019) Photovoltaics: fundamentals, technology, and practice, 2nd edn. Wiley, Chichester, West Sussex
OrtizAstorquiza C, Contreras I, Laporte G (2018) Multilevel facility location problems. Eur J Oper Res 267(3):791–805
Sanjay P (2022) With 2,245 MW of Commissioned Solar Projects, World’s Largest Solar Park Is Now at Bhadla. Retrieved on January 25. https://mercomindia.com/worldlargestsolarparkbhadla/
SMA Solar Technology AG: SMA StringCombiner. (2020). Retrieved on January 20, 2022. https://files.sma.de/downloads/DCCMBUDEN1834V16web.pdf
SolarBOS, Inc.: Standard Recombiners. Retrieved on January 20, 2022. http://www.solarbos.com/StandardRecombiners
SolarPower Europe: Global market outlook for solar power 2020–2024. Technical report (2020). Retrieved on January 31, (2022). https://www.solarpowereurope.org/globalmarketoutlook20202024/
Tavana M, Santos Arteaga FJ, Mohammadi S, Alimohammadi M (2017) A fuzzy multicriteria spatial decision support system for solar farm location planning. Energy Strategy Rev 18:93–105
Acknowledgements
The authors would like to thank Robin Grab for giving most valuable insights into the finer details of solar farms, Torsten Ueckerdt for fruitful discussions on graph theory and algorithms, Dorothea Wagner for proofreading parts of this work, and an anonymous reviewer for a very helpful hint on literature previously unknown to the authors.
About this supplement
This article has been published as part of Energy Informatics Volume 5 Supplement 1, 2022: Proceedings of the 11th DACH+ Conference on Energy Informatics. The full contents of the supplement are available online at https://energyinformatics.springeropen.com/articles/supplements/volume5supplement1.
Funding
This research was funded by the Helmholtz Association under the program “Energy System Design” and by the German Research Foundation (DFG) as part of the Research Training Group GRK 2153: Energy Status Data—Informatics Methods for its Collection, Analysis and Exploitation.
Author information
Authors and Affiliations
Contributions
SG: conceptualization, validation, formal analysis, investigation, resources, data curation, writing—original draft, review and editing, visualization. DS: methodology, software, investigation, writing—original draft, review and editing. MW: conceptualization, validation, resources, writing—review and editing. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Gritzbach, S., Stampa, D. & Wolf, M. Solar farm cable layout optimization as a graph problem. Energy Inform 5 (Suppl 1), 25 (2022). https://doi.org/10.1186/s4216202200200z
Published:
DOI: https://doi.org/10.1186/s4216202200200z