# Optimisation models for the design of multiple self-consumption loops in
semi-rural areas

Yohann Chasseray  Mathieu Besançon  Éva Petitdemange  Xavier Lorca

###### Abstract

Collective electricity self-consumption gains increasing interest in a context
where localised consumption of energy is a lever of sustainable development.
While easing energy distribution networks, collective self-consumption
requires complementary prosumers’ profiles. Before determining the proper
energy exchanges happening between these prosumers, one must ensure their
compatibility in the context of collective self-consumption. Motivated by real
use cases from a solar power producer, this article proposes network flow-
based linear models to solve both the design aspect of the problem and the
attribution of distribution flows between the involved prosumers. Two main
models are proposed, handling (i) single collective self-consumption loop
creation and (ii) multiple loop creation. One of the objectives of this work
is to provide models that can be applied at a strategic level which implies
their extension to large time scale and large spatial scale. To do so,
associated Benders and Dantzig-Wolfe decompositions are proposed to ensure
model scalability along temporal and spatial dimensions. The proposed models
are tested on realistic use cases to assess their performances.

###### keywords:

OR in energy , Mixed-integer linear programming , Benders decomposition ,
Dantzig-Wolfe decomposition , Smart grid

††journal: arxiv

[inst1]organization=IMT Mines Albi, addressline=1 allée des sciences, Campus
Jarlard, city=Albi, postcode=81000, country=France

[inst2]organization=Université Grenoble Alpes, Inria, LIG, addressline=621
avenue centrale, city=Saint-Martin-d’Hères, postcode=38400, country=France

##  1 Introduction

In a context where the impact of global warming and the increasing scarcity of
the planet’s resources are being felt more and more, the management of energy
resources has become a central issue and one of the major challenges our
societies are facing today. Achieving a sustainable global energy production
system means introducing renewable energy into the energy mix. While the share
of renewable energy sources in many production systems has increased in recent
decades, their internal characteristics affect the way energy is distributed.
The intermittency of renewable energy sources such as wind and solar means
dealing with temporally and spatially variable energy sources. In particular,
since external factors, most often meteorological influence them, the temporal
variations can be quite unpredictable. This is especially true for
photovoltaic and wind energy, for example.

Moreover, these sources have emission points that are much more decentralised
and scattered across the territory than traditional sources such as nuclear or
coal power plants. All these characteristics imply a degree of uncertainty
which impacts national distribution networks.

All these changes force countries and energy providers to adapt their
distribution schemes towards localised energy consumption. Localised
consumption poses the question of a more globally decentralised energy system,
as many undergoing benefits can be identified. First, achieving a localised
network is a way to cut off transmission costs. In a localised network, power
losses induced by long-distance transmission are minimised which would be in
favour of energy efficiency (Kroposki, , 2017). Reaching energy efficiency
also supposes that the production of the network is tailored to the
consumption of a considered area. Pleading for a decentralised network means
that considered areas are revised to be local (Conejo and Sioshansi, , 2018).
As it would be easier to estimate energy needs on a local scale than on a
global scale, decentralised production assures the efficiency of energy
resource use. The proximity of generation and consumption sites also enhances
grid stability. By reducing the risk of major disruptions, decentralisation
then improves the resilience of the whole energy network (Mohamad et al., ,
2018). Resilience and efficiency of the network become particularly pertinent
when considering the likelihood of a substantial increase in electricity
consumption in the upcoming decades, not only in terms of overall volume but
also in terms of variability in usage (electrical cars, buses, trains). As
mentioned at the beginning of this section, the network is thought to
integrate renewable energies. These energies are unevenly distributed across
regions. Considering local networks ensures a more accurate estimation of the
involvement of renewable sources in energy generation within each specific
area allowing the consideration of each area specificity (Lund, , 2009).

A common way to localise energy consumption is self-consumption, where
produced energy is consumed onsite by the producer himself. Recent legislation
(e.g. JO,  (2017) in France) extended self-consumption principles to
collective self-consumption where producers and consumers remain locally
positioned but can be represented by different legal entities. Despite this
favourable context, some constraints (geographical and installed power
restrictions) limit the formation of collective self-consumption operations.
Besides these constraints, setting up collective self-consumption requires
different but complementary consumer and producer profiles to ensure mutual
interest, resulting in few existing operations.

An overarching decision-making system would be necessary to facilitate the
establishment of collective self-consumption communities including solar
energy companies, other producing and consuming companies and individual
dwellings. This system should consider technical, economical, and legal
constraints and propose feasible and optimal loops. Such a system will also
facilitate discussions on the potential profitability of various communities.
This need for an integrated decision support system is notably formulated by
Amarenco - a solar energy production company - and motivated our work to
design optimal self-consumption loops that should be investigated.

In pursuit of this objective, we formulate the design of self-consumption
loops as a mixed-integer linear optimisation problem. Given that the network
design needs to encompass a significant time horizon and cover a relatively
expansive area (spanning several cities), the proposed model has been extended
with Benders and Dantzig-Wolfe decomposition techniques to address challenges
on both large temporal and spatial scales.

The next section presents related work on individual and collective self-
consumption optimisation with a focus on business aspects and optimisation
methods. Section 3 details the single-loop model (SLCpct) and multi-loop model
(MLCpct) as well as their Dantzig-Wolfe (MLCol) and Benders (SLExt, MLColExt)
decompositions. Section 4 details the creation process of realistic instances
to apply the models. This section also defines business indicators built out
of models’ variables and parameters that can help evaluate proposed community
designs. Section 5 presents results of the application of the models on priory
defined realistic instances. The performance of the models is discussed, and
insights regarding the application of the models in a business context are
provided. Section 6 provides some perspectives regarding the developed models
and their potential coupling with domain-related knowledge bases, leading to
the conclusion and planned future works.

##  2 Related work

Despite the recent arrival of self-consumption legislation (e.g. JO,  (2017)
in France) allowing different local actors to share a common photovoltaic
production, several studies already got their interest focused on the
simulation and optimisation of energy communities.

A literature review has been conducted under the criteria shown in Table 1,
which describes two main aspects of previous studies, one being related to the
size of the tackled problems and used methodology, and the other related to
business issues. In this systematic literature review, the objective was to
find articles using optimisation techniques to ease the building of self-
consumption operations that include several actors in a given community.

Table 1: Literature review evaluation criteria

Criterion Description Problem size How many actors are considered? How are
they dispatched on the territory?  Time range What are the optimisation time
periods and horizon?  Method Which method, algorithm, or model are used to
solve the optimisation/simulation problem?  Self-consumption Is the collective
aspect of self-consumption considered in the model?  Actors selection Does the
model include the selection of actors and installations?  Leg. constraints Are
some legal constraints integrated into the model?

Table 2 sums up the conducted literature review and compares our approach to
some of the analysed articles. The presented articles are selected as they
encompass one or several dimensions of our approach.

Table 2: Comparison of analysed articles

Reference Size of the problem Method Actors selection nb actors time horizon
time range Al-Sorour et al.,  (2022) 6 4 months 10 min MILP Yes  Bahret and
Eltrop,  (2021) 20 1 year NA MILP No  Brusco et al.,  (2023) 41 NA hour MILP
No  Espadinha et al.,  (2023) 4 1 year hour Func minimisation No  Gil Mena et
al.,  (2023) 12 1 year hour Heuristic No  Goitia-Zabaleta et al.,  (2023) 15 1
year NA MILP No  Gullì et al.,  (2022) 4 1 year hour MILP No  Luz and E Silva,
(2021) 2 NR 15 min NA No  Mustika et al., 2022a 7 1 month 30 min MINLP No
Perger et al.,  (2021) 15 1 year hour MILP No  Pinto et al.,  (2020) 50 NA NA
MILP No  Reis et al.,  (2022) 50 NA min MAS - Heurisitic No  Sangaré et al.,
(2023) 7 1 day 30 min MILP No  Simoiu et al.,  (2021) 10 NA hour MILP No
Stephant et al.,  (2021) 8 1 day NA Game Theory No  Proposed model 100 6
months hour MILP - Benders Dantzig-Wolfe Yes

###  2.1 Specific application context

Related lines of work show that electricity consumption optimisation is an
active topic of interest. Despite some studies focusing on the specific cases
of multi-energy communities, including gas, wind, and/or heat as energy
sources (Bio Gassi and Baysal, , 2022; Gullì et al., , 2022; Pinto et al., ,
2020; Bokkisam et al., , 2022; Bahret and Eltrop, , 2021), most of identified
papers deal with solar energy only, as it represents the majority of current
collective self-consumption projects.

A large majority of the previous work focuses on the management of self-
consumption or collective self-consumption operations making the assumption
that the actors of the loops are already defined and fixed. Mustika et al.,
2022b study the impact of the addition of a newcomer into an existing
collective self-consumption loop. They propose a heuristic method to define
which actor has the most impact on the self-consumption loop. Among studied
articles, some only focus on individual self-consumption without considering
multiple actors. Some configurations, although technically considered
collective self-consumption as they involve several households, remain in a
middle ground between individual and collective self-consumption. Many
articles, such as Gullì et al.,  (2022); Mustika et al., 2022a ; Pasqui et
al.,  (2023); Stephant et al.,  (2021) apply their model to a group of
households being located in the same building or in the same neighbourhood,
which can technically be defined as a collective self-consumption loop, but
remains clearly limited geographically and in terms of number of individual
actors. Geographically framed models fail to take into account the legal
distance constraint that is inherent to collective self-consumption definition
(Strepparava et al., , 2022). More generally, regulatory constraints are
rarely considered explicitly in optimisation models but are rather used as a
criterion to assess found solutions (Pinto et al., , 2020; Gribiss et al., ,
2023; Gil Mena et al., , 2023).

Other lines of work extend the diversity of analysed profiles to include other
types of consumers, such as professional buildings (Wang et al., , 2021;
Goitia-Zabaleta et al., , 2023), electric vehicle pools (Surmann et al., ,
2020; Piazza et al., , 2023), a winery (Luz and E Silva, , 2021) or a train
station (Simoiu et al., , 2021), showing the economical interest of collective
self-consumption. Enlarging the diversity of profiles is in favour of
collective self-consumption as diverse actors may present complementary
consumption and production profiles.

Extending the breadth of considered actors also implies an extension of the
considered area. In most cases, proposed algorithms and models are applied to
an urban case study (Brusco et al., , 2023; Goitia-Zabaleta et al., , 2023;
Gullì et al., , 2022; Mustika et al., 2022a, ; Perger et al., , 2021). Beyond
revealing that rural or semi-rural self-consumption loop configurations are
rarely considered in the conception of optimisation models, it also underlines
the fact that most current self-consumption loops are essentially built in
urban context thus limiting the range of actors that can be considered. If
urban contexts may favour collective self-consumption as the density of
consumers and prosumers is higher than in rural contexts, focusing on semi-
rural contexts can also have some advantages, as the constraint of geographic
contiguity can be revised by regulatory texts and open to new types of
producers. Luz and E Silva,  (2021) for example showed the benefits of
creating an energy community between a rural winery and the nearby city.

Extending the range of considered actors also means that proposed models
should adapt to a growing number of self-consumption participants. Despite
extending the diversity of involved actors, some articles focus on larger
problems, defining optimisation for more than 50 actors (Pinto et al., , 2020;
Reis et al., , 2022; Böhringer et al., , 2023; Luz et al., , 2021).

In a nutshell, only few previous lines of work treat the problem on both
spatial dimension (large number of actors) and temporal dimension (large time
horizon and high number of time steps). Above all, the proposed approaches are
mainly focused on flow repartition, and very few of them address the design
aspect of collective self-consumption loops definition.

###  2.2 Modelling and solving approaches

Mainly, three optimisation approaches are used, which are (i) mixed-integer
linear programming models, (ii) agent-based system models and (iii) heuristics
or meta-heuristics optimisation algorithms. In articles such as Reis et al.,
(2022); Stephant et al.,  (2021); Surmann et al.,  (2020), agent-based models
are mostly used to ensure that each participant of a self-consumption loop is
making its choices independently from others and that the optimisation system
is taking into account its preferences. Luz et al.,  (2021) adopts the point
of view of device scheduling, each device having constraints concerning its
use. Agent-based programming is used to model situations where actors do not
have the information about other actors to decide a strategy. It allows a
compromise between the research of a group of optimal solutions while keeping
constraints on each individual’s preferences. In energy-sharing communities,
one of the issues is the privacy regarding participant data (production and
load data). As optimising a community and its associated exchanges requires
knowing each participant’s consumption and production profile, some work
(Bokkisam et al., , 2022) focus on systems that guarantee anonymity while
allowing the use of participant’s information concerning their consumption and
production.

In terms of practical application, most of the articles use theoretical or
simulated data to represent realistic scenarios (Gil Mena et al., , 2023;
Gribiss et al., , 2023; Luz et al., , 2021). However, some of them are driven
by a real use case involving local energy communities.

Heuristics and meta-heuristics methods are generally used to deal with larger
problems in a reasonable amount of time. In the case of collective self-
consumption optimisation two dimensions increase the size of problems, which
are, the number of integrated producers, as well as the time horizon and time
step considered. Wang et al.,  (2021) for instance, use a particle swarm
algorithm to optimise storage and trading strategies within an energy
community involving a large number of participants (10 professional buildings
and 90 households). Gil Mena et al.,  (2023) used the JAYA heuristic algorithm
on hourly data over a one-year horizon. Similarly, Heidari et al.,  (2021)
used a genetic algorithm as the thermodynamic model used in their study is
nonlinear, and becomes time-consuming for large time horizons.

Mixed-integer linear programming models, however, remain the more common
methods used for collective self-consumption optimisation as the exchanges
between actors can easily be modelled through linear flow-type constraints.
Even though they remain less costly than non-linear models, linear programming
is mostly applied to small problems, which rarely exceed 10 or 20 participants
on large time horizons.

The problem of collective self-consumption has to be designed over several
time steps and should be considered on a more global scale than the limited
cases of already existing communities involving few participants. Despite the
interest of linear programming models for collective self-consumption
optimisation due to their ease in modelling exchanges between actors, they are
usually applied to small-scale problems involving either a few participants or
a short time horizon. Addressing the complexity of collective self-
consumption, however, requires a broader perspective.

As highlighted in Table 2, our proposal fills the identified gap in the
literature regarding self-consumption loops in rural or semi-rural
environments. In particular, the proposed multi-loop model tends to address
three aspects that have been overlooked in previous work, which are:

  * 1.

The integration of legal constraints directly in optimisation models when
defining self-consumption loops.

  * 2.

The inclusion of loop configuration in the optimisation problem, making it
possible to build the optimal set of energy communities based on a given group
of individual prosumers and their characteristics (consumption and production
profile, geographical location).

  * 3.

Model decompositions to scale to larger problems spatially and regarding time
horizon.

##  3 Optimisation models

This section details the models that have been defined to find the optimal
microgrid configuration for a given list of prosumers. Two main models have
been defined named single-loop model and multi-loop model. These initial
models may present a long solving time when dealing with large instances. As
illustrated in Figure 1, these limitations arise regarding two dimensions
which are (i) growing time scale, and (ii) growing geographical scale
(inducing a higher number of prosumers).

To tackle temporal scale limitations, a Benders decomposition is proposed,
which splits the problem formulation into two subproblems. The first one
(master problem) resolves the design aspect of the network in terms of member
participation to self-consumption loops. The second one (subproblem) adjusts
energy exchanges between net producers and net prosumers.

The geographical scale dimension is approached using a Dantzig-Wolfe
decomposition where the column generation process is simplified through the
generation of feasible loops directly from the prosumer’s neighbourhood graph
topology, avoiding the branch-and-price algorithm.

The combination of the two decompositions (Benders and Dantzig-Wolfe) on the
multi-loop model is then used to scale the problem-solving capacities from
small numbers of actors and short time horizon to larger problems in both
dimensions.

From a business point of view, the design problem can be considered at an
operational level (day-to-day optimisation of self-consumption in a small
neighbourhood). Our objective though is to treat strategic network design
problems, as collective self-consumption is planned for several years, on
potentially large territories. This changes the size of studied problems,
making it necessary to scale them in time and space through the presented
decompositions. The combination of the initial models with their decomposition
led to the 5 following models, also shown in Figure 1, whose performance is
compared in Section 5:

  * 1.

Single-loop compact model (SLCpct) assumes that only one self-consumption loop
is to be built and each actor can either join or stay apart from this self-
consumption loop.

  * 2.

Benders extended single-loop model (SLExt) decomposes the single-loop model to
allow large time scale problems to be solved in a reasonable amount of time.

  * 3.

Multi-loop compact model (MLCpct) extends the single-loop model by providing
the possibility to build several self-consumption loops with an actor joining
one or none of them.

  * 4.

Generated cliques multi-loop model (MLCol) decomposes the multi-loop model
using Dantzig-Wolfe decomposition and a clique generation algorithm.

  * 5.

Benders extended multi-loop model (MLColExt) decomposes the Extended multi-
loop model to allow large time-scale problem resolution for the Dantzig-Wolfe
decomposition of the multi-loop model.

Figure 1: Objective and impact of solving approaches (Dantzig-Wolfe and
Benders decomposition).

All the presented problems embed the time scale dimension and can include a
stochastic aspect to reasoning on a set of possible scenarios.

###  3.1 Definitions and assumptions

To express the optimisation problem, we make the following assumptions:

######  Assumption 3.1 (Fixed actors).

The list of potential members of the loops is known and fixed before the
optimisation. Whether each actor belongs or not to the self-consumption loop
is however still to be determined.

######  Assumption 3.2 (External electricity pricing).

The electricity buying and selling cost outside the loop may vary over the
actors and is proportional to the amount of bought or sold electricity.
Details about price determination are given in Section 4.1.3.

######  Assumption 3.3 (Prosumers actors).

Each actor is modelled as a prosumer. A producer can however have zero
production as well as a consumer can have zero consumption. They are thus
respectively depicted as direct consumers and direct producers.

######  Assumption 3.4 (Consumption/production data).

The optimisation takes place over several time steps. For each time step and
each scenario, the consumption and production are known for each actor.
Consumption can be predicted from previous consumption data of an actor and
production data can be evaluated through solar plant characteristics
(installed power, panel orientation, panel tilt) and local environmental
conditions (irradiation) based on the localisation of actors.

######  Assumption 3.5 (Loop exclusivity).

Single-loop and multi-loop configurations can be considered. In the single
loop scenario, an actor either participates in the loop or is excluded from
the loop. In the multi-loop scenario, an actor can participate in one loop
(only) among several loops or can be excluded from all of the loops.

Figure 2: Network flow model representation

Within the scope defined by the previous assumptions, we set the following
optimisation parameters, which will help define the optimisation problem (See
Figure 2):

  * 1.

$\mathcal{A}=\\{A_{1},\ldots,A_{n}\\}$ all available actors that are potential
members of a self-consumption loop.

  * 2.

$C_{1},\ldots,C_{n}$ the net consumption of the available actors (when needed,
absolute consumptions are expressed with $C_{\mathrm{abs},i}$ expression).

  * 3.

$P_{1},\ldots,P_{n}$ the net quantity of energy produced by each of the
available actors (when needed, absolute productions are expressed with
$P_{\mathrm{abs},i}$ expression).

  * 4.

$F_{1},\ldots,F_{n}$ the grid-sourced electricity cost for each available
actor.

  * 5.

$R_{1}\ldots,R_{n}$ the grid electricity selling price for each available
actor.

  * 6.

$\mathcal{L}={l_{1},\ldots,l_{n/2}}$ the set of possible self-consumption
loops having at least 2 actors each, given the n available actors.

  * 7.

$D_{ij}$ is the geographical distance between two actors and $D_{\text{leg}}$
is the maximal legal geographical distance legally acceptable between two
actors participating in the same self-consumption loop.

  * 8.

$P^{\text{inst}}_{i}$ installed power of each actor and
$P^{\text{inst}}_{\text{leg}}$ the installed power legal limit that should not
be exceeded by the cumulative installed power of the members of a self-
consumption loop.

######  Definition 3.1 (Direct consumer).

An actor $A_{i}$ is called a direct consumer when $P_{i}=0$

######  Definition 3.2 (Direct producer).

An actor $A_{i}$ is called a direct producer when $C_{i}=0$

For a natural number $n$, we use $[n]\equiv\\{1\ldots n\\}$ and define the
following decision variables:

  * 1.

$x_{i}\in\\{0,1\\},i\in[n]$ the binary variables indicating that actor $i$ is
a member of a self-consumption loop. When extending to multiple loops, those
variables are indexed by the loop: $x_{i}^{l}$.

  * 2.

$e_{ij}\in[0,1],(i,j)\in[n]^{2},i\neq j$ the real variables indicating the
amount of energy that each actor $i$ exchange with actor $j$ within a self-
consumption loop. Self-consumed energy amounts ($e_{ii}$) are not represented
as decision variables as they can be deduced afterwards (see section 3.2.1,
individual self-consumption constraints paragraph).

  * 3.

$f_{1},f_{2},\ldots,f_{n}$ the amounts of energy supplied by the grid to each
actor.

  * 4.

$r_{1},r_{2},\ldots,r_{n}$ the amounts of energy sold to the grid by each
actor.

###  3.2 Initial single-loop network design and flow circulation problem

In the initial flow circulation problem the first constraints to be defined
are Kirchhoff flow conservation constraints, which ensure flow circulation
avoiding accumulation of the energy exchanged. For each actor, flow
conservation is expressed through an equality constraint between the energy
amount received by the actor and the energy amount given away by the same
actor. Received energy is the addition of energy received from other actors,
energy produced by the actor and energy taken from the grid. Sent energy is
the addition of energy given to other actors, energy consumed by the actor and
energy sold to the grid. In the complete model presented below, this
constraint is expressed with equation (2d).

####  3.2.1 Constraints from self-consumption applications

To stay in line with concrete self-consumption cases, additional constraints
can be added to the model. Different constraints can be set depending on the
type of self-consumption that one chooses to apply, based on the following
definitions:

######  Definition 3.3 (Self-consumption).

Self-consumption is defined at the scale of an actor. Self-consumed energy
corresponds to energy that has been produced by an actor and which is consumed
by this actor. Self-consumption of an actor does not imply that he takes part
in a self-consumption loop. An actor $A_{i}$ maximises its self-consumption
rate when $r_{i}+\sum_{j\in[n],j\neq i}e_{ij}$ is minimal.

######  Definition 3.4 (Collective self-consumption).

Collective self-consumption is defined at the scale of a self-consumption
loop. Collective self-consumed energy corresponds to the energy that has been
produced by a member of the loop, and which is consumed within the loop. To do
so, the produced energy can be consumed by the producer itself (self-
consumption) or by another member of the loop. A loop maximises its collective
self-consumption rate when $\sum_{i\in[n]}r_{i}$ is minimal.

##### Individual self-consumption constraints

Even though no legal requirement is considered concerning individual self-
consumption, one forces the actors of a self-consumption loop to satisfy their
consumption needs before exchanging energy with other actors or with the grid.
To force the energy that is produced by an actor to be consumed by the same
actor prosumers’ production and consumption are expressed as net production
and consumption, assuming that $e_{ii}$ are fixed either to $P_{i}$ if
$P_{i}<C_{i}$ (net consumer) or to $C_{i}$ if $P_{i}>C_{i}$ (net producer).
Individual self-consumption constraints are not related to whether or not an
actor is a member of a collective self-consumption loop as even an excluded
actor should consume a part of the energy they produce.

##### Collective self-consumption constraints

The interest of participating in collective self-consumption is to favour
locally produced electricity instead of grid exchanges. Each net producer must
then exchange electricity with other loop members when the loop is globally in
need of electricity. Similarly, net consumers must favour electricity produced
inside the loop instead of electricity from the grid. In Model (2), these
constraints are expressed through Equations (2e) to (2i) and equivalence (2n).

##### Limiting energy circulation through actors

The total amount of energy distributed by an actor (collective self-
consumption + energy sold to the grid) should not exceed the amount of
produced energy. In Model (2), this constraint is expressed with equation
(2j). Similarly to distributed energy, the total energy amount that is
consumed (collective self-consumption and energy bought to the network) by an
actor should not exceed the actor’s consumption, which is expressed as
follows:

$\sum_{k\in[n],k\neq i}e_{ki}+f_{i}\leq C_{i},\forall i\in\\{1,\ldots n\\}.$
(1)

However, only one of the two sets of constraints is necessary for the complete
problem as Kirchhoff constraints enforce the second one. To avoid duplicating
constraints, Constraint (1) is thus removed from the final model.

##### Actor exclusion constraints

When actor $i$ is excluded from the self-consumption loop, we have $x_{i}=0$.
As a consequence of its exclusion, an actor can’t exchange electricity with
other actors. It means that $e_{ij}$ variables are subject to the value of
$x_{i}$ and $x_{j}$ for each pair of actors, as depicted by Constraints (2b)
and (2c) of Model (2).

####  3.2.2 Maximal total installed power of a self-consumption loop

To ensure that the loop respects the legal installed power restriction
presented previously, Constraint (2m) is set to prevent the global installed
power from exceeding the legal criteria.

####  3.2.3 Neighbourhood graph and distance restriction

Legal distance constraints define a maximum geographical distance between two
actors for them to be included in the same loop. These constraints can be
represented in an undirected graph with all $n$ actors as nodes, and edges
between them only if they are closer to each other than the legal distance. A
loop respecting the constraints will therefore correspond to a clique in that
graph. These graphs correspond to intersection graphs of disks of identical
diameters (equal to the maximum legal distance) in the plane and have been
extensively studied. One noteworthy result is that maximal cliques in such
graphs can be generated in polynomial time (Clark et al., , 1990).
Additionally, edges can be removed in preprocessing between two actors if the
sum of the installed power production exceeds the allowed threshold (see
Section 3.2.2).

We will denote by $\mathcal{E}$ the set of edges in the graph, and
$\mathcal{N}_{i}$ the neighbours of node $i$. To cope with the legal
restrictions concerning the geographical distance between each pair of actors
participating in a self-consumption loop ($D_{ij}<D_{leg}$) equation (2l)
refers to $\mathcal{E}$ to avoid non-neighbours to be part of the same
collective self-consumption loop and define associated constraints.

####  3.2.4 Uncertainty in the production and consumption profiles

Renewable energy production and consumption are by nature uncertain and
potentially highly correlated across actors and time steps. Furthermore, the
contracts of certain actors with the grid may involve variations in the buying
or selling prices, denoted as $F_{i}$ and $R_{i}$ respectively. These
variations could be implemented through schemes such as time-of-use pricing or
could involve uncertainties in prices, such as when actors participate in
price-based demand response programs like peak shaving (Paterakis et al., ,
2017; Albadi and El-Saadany, , 2008). We therefore consider
$(R_{i}^{t},F_{i}^{t},C_{i}^{t},P_{i}^{t})$ to be non-independent random
vectors observed through a finite set of scenarios $\mathcal{S}$ with given
associated probabilities $p_{s}$.

We model the problem as a two-stage stochastic program, with the loop
membership decisions $x$ taken at the first stage, and the flow variables at
the second stage. A scenario $s$ corresponds to a realisation of the uncertain
parameters for all time steps, after which the loop operator can decide on the
continuous flow variables $e,f,r$ in an operational stage. Importantly, the
decisions taken at all time steps do not influence the state of the system,
nor the decisions for the following time steps. This allows us to consider
only these two design and operation stages, with the operation stage
encompassing all time steps at once.

####  3.2.5 Objective function

In this optimisation problem, the objective is to find the best self-
consumption loop from an economic point of view, that is to say, favouring
exchanges between the grid and actors who have the most interesting prices
(high selling prices, low buying prices)111The objective function takes all
actors into account, without considering whether they belong to the self-
consumption loop. This is used to include the trivial case where no actor
belongs to the self-consumption loop, which would result in an objective value
computed on loop members only to be equal to zero.:

$f_{\mathrm{obj}}=\sum_{i\in[n]}\Bigl{(}F_{i}f_{i}-R_{i}r_{i}\Bigl{)}.$

Fixed inclusion costs ($T_{i}$ adhesion costs of each actor $i$), as well as
the price of the electricity within the loop ($r$), are not considered in the
objective function, as they will be determined once the geometry of the loop
and exchange happening inside the loop are set. Fixing $T$ after this first
optimisation step to reach equity between actors involved in the self-
consumption loop is evoked as a perspective of this work (Section 6).

####  3.2.6 Complete single-loop compact model (SLCpct)

All previously defined constraints are aggregated in Model (2) below. This
model expresses the coupled problem of network design and flow repartition in
a single-loop configuration, meaning that either belongs to this loop or is
not participating in collective self-consumption.

$\displaystyle\min_{x,e,r,f,z,y}$
$\displaystyle\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}\sum_{i\in[n]}p_{s}\,(F_{i}^{st}f_{i}^{st}-R_{i}^{st}r_{i}^{st})$
(2a) s.t. $\displaystyle e_{ij}^{st}\leq x_{i}P_{i}^{st}$
$\displaystyle\forall(i,j)\in\mathcal{E},s\in\mathcal{S},t\in\mathcal{T}$ (2b)
$\displaystyle e_{ij}^{st}\leq x_{j}C_{j}^{st}$
$\displaystyle\forall(i,j)\in\mathcal{E},s\in\mathcal{S},t\in\mathcal{T}$ (2c)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}^{st}+r_{i}^{st}+C_{i}^{st}=\sum_{j\in\mathcal{N}_{i}}e_{ji}^{st}+f_{i}^{st}+P_{i}^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (2d)
$\displaystyle y_{i}^{st}\leq x_{i}Q^{st}$ $\displaystyle\forall
i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (2e) $\displaystyle y_{i}^{st}\leq
r_{i}^{st}$ $\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$
(2f) $\displaystyle y_{i}^{st}\geq r_{i}^{st}-(1-x_{i})Q^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (2g)
$\displaystyle\sum_{i\in[n]}y_{i}^{st}\leq\sum_{i\in[n]}x_{i}(P_{i}^{st}-C_{i}^{st})+M^{st}(1-z^{st})$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T}$ (2h) $\displaystyle
y_{i}^{st}\leq M^{st}z^{st}$ $\displaystyle\forall i\in[n],\forall
s\in\mathcal{S},t\in\mathcal{T}$ (2i)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}^{st}+r_{i}^{st}\leq B_{i}^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (2j)
$\displaystyle e,r,f,y\geq 0$ (2k) $\displaystyle x_{i}+x_{j}\leq 1$
$\displaystyle\forall(i,j)\notin\mathcal{E}$ (2l)
$\displaystyle\sum_{i\in[n]}x_{i}P^{\text{inst}}_{i}\leq
P^{\text{inst}}_{\text{leg}}$ (2m) $\displaystyle
z^{st}=1\Leftrightarrow\sum_{i\in[n]}x_{i}(P_{i}^{st}-C_{i}^{st})\geq 0$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T}$ (2n) $\displaystyle
x\in\left\\{0,1\right\\}^{n},z\in\left\\{0,1\right\\}^{|\mathcal{S}|\,|\mathcal{T}|}.$
(2o)

where $B_{i}^{st}$ is a bound on the maximum net production of actors, which
can be set to (1) $P_{\mathrm{abs},i}^{st}$ (absolute production of prosumer
$i$) or (2) $\max\left\\{P_{i}^{st}-C_{i}^{st},0\right\\}$ (direct production
of prosumer $i$) depending on whether individual self-consumption is forced
(2) or not (1).
$Q^{st}=\sum_{i\in[n]}\max\left\\{P_{i}^{st}-C_{i}^{st},0\right\\}$ and
$M^{st}=\max\left\\{\sum_{i\in[n]}P_{i}^{st},\sum_{i\in[n]}C_{i}^{st}\right\\}$
are big M constants used to ease the reading of the model.

###  3.3 Benders decomposition for larger time scales (SLExt)

We can notice that the model is structured in two parts, a choice of selected
actors that form a feasible loop, and auxiliary binary variables on one hand,
and a set of continuous flow decisions for each scenario and time step, which
has a block-separable structure along these two dimensions.

We can use a Benders decomposition of the problem, expressing the flow
optimality conditions as constraints on the $x$, $w$, and $z$ variables.
Benders decomposition exploits the separation of variables between the binding
variables which design the network and the continuous variables that are fully
block-separable (see Rahmaniani et al.,  (2017) for a recent literature review
of the Benders decomposition, applications and algorithms). We can note
$\phi_{st}:\\{0,1\\}^{n}\times\\{0,1\\}\mapsto\mathbb{R}$ the optimal value
function of the problem given fixed values of $x$ and $z^{st}$. Model (2) is
equivalent to:

$\displaystyle\min_{x,z,\eta}\,$
$\displaystyle\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}p_{s}\eta_{st}$ (3a)
$\displaystyle\mathrm{s.t.}\,$ $\displaystyle\eta_{st}\geq\phi_{st}(x,z^{st})$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T}$ (3b)
$\displaystyle\eqref{eq:sl-conflictgraphcons}-\eqref{eq:sl-compactbinvars}.$
(3c)

At an optimal solution, the variable $\eta_{st}$ will match the value of
$\phi_{st}(x,z)$. The value of $\phi$ corresponds to the optimisation problem
once the binary variables are fixed. This problem is entirely decomposed along
$(s,t)$, we, therefore, omit the two indices for clarity. The dual variable
associated with each constraint is labelled on the right:

$\displaystyle\phi(x,z)=\min_{e,f,r,y}\,$
$\displaystyle\sum_{i}F_{i}f_{i}-R_{i}r_{i}$ (4a)
$\displaystyle\mathrm{s.t.}\,$ $\displaystyle e_{ij}\leq x_{i}P_{i}$
$\displaystyle(\alpha_{ij}^{p})$ (4b) $\displaystyle e_{ij}\leq x_{j}C_{j}$
$\displaystyle(\alpha_{ij}^{c})$ (4c)
$\displaystyle\sum_{j}e_{ij}+r_{i}-\sum_{j}e_{ji}-f_{i}=P_{i}-C_{i}$
$\displaystyle(\pi_{i})$ (4d) $\displaystyle y_{i}\leq x_{i}Q$
$\displaystyle(\gamma_{i})$ (4e) $\displaystyle y_{i}-r_{i}\leq 0$
$\displaystyle(\theta_{i})$ (4f) $\displaystyle y_{i}-r_{i}\geq-(1-x_{i})Q$
$\displaystyle(\kappa_{i})$ (4g)
$\displaystyle\sum_{i}y_{i}\leq\sum_{i}x_{i}(P_{i}-C_{i})+M(1-z)$
$\displaystyle(\nu)$ (4h) $\displaystyle y_{i}\leq Mz$
$\displaystyle(\lambda_{i})$ (4i) $\displaystyle\sum_{j}e_{ij}+r_{i}\leq
B_{i}$ $\displaystyle(\tau_{i})$ (4j) $\displaystyle e,f,r,y\geq 0.$ (4k)

The dual of Model (4) is:

$\displaystyle\max_{\alpha,\pi,\gamma,\theta,\kappa,\nu,\lambda,\tau}\,$
$\displaystyle\sum_{i,j\in\mathcal{E}}(\alpha_{ij}^{p}x_{i}P_{i}+\alpha_{ij}^{c}x_{j}C_{j})+$
$\displaystyle\sum_{i}(-(1-x_{i})M\kappa_{i}+(P_{i}-C_{i})\pi_{i}+Mz\lambda_{i}+B_{i}\tau_{i}+$
$\displaystyle\gamma_{i}x_{i}Q)+$
$\displaystyle\nu(\sum_{i}x_{i}(P_{i}-C_{i})+(1-z)M)$ (5a)
$\displaystyle\mathrm{s.t.}\,\,$
$\displaystyle-\alpha_{ij}^{p}-\alpha_{ij}^{c}+\pi_{j}-\pi_{i}-\tau_{i}\geq 0$
$\displaystyle(e_{ij})$ (5b)
$\displaystyle\kappa_{i}+\gamma_{i}+\gamma_{i}+\theta_{i}+\lambda_{i}+\nu\leq
0$ $\displaystyle(y_{i})$ (5c)
$\displaystyle-\kappa_{i}+\pi_{i}-\theta_{i}+\tau_{i}\leq R_{i}$
$\displaystyle(r_{i})$ (5d) $\displaystyle-\pi_{i}\leq F_{i}$
$\displaystyle(f_{i})$ (5e)
$\displaystyle\alpha^{p},\alpha^{c},\gamma,\theta,\nu,\lambda,\tau\leq
0,\kappa\geq 0.$ (5f)

Our problem is always bounded, given that the energy traded with the grid is
bounded by the productions, and is always feasible, given that there always
exists a baseline solution in which all actors trade with the grid only. This
implies that $\phi_{st}(x,z)$ is finite for all $x$ and $z$ and that the
primal and dual problems attain the same optimal value by the strong duality
of linear problems.

The feasible region of Model (5) being independent of $x$ and $z$, we can
replace Constraint (3b) with:

$\displaystyle\eta_{st}\geq$ (B-CUT)
$\displaystyle\;\;\sum_{i,j\in\mathcal{E}}(\alpha_{ij}^{p}x_{i}P_{i}+\alpha_{ij}^{c}x_{j}C_{j})$
$\displaystyle\;\;+\sum_{i}-(1-x_{i})M\kappa_{i}+(P_{i}-C_{i})\pi_{i}+Mz\lambda_{i}+B_{i}\tau_{i}+\gamma_{i}x_{i}Q$
$\displaystyle\;\;+\nu(\sum_{i}x_{i}(P_{i}-C_{i})+(1-z)M)\,\,\,\forall(\alpha^{p},\alpha^{c},\pi,\gamma,\theta,\kappa,\nu,\lambda,\tau)\in\mathcal{V}$

where $\mathcal{V}$ is the set of vertices of the dual feasible set (5b)-(5f).
The cardinality of $\mathcal{V}$ grows exponentially with $n$, prohibiting the
addition of all inequalities in (B-CUT), and motivating their generation on
the fly to separate candidate solutions.

###  3.4 Introduction of multiple loops (MLCpct)

In this section, we extend the proposed model from a single loop in which
actors can be included or not to multiple loops defined on the fly. This
extension will be crucial to scale the proposed model in space, i.e. allowing
the loop operator to build and operate multiple loops defined dynamically
across a broad area and considering many actors simultaneously.

We define a compact representation of the model and propose an extended
formulation based on a Dantzig-Wolfe decomposition. We claim the extended
formulation can be solved directly and not through a branch-and-price
algorithm, with a number of variables remaining small enough as the number of
actors increases, and support that claim with the characteristics of
potentially optimal loops.

The number of non-trivial loops is bounded above by $n/2$, we will denote
$l\in\mathcal{L}$ the loop indices. The loop membership variables become:

$\displaystyle x_{i}^{l}=\begin{cases}1&\text{if actor $i$ is assigned loop
$l$}\\\ 0&\text{otherwise.}\end{cases}$

Aside of $x_{i}^{l}$ variables, some of the constraints defined in Section 3.2
evolve as soon as multiple loops are considered. The exclusion constraints
(Constraints (2b) and (2c)) should be rewritten as follows, to ensure that two
actors not being members of the same loop can’t exchange electricity:

$e_{ij}\leq\sum_{l\in\mathcal{L}}w_{ij}^{l}D_{i,j},\forall(i,j)\in\\{1,\ldots
n\\}^{2},i\neq j,$ (6)

where $D_{i,j}=min(P_{i},C_{j})$. To define this constraint (Constraint (7l)
in Model (7)), we introduced $w_{ij}^{l}$ which are binary variables
linearising $x_{i}^{l}x_{j}^{l}$, expressing the membership of both actors $i$
and $j$ to loop $k$ and constraining the flow through (6). These $w_{ij}^{l}$
variables are subject to:

$\displaystyle w_{ij}^{l}\leq x_{i}^{l},\forall(i,j)\in\\{1,\ldots
n\\}^{2},i\neq j,l\in\mathcal{L}$ (Constraint (7m) in Model (7))
$\displaystyle w_{ij}^{l}\leq x_{j}^{l},\forall(i,j)\in\\{1,\ldots
n\\}^{2},i\neq j,l\in\mathcal{L}$
$\displaystyle\text{(Constraint\leavevmode\nobreak\ \eqref{eq:wij2} in
Model\leavevmode\nobreak\ \eqref{model:multiloop-cpct})}.$

Legal restriction constraints (Constraints (7h) and (7i)), collective self-
consumption constraints (Constraints (7c) to (7g) and (7p)) and circulation
constraint (Constraint (7j)) remain unchanged, and are now indexed by the loop
$l$. Additionally, big M constraints are redefined to allow the $y_{i}^{l}$
variables to take any value when actor $i$ is included in loop $l$. These
changes result in Model (7) which presents symmetries similar to other
clustering problems, any permutation of the loop assignments being equivalent.
Constraint (7o) reduces the number of symmetric solutions by enforcing
solutions with several actors decreasing with the loop index. Constraint (7k)
is added to ensure that each actor cannot belong to two different loops.

$\displaystyle\min_{x,z,w,e,r,f,z,y}$
$\displaystyle\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}\sum_{i\in[n]}p_{s}\,(F_{i}^{st}f_{i}^{st}-R_{i}^{st}r_{i}^{st})$
(7a) s.t.
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}^{st}+r_{i}^{st}+C_{i}^{st}=\sum_{j\in\mathcal{N}_{i}}e_{ji}^{st}+f_{i}^{st}+P_{i}^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (7b)
$\displaystyle y_{li}^{st}\leq x_{i}^{l}Q^{st}$ $\displaystyle\forall
i\in[n],s\in\mathcal{S},t\in\mathcal{T},l\in\mathcal{L}$ (7c) $\displaystyle
y_{li}^{st}\leq r_{i}^{st}$ $\displaystyle\forall
i\in[n],s\in\mathcal{S},t\in\mathcal{T},l\in\mathcal{L}$ (7d) $\displaystyle
y_{li}^{st}\geq r_{i}^{st}-(1-x_{i}^{l})Q^{st}$ $\displaystyle\forall
i\in[n],s\in\mathcal{S},t\in\mathcal{T},l\in\mathcal{L}$ (7e)
$\displaystyle\sum_{i\in[n]}y_{li}^{st}\leq\sum_{i\in[n]}x_{i}^{l}(P_{i}^{st}-C_{i}^{st})+M^{st}(1-z_{l}^{st})$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T},l\in\mathcal{L}$ (7f)
$\displaystyle y_{li}^{st}\leq M^{st}z_{l}^{st}$ $\displaystyle\forall
i\in[n],\forall s\in\mathcal{S},t\in\mathcal{T},l\in\mathcal{L}$ (7g)
$\displaystyle\sum_{i\in[n]}x_{i}^{l}P^{\text{inst}}_{i}\leq
P_{\text{leg}}^{\text{inst}}$ $\displaystyle\forall l\in\mathcal{L}$ (7h)
$\displaystyle x_{i}^{l}+x_{j}^{l}\leq 1$
$\displaystyle\forall(i,j)\notin\mathcal{E},l\in\mathcal{L}$ (7i)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}^{st}+r_{i}^{st}\leq B_{i}^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (7j)
$\displaystyle\sum_{l\in\mathcal{L}}x_{i}^{l}\leq 1$ $\displaystyle\forall
i\in[n]$ (7k) $\displaystyle
e_{ij}^{st}\leq\sum_{l\in\mathcal{L}}w_{ij}^{l}D_{ij}^{st}$
$\displaystyle\forall(i,j)\in\mathcal{E},s\in\mathcal{S},t\in\mathcal{T}$ (7l)
$\displaystyle w_{ij}^{l}\leq x_{i}^{l}$
$\displaystyle\forall(i,j)\in\mathcal{E},\forall l\in\mathcal{L}$ (7m)
$\displaystyle w_{ij}^{l}\leq x_{j}^{l}$
$\displaystyle\forall(i,j)\in\mathcal{E},\forall l\in\mathcal{L}$ (7n)
$\displaystyle\sum_{i\in[n]}x_{i}^{l}\geq\sum_{i\in[n]}x_{i}^{l+1}$
$\displaystyle\forall l\in 1\dots|\mathcal{L}|-1$ (7o) $\displaystyle
z^{st}_{l}=1\Leftrightarrow\sum_{i\in[n]}x_{i}^{l}(P_{i}^{st}-C_{i}^{st})\geq
0$ $\displaystyle\forall l\in\mathcal{L},s\in\mathcal{S},t\in\mathcal{T}$ (7p)
$\displaystyle
x\in\left\\{0,1\right\\}^{n|\mathcal{L}|},z\in\left\\{0,1\right\\}^{|\mathcal{L}\times\mathcal{S}\times\mathcal{T}|},w\in\left\\{0,1\right\\}^{|\mathcal{E}\times\mathcal{L}|}$
(7q) $\displaystyle e,r,f,y\geq 0.$ (7r)

###  3.5 Dantzig-Wolfe decomposition (MLCol)

The previous formulation is amenable to a Dantzig-Wolfe decomposition
exploiting the structure of solutions to the knapsack Constraint (7h) under a
loop maximality assumption.

######  Assumption 3.6 (Loop maximality).

An optimal solution exists such that all created loops are maximal, in the
sense that for any actor $i$ not included in any loop, it could not be added
to any of them without removing another actor from the loop.

######  Proposition 3.1.

Assumption 3.6 holds for Model (7).

###### Proof.

Given a non-maximal solution, let us assume there exists an actor that could
be included in a loop without removing another one. We can construct a
solution in which this actor does not receive any net consumed power from the
grid and sells any net produced power to the grid, thus not modifying the
objective. ∎

Proposition 3.1 holds because of the feasibility of a trivial solution where
an actor could be included in a loop without contributing to internal flows.
In practice, such an actor could be removed from the loop in a post-processing
step without degrading the objective. This leads us to observe that an optimal
solution can always be constructed by selecting a subset of maximal loops
which do not overlap on any actor.

The number of potential loops could grow exponentially with the number of
actors, and would therefore require a column generation approach to build new
loops. We will rely on a spatial sparsity assumption, together with the
optimality of maximal loops to motivate an extended formulation that eagerly
generates all extended columns before branching.

Finding maximal loops corresponds to finding cliques in the graph of all
actors with an edge between $i$ and $j$ if $d_{ij}\leq d_{max}$. These cliques
are not maximal since they also need to satisfy the installed capacity
constraint.

Furthermore, each selected clique needs to contain at least one producer and
one consumer to generate some inner flows, further reducing the number of
potential clique candidates. Since there will typically be few producers
compared to the number of consumers, we can construct cliques around each of
the producers only. The procedure we propose is:

  1. 1.

Generate all maximal cliques in the graph, starting to build them from net
producers only,

  2. 2.

If a clique respects the installed capacity, it can be used directly,

  3. 3.

Otherwise, enumerate all maximal vertices of the 0-1 knapsack polytope
selecting the producers of the clique, subject to the capacity constraint.
Each vertex results in a combination of producers, and all consumers of the
clique can be added to the loop.

We can adapt the clique generation algorithm to dynamically forbid adding
nodes that would exceed the capacity, or generate all maximal loops from every
clique by excluding actors until the capacity constraint is respected.

The extended model is described by a set $\mathcal{H}$ of maximal loops and
binary variables $v_{h}$ capturing whether a loop is taken, with parameters
$a_{hi}$:

$\displaystyle a_{hi}=\begin{cases}1&\text{if loop $h$ contains actor $i$}\\\
0&\text{otherwise.}\end{cases}$

Furthermore, additional business-related constraints can directly be included
in the loop, including, for instance, the fact that two coupled actors
$(i,j)\in\mathcal{D}$ are both present or both absent from a loop:

$\displaystyle
a_{i}^{h}=a_{j}^{h}\,\,\forall(i,j)\in\mathcal{D},h\in\mathcal{H}.$

The extended formulation of Model (7) is essentially captured by the new
constraints:

$\displaystyle\sum_{h\in\mathcal{H}}a_{hi}v_{h}\leq 1$ $\displaystyle\forall
i\in[n]$ (8a) $\displaystyle e_{ij}^{st}\leq
D_{ij}^{st}\sum_{h\in\mathcal{H}}v_{h}a_{hi}a_{hj}$
$\displaystyle\forall(i,j)\in\mathcal{E},s\in\mathcal{S},t\in\mathcal{T}$ (8b)
$\displaystyle e_{ij}^{st}\leq D_{ij}^{st}\sum_{h\in\mathcal{H}}v_{h}a_{hi}$
$\displaystyle\forall(i,j)\in\mathcal{D},s\in\mathcal{S},t\in\mathcal{T}.$
(8c)

Constraint (8a) of the extended model corresponds to Constraint (7l) in the
compact one. Constraint (8b) replaces the $w$ variables and associated
auxiliary constraints of the compact model.

We define the index set $\mathcal{G}_{h}\subseteq\mathcal{S}\times\mathcal{T}$
as the set of tuples $(s,t)$ such that the loop $h$ is a net producer at
scenario $s$ and time $t$. This fixed index set replaces the variable
$z^{st}_{l}$ of the compact model. $D_{ij}$ is defined as $\min(P_{i},C_{j})$,
resulting in the following model:

$\displaystyle\min_{e,r,f,v}$
$\displaystyle\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}\sum_{i\in[n]}p_{s}\,(F_{i}^{st}f_{i}^{st}-R_{i}^{st}r_{i}^{st})$
(9a) s.t. $\displaystyle e_{ij}^{st}\leq
D_{ij}^{st}\sum_{h\in\mathcal{H}}v_{h}a_{i}^{h}a_{j}^{h}$
$\displaystyle\forall i,j\in\mathcal{E},s\in\mathcal{S},t\in\mathcal{T}$ (9b)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}^{st}+r_{i}^{st}+C_{i}^{st}=\sum_{j\in\mathcal{N}_{i}}e_{ji}^{st}+f_{i}^{st}+P_{i}^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (9c)
$\displaystyle
r_{i}^{st}\leq(1-\sum_{h\notin\mathcal{G}_{st}}v_{h}a_{i}^{h})Q^{st}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (9d)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}+r_{i}\leq P_{i}$
$\displaystyle\forall i\in[n],s\in\mathcal{S},t\in\mathcal{T}$ (9e)
$\displaystyle\sum_{i\in[n]}r_{i}^{st}a_{i}^{h}\leq\sum_{i\in[n]}a_{i}^{h}v_{h}(P_{i}^{st}-C_{i}^{st})+Q^{st}(1-v_{h})$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T},h\in\mathcal{G}_{st}$
(9f) $\displaystyle\sum_{h\in\mathcal{H}}a_{i}^{h}v_{h}\leq 1$
$\displaystyle\forall i\in[n]$ (9g) $\displaystyle
v\in\left\\{0,1\right\\}^{|\mathcal{H}|}$ (9h) $\displaystyle e,r,f,y\geq 0.$
(9i)

###  3.6 Benders decomposition of MLCol model (MLColExt)

Similarly to the decomposition operated on the single-loop model in Section
3.3, the extended version of the problem can be split into two subproblems,
that can be efficiently solved using Benders’ algorithm. As previously, the
main problem solves the design aspect of the network, by setting the loops
that should be selected for the collective self-consumption operation. One can
keep the notation $\phi_{st}:\\{0,1\\}^{n}\times\\{0,1\\}\mapsto\mathbb{R}$
the optimal value function of the problem given fixed values of $v,\eta_{st}$
to define this main model:

$\displaystyle\min_{v,\eta}\,$
$\displaystyle\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}p_{s}\eta_{st}$
(10a) $\displaystyle\mathrm{s.t.}\,$ $\displaystyle\eta_{st}\geq\phi_{st}(v)$
$\displaystyle\forall s\in\mathcal{S},t\in\mathcal{T}$ (10b)
$\displaystyle\sum_{h\in\mathcal{H}}a_{i}^{h}v_{h}\leq 1$
$\displaystyle\forall i\in[n]$ (10c) $\displaystyle
v\in\\{0,1\\}^{|\mathcal{H}|}.$ (10d)

The second problem, using solutions of the main problem as parameters, is then
a continuous problem whose resolution should be possible in a reasonable
amount of time as no binary variables are involved. We drop the indices $s$
and $t$ from the subproblem below, as it is fully separable along
$\mathcal{S}$ and $\mathcal{T}$. The dual variable associated with each
constraint is labelled on the right.

$\displaystyle\min_{e,r,f}$
$\displaystyle\sum_{i\in[n]}\,(F_{i}f_{i}-R_{i}r_{i})$ (11a) s.t.
$\displaystyle e_{ij}\leq D_{ij}\sum_{h\in\mathcal{H}}v_{h}a_{i}^{h}a_{j}^{h}$
$\displaystyle(\alpha_{ij})$ (11b)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}+r_{i}-f_{i}-\sum_{j\in\mathcal{N}_{i}}e_{ji}=P_{i}-C_{i}$
$\displaystyle(\pi_{i})$ (11c) $\displaystyle
r_{i}\leq(1-\sum_{h\notin\mathcal{G}}v_{h}a_{i}^{h})Q$
$\displaystyle(\gamma_{i})$ (11d)
$\displaystyle\sum_{i\in[n]}r_{i}a_{i}^{h}\leq\sum_{i\in[n]}a_{i}^{h}v_{h}(P_{i}-C_{i})+Q(1-v_{h})$
$\displaystyle\forall h\in\mathcal{G}\;\;$ $\displaystyle(\nu_{h})$ (11e)
$\displaystyle\sum_{j\in\mathcal{N}_{i}}e_{ij}+r_{i}\leq P_{i}$
$\displaystyle(\tau_{i})$ (11f) $\displaystyle e,r,f\geq 0.$ (11g)

####  3.6.1 Dual and cuts

Dualisation of Problem (11) gives the following model, whose objective value
provides cuts that can be applied to the main model to refine the chosen
design of collective self-consumption loops:

$\displaystyle\max_{\alpha,\pi,\gamma,\kappa,\nu,\tau}\,$
$\displaystyle\;\;\sum_{i,j\in\mathcal{E}}\alpha_{ij}D_{ij}\sum_{h\in\mathcal{H}}v_{h}a_{i}^{h}a_{j}^{h}+$
$\displaystyle\;\;+\sum_{i\in[n]}\big{(}(P_{i}-C_{i})\pi_{i}+P_{i}\tau_{i}+\gamma_{i}(1-\sum_{h\notin\mathcal{G}}a_{i}^{h}v_{h})Q\big{)}$
$\displaystyle\;\;+\sum_{h\in\mathcal{G}}\nu_{h}\Big{(}\sum_{i\in[n]}\big{(}a_{i}^{h}v_{h}(P_{i}-C_{i})\big{)}+Q(1-v_{h})\Big{)}$
$\displaystyle\mathrm{s.t.}\,\,$
$\displaystyle\alpha_{ij}+\pi_{i}+\tau_{i}\leq 0$ $\displaystyle(e_{ij})$
$\displaystyle\pi_{i}+\gamma_{i}+\tau_{i}+\sum_{h\in\mathcal{G}}a_{i}^{h}\nu_{h}\leq-
R_{i}$ $\displaystyle(r_{i})$ $\displaystyle-\pi_{i}\leq F_{i}$
$\displaystyle(f_{i})$ $\displaystyle\alpha,\gamma,\nu,\tau\leq 0,\kappa\geq
0.$

These dual-induced cuts can be expressed as follows:

$\displaystyle\eta_{st}\geq$ (EXT-B-CUT)
$\displaystyle\;\;\sum_{i,j\in\mathcal{E}}\alpha_{ij}D_{ij}\sum_{h\in\mathcal{H}}v_{h}a_{i}^{h}a_{j}^{h}+$
$\displaystyle\;\;+\sum_{i\in[n]}\big{(}(P_{i}-C_{i})\pi_{i}+P_{i}\tau_{i}+\gamma_{i}(1-\sum_{h\notin\mathcal{G}}a_{i}^{h}v_{h})Q\big{)}$
$\displaystyle\;\;+\sum_{h\in\mathcal{G}}\nu_{h}\Big{(}\sum_{i\in[n]}\big{(}a_{i}^{h}v_{h}(P_{i}-C_{i})\big{)}+Q(1-v_{h})\Big{)}\,\,\,\forall(\alpha,\pi,\gamma,\kappa,\nu,\lambda,\tau)\in\mathcal{V}_{st}.$

##  4 Application of the models

This section details the data and assumptions used to set up realistic
instances and their corresponding consumption and production profiles. The
method to generate these instances is designed to mimic real-case scenarios.
These instances are then reused in a business-oriented test protocol, which is
described in Section 4.2.

###  4.1 Generation of realistic instances

To apply the proposed model to realistic instances, localization, costs,
production, and consumption data have been generated. Each actor is then
represented as a prosumer, capable of both producing and consuming
electricity.

####  4.1.1 Consumption load

Consumption profiles are estimated from reference datasets extracted from the
Enedis222Enedis is a state-owned limited company managing and developing the
electricity distribution network in France. Open Data platform (ENEDIS, ,
2023). Consumption loads are described with a 30-minute time step over a year
(2022 is taken as the reference).

To generate a group of consumers, we divided this group into two consumption
sub-groups, namely ”Household” and ”Pro: Professional.” These categories echo
the separation made by the Enedis Open Data platform, which provides an
average profile of each category. The distribution of consumers in each
category is manually determined based on the scenario chosen for simulation
(see Section 4.2). All consumers in each category are then provided with a
consumption profile that is normally distributed around the Enedis reference
profile load corresponding to that category.

####  4.1.2 Installations characteristics and production volume computing

Determining the actual production of an installation is complex as it depends
on several parameters, some of which are meteorological. To calculate
discretised production, irradiance data is computed based on solar position,
installed power of the installation, inclination, and orientation.

Two exposition configurations are considered:

  * 1.

Worst exposition (WC): Tilt angle fixed to 60° and panels facing North (0°
azimuth)

  * 2.

Best exposition (BC): Tilt angle fixed to 30° and panels facing South (180°
azimuth)

To avoid longer computation runtimes, solar position information is computed
on 10 km² surface tiles and reused identically for each installation
associated with this tile. This assumes that solar position variation along
such a surface has a low impact on the installation production. Based on the
installed power assigned to each producer, the production is generated for
each time step using PVGIS-computed irradiance data.

####  4.1.3 Electricity pricing

The objective function defined in every proposed problem is subject to
electricity pricing conditions. Table 3 and Table 4 report official buying
costs (MTE, , 2023) and French Energy Regulatory Commission selling prices
(CRE, , 2024) of the electricity for actors engaged in a self-consumption
operation.

Table 3: Electricity selling prices considering self-consumption installed
power (CRE, , 2024)

Installed power (kWc) $\leq$ 3kWc $\leq$ 3-9kWc 9-36kWc $\geq$ 36kWc $\geq$
100kWc  Selling price (c€/kWh) 13.39 13.39 14.58 12.68 13.12

Table 4: Electricity buying cost considering the client consumption
subscription profile (MTE, , 2023)

Category $\leq$ 36 kVA $\geq$ 36kVA  Household Pro Pro  Period All year Winter
Summer  Peak hours cost (c€/kWh) 20.4 19.84 27.26 13.63  Off-peak hours cost
(c€/kWh) 15.13 16.07 15.16 7.58

####  4.1.4 Geographical distribution

One of the characteristics of the proposed model is its geographical
dimension. To construct representative use cases, two types of geographical
distributions have been defined:

  * 1.

Uniform distribution: In this distribution, each installation is located
uniformly, maintaining a global density of actors. This random distribution is
achieved by utilizing a combination of uniform distributions along latitudes
and longitudes.

  * 2.

Clustered distribution: This distribution is used to allocate groups of
installations, imitating how industrial installations are distributed in semi-
rural territories. In our case, clusters are formed having between 4 and 6
actors each.

In the following generated instances, these distributions are consistently
utilized to sample a group of actors with a global density parameter. Multiple
distinct densities are employed to assess the impact of this parameter on
discovered solutions.

###  4.2 Test protocol

The following test protocol has been established to validate the growing
complexity of the defined optimisation problem. Two parameters are initially
observed, namely, time horizon and the number of actors as they influence the
initial number of variables defined in the problem. Other parameters of the
initial configuration (named reference) are detailed in Table 5, which also
describes other instances that are used to compare optimisation results for
different configurations.

Table 5: List of instances and their characteristics

Scenario Orientation Tilt Density Installed power limit  Reference 180 (South)
30∘ 0.5 pros/km2 3 MWc  Dens_0_1 180 (South) 30∘ 0.1 pros/km2 3 MWc  Dens_2
180 (South) 30∘ 2 pros/km2 3 MWc  Period_Sum 180 (South) 30∘ 0.5 pros/km2 3
MWc  Power_1000 180 (South) 30∘ 0.5 pros/km2 1 MWc  Power_2000 180 (South) 30∘
0.5 pros/km2 2 MWc  Power_5000 180 (South) 30∘ 0.5 pros/km2 5 MWc  Config_WC 0
(North) 60∘ 0.5 pros/km2 3 MWc

Based on Enedis consumption profiles, three prosumer profiles are defined,
namely Household, Pro1 and Pro2 whose characteristics are described in Table
6. From these profiles, a scenario has been defined, representing a
distribution of the consumption profiles among generated actors (rate column).
The objective of the defined scenario is to represent both the small producers
that can be either dwellings (Household profile) or professional actors (Pro1
profile) and larger producers that are essentially professional actors (Pro2
profiles).

Table 6: Description of the prosumer profiles used in the base configuration

Profile Reference consumption profile Installed power range Rate  Household
Household (P $\leq$ 36kVA) 0kW $\leq$ P $\leq$ 3kW 40%  Pro1 Pro (C $\leq$
36kVA) 3kW $\leq$ P $\leq$ 6kW 40%  Pro2 Pro (C $\leq$ 36kVA) 1MW $\leq$ P
$\leq$ 3MW 20%

###  4.3 Evaluation metrics

Each model presented in Section 3 is applied to generated instances. Aside
from objective value and solving time, results are analysed through several
evaluation metrics defined below.

####  4.3.1 Collective self-consumption and self-production rates

Self-consumption rate is defined as the ratio between the energy that is
consumed within the collective self-consumption loop and the total amount of
produced electricity within the loop. Self-production rate is defined as the
ratio between the energy that is consumed within the collective self-
consumption loop and the total amount of consumed electricity within the loop.

####  4.3.2 Number of proposed loops

The number of proposed loops indicates the number of collective self-
consumption loops that have been formed and is computed using the decision
variables’ obtained values:

$\displaystyle N_{l}=\sum_{h\in\mathcal{H}}v_{h}$ for extended models (12a)
$\displaystyle N_{l}=\sum_{l\in\mathcal{L}}\delta_{l}$ $\displaystyle\text{for
compact models},$ (12b)

where $\delta_{l}$ is defined as follows:

$\displaystyle\delta_{l}=\begin{cases}1&\text{if $\sum_{i\in[n]}x_{i}^{l}>0$
(at least one prosumer selected in the loop)}\\\
0&\text{otherwise.}\end{cases}$

For clarity in the definition of later indicators, we only consider the case
of the extended multiloop (MLColExt) model only. Nevertheless, the same
indicators can also be built for compact multiloop models, indexing
$x_{i}^{l}$ with $l\in\mathcal{L}$ and $i\in[n]$ instead of $v_{h}a_{i}^{h}$
($h\in\mathcal{H}$).

####  4.3.3 Fairness indicators

Two indicators representing the disparity of the benefit distribution are
defined. The highest benefit indicator (13a) underlines the highest benefit
realised among all actors reaching a collective self-consumption community.
This benefit is computed relative to a situation where no loop has been
defined (zero loop configuration). Conversely, the lowest benefit indicator
(13b) underlines the lowest benefit realised among all actors proposed to
reach a collective self-consumption loop.

Highest benefit:
$\displaystyle\overline{b}=\max_{i\in[n]}(\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}p_{s}\,(F_{i}^{st}(f_{i}^{st}-C_{i}^{st})-R_{i}^{st}(r_{i}^{st}-P_{i}^{st})))$
(13a) Lowest benefit:
$\displaystyle\underline{b}=\min_{i\in[n]}(\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}p_{s}\,(F_{i}^{st}(f_{i}^{st}-C_{i}^{st})-R_{i}^{st}(r_{i}^{st}-P_{i}^{st}))).$
(13b)

####  4.3.4 Average number of members and installed power per loop

$N_{\text{mean}}=\frac{1}{N_{l}}\sum_{h\in\mathcal{H}}\sum_{i\in[n]}v_{h}a_{i}^{h}.\\\
$ (14)

The average number of loops (14) can be put into perspective with the number
of actors that are not participating in any loop, telling how created loops
include actors. Another indicator underlines how complete loops are in terms
of installed power. This indicator should always be analysed in relation to
the legal installed power limit set initially to solve the problem (15):

$P_{\text{mean}}=\frac{1}{N_{l}}\sum_{h\in\mathcal{H}}\sum_{i\in[n]}v_{h}a_{i}^{h}P_{i}^{\text{inst}}.$
(15)

####  4.3.5 Total benefit realised through self-consumption

This indicator is obtained through the calculation of realised benefits by
each prosumer who is involved in a self-consumption loop relative to a zero
loop configuration (16)

$\sum_{h\in\mathcal{H}}\sum_{i\in[n]}\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}p_{s}v_{h}a_{i}^{h}\,(F_{i}^{st}(f_{i}^{st}-C_{i}^{st})-R_{i}^{st}(r_{i}^{st}-P_{i}^{st})).$
(16)

##  5 Results and discussion

###  5.1 Scalability on the temporal dimension

(a) Along time horizon (15 prosumers)

(b) Along number of prosumers (7 days)

Figure 3: Evolution of resolution running time of compact and decomposed
models

As explained in the model presentation, extending the time horizon
significantly increases the complexity of the problem, particularly because
each time step can influence whether or not an actor should be included in a
collective self-consumption operation. Whether an actor belongs to or is
excluded from a self-consumption operation is determined for the entire
optimisation time horizon and cannot be changed from one time step to another.
The existence of associated integer variables links each time step in the
optimisation problem, and in the case of the compact formulation, requires all
time steps to be solved within the same problem. The Benders extended
reformulation allows for the extraction of integer variables and fixing them
in the master problem, thereby enabling each time step of the sub-problem to
be easily solvable independently. The increase in complexity over time horizon
is the reason why a Benders decomposition of the model has been proposed.
Figure 3(a) illustrates the evolution of the resolution time of the single-
loop models for different time horizons, comparing the compact formulation
with the extended formulation.

To assess variability, each scenario is represented with a set of 100
generated instances. This sampling covers variability in geographic
distribution, prosumers’ installed power, and consumption profiles. The
compared computing time only considers the solving computing time and does not
account for the time allocated to defining the problems (compact model, master
problem, and sub-problems) or the time allocated to adding Benders cuts
between the resolution of the master problem and sub-problems. When focusing
on the standard deviation of each scenario, we observe significant variations
in resolution time depending on consumption/production data and geographical
distribution. However, for equivalent resolution time, the variability is
fairly similar for extended and compact formulations.

It can be observed that a short time horizon is effectively handled by both
compact and extended formulations. In many cases, the compact formulation
performs even better than the extended formulation, as the single problem
remains simple enough to be solved in less time than two separate problems.
However, for larger time scales, the decomposed versions demonstrate better
resolution times. This difference becomes more pronounced with larger time
horizons, highlighting the benefits of using decomposed models. Figure 3(a)
illustrates resolution times on relatively small instances (10 actors). Tests
have also been conducted on larger instances, showing a similar increase in
resolution time for the compact model, while the extended model maintains
reasonable resolution times. These observations highlight the advantages of
using a decomposed formulation for larger time horizons.

The number of actors is a parameter that should influence the design aspect of
the problem. The proposed clique generation algorithm has been applied to
several instances with different numbers of prosumers. To keep the number of
generated cliques reasonable, the selected instances feature only clustered
spatial distributions of actors. This clustered distribution is generated by
randomly sampling $p$ clusters across a square area, ensuring that the overall
actor density is maintained. Clusters are generated to contain between 4 to 6
actors each, and the number of clusters is determined accordingly.

Figure 3(b) compares the computing time of the compact multi-loop model
(MLCpct) with the reformulation that integrates clique generation (MLCol).
Similar to the evaluation of scalability in the temporal dimension, the
computing time associated with the problem creation and addition of cuts are
not considered in the comparison. The observations made previously regarding
the time horizon dimension can equivalently be applied here for the number of
actors. For a low number of actors, compact and reformulated models show
similar performances. However, as the number of actors increases, the model
involving prior clique generation outperforms the compact model. Tests
conducted on larger instances (more than 30 actors) demonstrated that the
compact formulation is unable to find an optimal solution in less than an
hour, whereas clique generation drastically reduces the complexity of the
problem and solving time.

Note that the method we propose through clique generation works well on
realistic instances, specifically because their corresponding neighbourhood
graph follows the sparsity assumption. We stress-tested the proposed
formulation on complete graphs, observing a steep increase in memory
requirements making the models intractable.

###  5.2 Solution sensitivity analysis

In addition to runtime performance, another important focus is on the optimal
solutions derived from the multi-loop model from a business perspective. This
entails evaluating the solutions in terms of their cost-effectiveness and
assessing the influence of business-related parameters on proposed solutions.

####  5.2.1 Influence of legal maximum installed power $P_{\mathrm{leg}}$

One criterion that constrains the formation of collective self-consumption
loops is the legal maximum authorised installed power per loop. Sensitivity to
this parameter can be important to the operator defining the loops, since this
legal requirement may change with legislation.

(a) Installed power of the loops

(b) Size of the loops

(c) Global gain of the loops

(d) Number of actors not in a loop

Figure 4: Influence of the legal power on businesses indicators

Figure 4(a) and 4(c) respectively illustrate the impact of this parameter on
the average size of the corresponding loops (in terms of installed power) and
the benefit of the formed collective self-consumption loops.

Unsurprisingly, the average installed power of created loops grows with the
value of $P_{\mathrm{leg}}$, allowing the loops to reach larger installed
power, which results in the model attempting to maximise the size of the
loops. However, Figure 4(b) shows that the number of actors per loop is not
significantly affected by the different $P_{\mathrm{leg}}$ configurations.
This can be explained by the fact that accepting a new large producer in the
loop may result in the removal of another actor, based on distance criteria
for example.

Instances having an average installed power per loop that remains low even
though not restricted by $P_{\mathrm{leg}}$ can be explained by cases where
all the large producer groups are concentrated in a single cluster. This
results in a loop with one or two big producers, while other loops only
contain actors with low installed power. This clustering effect can lead to
instances where the distribution of actors across loops is uneven, causing
some loops to have significantly higher installed power than others. One also
observes the creation of loops with very small installed power when
$P_{\mathrm{leg}}$ is set to 1 MWc. This is primarily caused by the gap in
installed power between 9 kWc and 1 MWc in the instances used. In this
configuration, no created loop can contain any of the professional producers,
resulting in loops only containing small producers and consequently having low
installed power.

These observations, made on relatively small instances (15 actors),
demonstrate how an optimisation tool based on the proposed model can be used
to evaluate the viability of different types of production plants. By
examining the impact of parameters such as the legal maximum authorised
installed power ($P_{\mathrm{leg}}$), decision-makers can gain insights into
the optimal configuration.

(a) Installed power of the loops

(b) Size of the loops

(c) Global gain of the loops

(d) Self-consumption rate

Figure 5: Influence of distribution density on businesses indicators

####  5.2.2 Influence of actor density

Increasing actors’ density favours the formation of larger collective self-
consumption communities. Figure 5(a) illustrates a slight increase in the
installed power of loops as clusters are brought closer together. This
reflects the fact that separated clusters have a greater chance of being at a
reasonable distance in denser configurations. This observation is confirmed by
analyzing the average number of actors per loop in Figure 5(b). Since larger
loops ensure a greater amount of locally produced electricity, the overall
gain realised is also directly affected by an increase in density, as shown in
Figure 5(c).

However, this increase in gain can be nuanced when considering the self-
consumption rate. The increase in self-consumption rate is not as pronounced
as for other indicators. This is because the self-consumption rate is
influenced not only by the amount of locally produced electricity but also by
the ability to consume this electricity. From Figure 5(d), we can assume that
most configurations, even though they allow for larger loops as density
increases from $\text{0.5 act/km}^{2}$ to $\text{2 act/km}^{2}$, do not
necessarily provide the corresponding consumption profiles to increase the
self-consumption rate. However, this indicator could potentially be improved
through the inclusion of more net consumers, which would raise the consumption
potential.

In real-world applications, the density of actor distribution is not an
actionable parameter but rather a result of the choice of considered
candidates for self-consumption communities. Increasing the number of
candidates should therefore be advantageous for economically profitable self-
consumption communities, without necessarily guaranteeing an increase in
collective self-consumption rates.

###  5.3 Influence of exposition and period of the year

(a) Self-production rate

(b) Self-consumption rate

(c) Global gain of the loops

Figure 6: Influence of exposition on businesses indicators

Solar panel exposure directly impacts production volumes as it influences the
production yield of plants. Even though the best configurations logically
favour better economic gain (see Figure 6(c)), dealing with different
expositions may result in changes in business indicators. In the worst
exposition case, the total production amount is lower than consumption needs,
whereas it is higher with the best exposition configuration. This results in
an inversion in terms of self-production rate and self-consumption rate, as
Figure 6(a) and 6(b) demonstrate.

This highlights the fact that the self-consumption indicator is not always in
line with the economic objective, which is computed relative to the production
volumes. Guiding the optimisation through the economic objective is therefore
a way to balance this effect, taking into account both self-consumption and
self-production indicators. By optimising based on economic objectives and
under the assumption that surplus selling prices are lower than electricity
costs, decision-makers can ensure that decisions align with both financial
goals and sustainability targets.

(a) Self-production rate

(b) Self-consumption rate

(c) Global gain of the loops

Figure 7: Influence of the period of the year on business indicators

The previously mentioned inversion is not observed when the changes in
production come from considering two different periods of the year (see Figure
7(a) and 7(b)). This can be explained by the fact that the period of the year
has less impact on production than the panel exposition. When production can
be divided by 10 due to poor exposition, the ratio between summer and winter
is less than 2. In the presented instances, this means that in both summer and
winter periods, production volume exceeds consumption volume. Still,
considering the summer period seems to be more in favour of self-production
than self-consumption.

Realised gain is also more subject to variation during the summer period (see
Figure 7(c)), as the producers with the largest installed power and their
geographic placement have a greater influence during the summer than during
winter. This makes the positioning and capacity of larger producers more
critical for maximizing overall gain when considering summer production peaks.

##  6 Conclusion and future work

In this article, we presented various mixed-integer linear programming models
to optimise the design of collective self-consumption communities. We first
proposed models for the optimisation of the design addressing one (SLCpct) or
multiple (MLCpct) loop problems. The interest of the presented models lies in
their ability to address both the production flow distribution problem and the
design aspect in a single model, as the design aspect of the model is rarely
tackled in related work. To manage the complexity arising from this coupling,
we proposed decomposition methods, demonstrating their effectiveness through
tests on different types of instances.To cope with spatially growing multiple
communities problems (inducing a higher number of prosumers) we proposed a
Dantzig-Wolfe decomposed model (MLCol) and a dedicated algorithm for the
enumeration of feasible loops leveraging the spatial sparsity of actors,
avoiding the use of a branch-and-price algorithm. To make the models
actionable on large time horizons - which is needed in the design task - we
proposed a Benders decomposition of SLCpct and MLCol models leading to models
that keep reasonable solving time on large time horizons (SLExt and MLColExt).

Perspective for future work include an enhanced version of the Benders
algorithm to select specific cuts and speed up the solving process, and to
determine a fair distribution of loop benefits after the design to provide
decision-makers with a pricing policy. A third identified perspective is the
addition of storage facilities in the models.

Overall, the article, powered by presented contributions, provides
comprehensive insights into the optimisation of collective self-consumption
communities, considering both technical and business aspects. We conducted a
performance-oriented analysis on instances of various sizes and also performed
a sensitivity analysis on business-related parameters, showing how these
models can support decision-making and help understand solar plant
installation contexts’ influence on self-consumption loop design.

##  7 Acknowledgment

We would like to thank Amarenco for providing us with their self-consumption
business model and fine-grained data which offered a basis for this work and a
motivating use case.

##  8 Funding

This work was supported by the French Ministry of Economy, Finance and
Industrial and Digital Sovereignty through a France Relance project.

## References

  * Al-Sorour et al., (2022) Al-Sorour, A., Fazeli, M., Monfared, M., Fahmy, A., Searle, J. R., and Lewis, R. P. (2022).  Enhancing PV Self-consumption within an Energy Community using MILP-based P2P Trading.  IEEE Access, pages 1–1.
  * Albadi and El-Saadany, (2008) Albadi, M. H. and El-Saadany, E. F. (2008).  A summary of demand response in electricity markets.  Electric Power Systems Research, 78(11):1989–1996.
  * Bahret and Eltrop, (2021) Bahret, C. and Eltrop, L. (2021).  Cost‐optimized heat and power supply for residential buildings: The cost‐reducing effect of forming smart energy neighborhoods.  Energies, 14(16).
  * Bio Gassi and Baysal, (2022) Bio Gassi, K. and Baysal, M. (2022).  Analysis of a linear programming-based decision-making model for microgrid energy management systems with renewable sources.  International Journal of Energy Research, 46(6):7495–7518.  _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/er.7656.
  * Bokkisam et al., (2022) Bokkisam, H. R., Singh, S., Acharya, R. M., and Selvan, M. (2022).  Blockchain-based peer-to-peer transactive energy system for community microgrid with demand response management.  CSEE Journal of Power and Energy Systems, 8(1):198 – 211.
  * Brusco et al., (2023) Brusco, G., Menniti, D., Pinnarelli, A., and Sorrentino, N. (2023).  Renewable Energy Community with distributed storage optimization to provide energy sharing and additional ancillary services.  Sustainable Energy, Grids and Networks, 36:101173.
  * Böhringer et al., (2023) Böhringer, M., Kharrat, A., and Hanson, J. (2023).  Benefits of Monthly Storage Rates in Shared Storage for Energetic Communities.  Electronics (Switzerland), 12(10).
  * Clark et al., (1990) Clark, B. N., Colbourn, C. J., and Johnson, D. S. (1990).  Unit disk graphs.  Discrete mathematics, 86(1-3):165–177.
  * Conejo and Sioshansi, (2018) Conejo, A. J. and Sioshansi, R. (2018).  Rethinking restructured electricity market design: Lessons learned and future needs.  International Journal of Electrical Power & Energy Systems, 98:520–530.
  * CRE, (2024) CRE (2024).  Arrêtés tarifaires photovoltaïques en métropole.
  * ENEDIS, (2023) ENEDIS (2023).  Enedis open data platform : Consumption aggregates at half hour time step.  Accessed April 2023.
  * Espadinha et al., (2023) Espadinha, J., Baptista, P., and Neves, D. (2023).  Assessing P2P energy markets contribution for 2050 decarbonization goals.  Sustainable Cities and Society, 92.
  * Gil Mena et al., (2023) Gil Mena, A. J., Nasimba Medina, V. F., Bouakkaz, A., and Haddad, S. (2023).  Analysis and optimisation of collective self-consumption in residential buildings in Spain.  Energy and Buildings, 283.
  * Goitia-Zabaleta et al., (2023) Goitia-Zabaleta, N., Milo, A., Gaztañaga, H., and Fernandez, E. (2023).  Two-stage centralised management of Local Energy Market for prosumers integration in a community-based P2P.  Applied Energy, 348.
  * Gribiss et al., (2023) Gribiss, H., Aghelinejad, M. M., and Yalaoui, F. (2023).  Configuration selection for renewable energy community using mcdm methods.  Energies, 16(6).
  * Gullì et al., (2022) Gullì, F., Lazzeroni, P., Lorenti, G., Mariuzzo, I., Moraglio, F., and Repetto, M. (2022).  Recoupled: A simulation tool for renewable energy communities coupling electric and thermal energies.  Economics and Policy of Energy and the Environment, (2):49 – 60\.
  * Heidari et al., (2021) Heidari, M., Parra, D., and Patel, M. K. (2021).  Physical design, techno-economic analysis and optimization of distributed compressed air energy storage for renewable energy integration.  Journal of Energy Storage, 35.
  * JO, (2017) JO (2017).  Décret n° 2017-676 du 28 avril 2017 relatif à l’autoconsommation d’électricité.  2017-676.  Accessed April 2023, https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000034517272,26-01-2024.
  * Kroposki, (2017) Kroposki, B. (2017).  Integrating high levels of variable renewable energy into electric power systems.  Journal of Modern Power Systems and Clean Energy, 5(6):831–837.
  * Lund, (2009) Lund, P. D. (2009).  Effects of energy policies on industry expansion in renewable energy.  Renewable energy, 34(1):53–64.
  * Luz et al., (2021) Luz, G. P., Brito, M., Sousa, J., and Vieira, S. (2021).  Coordinating shiftable loads for collective photovoltaic self-consumption: A multi-agent approach.  Energy, 229.
  * Luz and E Silva, (2021) Luz, G. P. and E Silva, R. A. (2021).  Modeling energy communities with collective photovoltaic self-consumption: Synergies between a small city and a winery in Portugal.  Energies, 14(2).
  * Mohamad et al., (2018) Mohamad, F., Teh, J., Lai, C.-M., and Chen, L.-R. (2018).  Development of energy storage systems for power network reliability: A review.  Energies, 11(9):2278.
  * MTE, (2023) MTE (2023).  Arrêtés du 28 et 30 juillet 2023 relatif aux tarifs réglementés de vente de l’électricité.  Technical report, Ministère de la transition énergétique.
  * (25) Mustika, A. D., Rigo-Mariani, R., Debusschere, V., and Pachurka, A. (2022a).  New Members Selection for the Expansion of Energy Communities.  Sustainability (Switzerland), 14(18).
  * (26) Mustika, A. D., Rigo-Mariani, R., Debusschere, V., and Pachurka, A. (2022b).  A two-stage management strategy for the optimal operation and billing in an energy community with collective self-consumption.  Applied Energy, 310.
  * Pasqui et al., (2023) Pasqui, M., Felice, A., Messagie, M., Coosemans, T., Bastianello, T. T., Baldi, D., Lubello, P., and Carcasci, C. (2023).  A new smart batteries management for Renewable Energy Communities.  Sustainable Energy, Grids and Networks, 34.
  * Paterakis et al., (2017) Paterakis, N. G., Erdinç, O., and Catalão, J. P. (2017).  An overview of demand response: Key-elements and international experience.  Renewable and Sustainable Energy Reviews, 69(July 2016):871–891.
  * Perger et al., (2021) Perger, T., Wachter, L., Fleischhacker, A., and Auer, H. (2021).  PV sharing in local communities: Peer-to-peer trading under consideration of the prosumers’ willingness-to-pay.  Sustainable Cities and Society, 66.
  * Piazza et al., (2023) Piazza, G., Bracco, S., Delfino, F., Somma, M. D., and Graditi, G. (2023).  Impact of electric mobility on the design of renewable energy collective self-consumers.  Sustainable Energy, Grids and Networks, 33.
  * Pinto et al., (2020) Pinto, E. S., Serra, L. M., and Lázaro, A. (2020).  Optimization of the design of polygeneration systems for the residential sector under different self-consumption regulations.  International Journal of Energy Research, 44(14):11248 – 11273\.
  * Rahmaniani et al., (2017) Rahmaniani, R., Crainic, T. G., Gendreau, M., and Rei, W. (2017).  The Benders decomposition algorithm: A literature review.  European Journal of Operational Research, 259(3):801–817.
  * Reis et al., (2022) Reis, I. F., Gonçalves, I., Lopes, M. A., and Antunes, C. H. (2022).  Collective self-consumption in multi-tenancy buildings–To what extent do consumers’ goals influence the energy system’s performance?  Sustainable Cities and Society, 80.
  * Sangaré et al., (2023) Sangaré, M., Bourreau, E., Fortz, B., Pachurka, A., and Poss, M. (2023).  Loads scheduling for demand response in energy communities.  Computers and Operations Research, 160.
  * Simoiu et al., (2021) Simoiu, M. S., Fagarasan, I., Ploix, S., and Calofir, V. (2021).  Sizing and management of an energy system for a metropolitan station with storage and related district energy community.  Energies, 14(18).
  * Stephant et al., (2021) Stephant, M., Abbes, D., Hassam-Ouari, K., Labrunie, A., and Robyns, B. (2021).  Distributed optimization of energy profiles to improve photovoltaic self-consumption on a local energy community.  Simulation Modelling Practice and Theory, 108.
  * Strepparava et al., (2022) Strepparava, D., Rosato, F., Nespoli, L., and Medici, V. (2022).  Privacy and auditability in the local energy market of an energy community with homomorphic encryption.  Energies, 15(15).
  * Surmann et al., (2020) Surmann, A., Walia, R., and Kohrs, R. (2020).  Agent-based bidirectional charging algorithms for battery electric vehicles in renewable energy communities.  Energy Informatics, 3(1):19.
  * Wang et al., (2021) Wang, Z., Yu, X., Mu, Y., Jia, H., Jiang, Q., and Wang, X. (2021).  Peer-to-Peer energy trading strategy for energy balance service provider (EBSP) considering market elasticity in community microgrid.  Applied Energy, 303.