Jump to content

Simulating solar self-consumption optimisation and neighbourhood energy sharing in Germany

From Appropedia
Project data
Type Photovoltaic Systems
Authors Dragonfly7211
Location Germany
Environment City
Status Modelled
Years 2026
OKH Manifest Download

This project investigates how much a German household can improve the value of its rooftop solar system using only software without buying any additional hardware: Smart scheduling of controllable appliances, batteries, heat pumps and electric vehicles. It then extends this single-household model into an agent-based simulation of a whole neighbourhood sharing energy under Germany's new energy-sharing law (§42c EnWG, in force since June 2026).

The single-household results show that intelligent, price- and solar-aware scheduling raises average annual self-sufficiency from roughly 49% to 56% and self-consumption from 73% to 81%, cutting the yearly electricity bill by around 11%. This is achieved purely by shifting when flexible loads run. At the neighbourhood scale, community sharing reduces total grid imports by about 16.7% (roughly 3,000 kWh/year for five households) and measurably flattens the load on the local grid transformer. However, under the current legal framework — which grants no financial incentive and levies full grid fees on shared electricity — the monetary savings from sharing are small. The physics works; the economics, by design, does not yet.

The work was carried out as a project for the university course "Engineering for Equity Think Tank" at Berlin Technical University. All code is publically available here and you can try out the simulations live on this website.

Context and Motivation

[edit | edit source]

Germany's Energiewende has put millions of solar panels on rooftops, but it has not made it easy to use the electricity they produce. A typical home with photovoltaics (PV) consumes only a fraction of what it generates at midday, exporting the surplus to the grid for a legally fixed feed-in tariff of about 7.78 ct/kWh, while buying it back in the evening at a retail price closer to 32 ct/kWh. The same kilowatt-hour, travelling a few metres of cable to a neighbour, is worth four times more to the buyer than the producer receives for it.

This project began from a simple, stubborn curiosity: how much of this waste can be removed with software alone? No new batteries, no new panels — just better decisions about when the dishwasher, the heat pump, or the car charger runs. Two observations sharpened that curiosity into a research question. First, household self-consumption can be surprisingly low: Much of a home's own clean generation is exported rather than used, simply because loads and production are poorly aligned in time. Second, on sunny days the wholesale electricity price now visibly collapses around noon, precisely when every home battery in the country has finished charging and the grid is flooded with solar it cannot absorb. That midday price trough is a signal: an invitation to move flexible demand into the hours when clean energy is abundant.

There is a broader thread here, too. The current arrangement rewards centralised infrastructure and the incumbents who own it, while penalising exactly the distributed, local, self-organising behaviour the energy transition actually needs. A household that generates and consumes its own power close to where it is produced relieves the grid, and is nonetheless charged as though it had done nothing of the sort. One might ask whether these rules are simply a relic of a more centralised era that no longer fits the technology, or whether they persist because the revenue they generate, flowing to grid operators and, through municipal ownership stakes, to public budgets, leaves few of the parties who could reform them with much incentive to do so.

Into this landscape arrives a genuine opportunity. Since 1 June 2026, §42c of the Energiewirtschaftsgesetz (EnWG) has made it legal for neighbours to share renewable electricity across the public grid. For the first time, the technical question ("how do we optimise a household?") can be combined with a structural one ("what happens when a whole neighbourhood coordinates?"). This project sets out to simulate both, compare them against the status quo, and (modestly) to produce evidence that could inform how the rules evolve.

Background: energy sharing under §42c EnWG

[edit | edit source]

Energy Sharing is the joint use of electricity from renewable sources, typically rooftop PV, among several end consumers, transported over the public distribution grid rather than through private wiring. This distinguishes it from older models such as Mieterstrom (tenant electricity) or gemeinschaftliche Gebäudeversorgung (GGV, communal building supply), both of which are confined to a single building. §42c reaches across property boundaries.

[edit | edit source]

The key provision is the newly inserted §42c EnWG, which entered into force on 22 December 2025 and became technically effective on 1 June 2026, implementing Article 15a of the revised EU Electricity Market Directive. From June 2026, participants must lie within the same balancing area of a single distribution grid operator; from June 2028 this extends to directly adjacent balancing areas in the same control zone. Supporting provisions include §20 EnWG (non-discriminatory grid access), §42a (Mieterstrom), §42b (communal building supply), and the EU General Data Protection Regulation, which governs the personal data generated by smart meters.

Technical requirements

[edit | edit source]

Every participating generation plant and every consumption point must be fitted with an intelligent metering system (intelligentes Messsystem, iMSys) that records generation and consumption in short 15-minute intervals. An iMSys is more than a digital meter: it pairs a digital meter with a BSI-certified smart meter gateway that transmits the interval data in encrypted form. A plain digital meter (moderne Messeinrichtung, mME) does not qualify. Without the gateway there is no way to record and allocate shared quantities at the resolution the law requires. These interval measurements are the basis for allocating shared quantities and for billing between producers and consumers, while the electricity itself continues to flow through the public grid.

The practical obstacle is that these devices are still rare. A mandatory rollout applies to households consuming more than 6,000 kWh per year, PV installations above 7 kWp, and controllable loads over 4.2 kW, but by the end of 2025 only about 5.5% of Germany's roughly 56.5 million metering points had an iMSys installed. The legal right to share electricity, live since June 2026, therefore currently outruns the physical ability to exercise it for the overwhelming majority of homes: for most households the binding constraint is not the tariff or the optimisation logic modelled here, but simply whether the meter on the wall can participate at all.

Because the 15-minute readings that make sharing possible also constitute personal data under the GDPR, they may only be processed for the specific purpose for which they are collected, which is  a constraint any real §42c implementation has to carry.

The economic catch

[edit | edit source]

This is the crux for our study. §42c creates the legal possibility of sharing but attaches no financial incentive to it. Unlike Austria (reduced grid fees for shared electricity) or Italy (a state premium per shared kilowatt-hour), Germany treats shared electricity like any other grid consumption: full grid fees, levies, electricity tax and VAT all apply. In practice, independent analyses put the realistic net benefit at roughly 4–10 ct/kWh of shared energy: well below the ~25 ct/kWh sometimes claimed. As a result, in its 2026 form energy sharing is, for most households, primarily a model for idealistic motives such as neighbourhood projects, citizen initiatives, cooperatives, rather than a compelling financial proposition. Whether that changes depends on whether the legislator later adds a sharing bonus or reduced grid fees for locally shared power.

This gap between physical possibility and economic reward is not a side note. It is, as the findings below show, the single most important thing our simulation measures.

Methodology

[edit | edit source]

The simulation is built in two phases, deliberately sequenced so that the second builds on the first. Everything runs at 5-minute resolution over a full year (105,120 time steps), using physically grounded models rather than statistical fits wherever possible.

Phase 1: Single-household optimisation

[edit | edit source]
A flow chart describing the code's funcionality in phase 1 (single household optimiation).
Phase 1 concept diagram: solar + price forecast → scheduler → device start times → battery dispatch → grid flows.

A household is modelled as a composition of independent physical components: a solar array (converted from typical-meteorological-year weather data to AC power using the pvlib single-diode model, accounting for panel orientation, tilt, temperature and inverter behaviour), a base load (the always-on background of fridge, standby, lighting and cooking), a set of flexible devices (dishwasher, washing machine, tumble dryer, heat pump, EV charger — each with its own fixed consumption profile but a free start time), a battery, and dynamic electricity prices from the EPEX day-ahead market.

The core question is: at what time should each flexible device run so that as much of its energy as possible comes from solar (or from cheap hours), rather than expensive grid import? We implemented and compared four strategies of increasing sophistication:

  • Random: Each device starts at an arbitrary permitted time. This is the "nobody optimises" baseline: a person hitting start whenever they happen to think of it.
  • Greedy: Devices are placed one at a time, largest first, each at the moment that minimises its own grid-import cost given what is already scheduled. Fast and transparent, but it cannot reconsider earlier decisions.
  • Linear-programming (LP) relaxation: A mathematical upper bound on what any scheduler could achieve, used as a benchmark rather than a real schedule.
  • Mixed-integer linear programming (MILP): Considers all devices and all start times simultaneously and finds the provably optimal combination.

The battery is then dispatched on top of the resulting load curve with a set of physically-constrained heuristics (charge from surplus, discharge into deficit, hold a reserve, spread charging across the cheap-price window rather than charging at full speed at first sunshine). Crucially, the flex scheduler and the battery dispatch run in sequence, not as one joint optimisation: A simplification whose consequences are discussed under Limitations.

Phase 2: Agent-based neighbourhood model

[edit | edit source]
A flow chart describing phase of of the code (the agent based modelling of a neighbourhood).
Phase 2 flow: per-agent local dispatch → P2P netting → shared-battery coordination → final grid flows → community metrics.

Phase 2 replaces the single household with a community of households simulated together, step by step, so that they can interact within each 5-minute interval. Each household becomes an agent that (a) plans its day exactly as in Phase 1, then (b) at every time step announces its residual grid flow (the surplus or deficit remaining after its own battery and EV have done what they can locally).

Those residuals feed two community mechanisms, in a deliberate priority order that mirrors both economic logic and current law:

  1. Peer-to-peer (P2P) direct netting. Within each step, one household's surplus is matched against another's simultaneous deficit. This is a purely economic and accounting construct. The electrons flow the same way they always would, but it is exactly what §42c formalises: a locally-generated kilowatt-hour is attributed to a neighbour who is consuming at that instant, rather than being exported and re-imported.
  2. Shared community battery. As an optional mode any surplus or deficit still remaining after P2P netting is offered to a community-owned battery, dispatched by a coordinator and allocated back to households in proportion to their contribution or need.

The shared battery is modelled as a single physical, community-owned asset charged only from local surplus, which keeps it a clean "green" store and avoids the grey-electricity accounting (the EEG exclusivity principle) that complicates grid-charged private batteries. Real deployment would additionally have to address co-location, bidirectional grid-connection, and §42c billing rules, an active regulatory area (see the Bundesnetzagentur's MiSpeL process, expected to conclude mid-2026) that this model does not attempt to represent.

The design is intentionally modular: the coordinator is an abstract interface with interchangeable strategies (a pass-through coordinator that does nothing, used to verify the ABM exactly reproduces Phase 1, and a shared-battery coordinator), so that more sophisticated community behaviours (day-ahead appliance rescheduling signals, for instance) can be added later without disturbing the core loop.

A key modelling parameter is the community tariff: the internal price at which shared energy is bought and sold between neighbours. In the results below, buyers pay 28 ct/kWh for community energy and sellers receive 15 ct/kWh (both sitting inside the realistic 4–10 ct/kWh net-benefit window once grid fees are accounted for), and both far from the extremes of the 7.78 ct feed-in tariff and the ~32 ct retail price. This split is a policy lever: sweeping it (in particular, modelling a reduced grid levy on shared energy) turns the simulation into an instrument for evaluating regulatory reform. It should be noted that the exact prices vary by region and grid fees. At the time of this article concrete examples are not publically available yet.

Findings

[edit | edit source]

Single-household optimisation

[edit | edit source]
A complex graphic showing the enery consumption of two consecutive days with no particular smart scheduling (random).
Unoptimised, random scheduling.

The core mechanism: before and after

[edit | edit source]

The two figures below show the same household on the same two spring days: First with random appliance scheduling, then with MILP optimisation. The difference is entirely in timing; no hardware has changed.

In the random case, the heat pump and other flexible loads fire at essentially arbitrary times. Note the large heat-pump block running late in the evening, drawing over 5 kW straight from the grid (the tall red import spike), while the day's solar surplus was exported hours earlier for a pittance. Self-consumption sits at 30%, self-sufficiency at 59%, and the day imports 10.7 kWh.

A complex graphic showing the enery consumption of two consecutive days with MILP smart scheduling (our most advanced model).
Optimised, MILP scheduling.

In the optimised case, the scheduler has slid the heat-pump block and the dishwasher directly underneath the solar curve*. The same appliances now run on sunshine: self-consumption jumps to 49%, self-sufficiency to 97%, and grid import collapses to 0.7 kWh. The battery panel tells the complementary story: In the optimised run the battery fills smoothly through the solar peak and discharges cleanly into the evening, its charging deliberately spread across the midday window rather than rushed. The bottom energy-flow panel makes the shift legible at a glance: the optimised day is dominated by Solar → Load and Solar → Battery, with Grid → Load nearly eliminated.

*note that a buffer tank is required for the heat pump to be scheduled freely.

This is the whole thesis of the project in one comparison: substantial gains, zero new hardware.

Across a full year

[edit | edit source]
A plot showing the self-sufficiency, self-consumption and net electricity cost per day across one year.
Annual optimisation impact, 14-day rolling averages.

Aggregating this behaviour over all 365 days confirms it is not a fair-weather effect.

Averaged across the year, optimisation raises self-sufficiency from 49.2% to 56.4% and self-consumption from 73.2% to 80.5%, cutting the mean daily electricity cost of our model household from 3.31 € to 2.96 € (~11%). The seasonal shape is instructive. The optimisation gap is widest in spring and autumn, the shoulder seasons where there is enough sun to be worth chasing but not so much that even a naive schedule succeeds. In high summer, both curves press against 100% (when the roof is drowning in surplus, timing barely matters, and even random scheduling captures most of the benefit). In deep winter, both collapse toward the floor: there is simply too little solar to optimise around (so almost all can be used), and the household is grid-dependent regardless. The lesson is that software optimisation is most valuable precisely in the ambiguous middle, not at the extremes.

Why the effective import price barely moves and what that tells us

[edit | edit source]

One subtle result deserves emphasis. The effective import price is almost identical between the two cases (32.5 vs 32.1 ct/kWh). This means the 11% cost saving comes overwhelmingly from importing less energy, not from cleverly buying at cheaper hours. The dominant lever is self-consumption: Using your own solar instead of the grid, because the gap between the retail import price and the feed-in tariff is so large that almost any shift toward local use pays off. Price-timing is a real but secondary effect.

The grid-stability dividend

[edit | edit source]
A plot showing the exported energy with and without the optimisation, and also the dynamic electricty price, for a mean average day sampled from one year.
Mean hourly grid export vs. electricity price.

Optimisation is not only a private financial matter; it changes how the household interacts with the grid.

This figure overlays the household's mean grid export (bars) on the mean dynamic import price (red line). The unoptimised household dumps its largest export peaks (0.7–0.8 kW) into the grid right at midday, precisely when the price is at its lowest (that is, precisely when the grid is already saturated with everyone else's solar and least wants more). The optimised household's export is markedly lower and flatter: by self-consuming and storing more, it stops contributing to the very midday oversupply that crashes the noon price. This is the individual-scale seed of a system-scale benefit, and it motivates the neighbourhood analysis that follows.

Neighbourhood energy sharing (agent-based model)

[edit | edit source]

The baseline: how much could be shared?

[edit | edit source]
A bar chart showing the grid import (kWh) for every month of the year – one with and one without energy sharing. This is the potential of what can be shared, and every bar with sharing is generally lower, meaning less import from the grid is necessary. It should be noted that this does not yet consider any actual distribution of this power, just the potential.
Neighbourhood grid import, with vs. without sharing.

Before simulating any coordination, we can ask a prior question: across a set of independent households, how much energy is simultaneously surplus in one home and deficit in another? This "sharing potential" is the theoretical ceiling on what P2P netting could capture, and it is the conceptual foundation the full ABM builds upon.

Across our five-household community, ABM sharing reduces annual grid import by 3,174 kWh, a 16.7% reduction versus purely local dispatch. The monthly breakdown shows the effect is proportionally largest in the shoulder and summer months (in July, community sharing nearly eliminates the remaining import), because that is when surplus is abundant and diverse across households. In deep winter the absolute import is high but the shareable fraction is small (when nobody has surplus, there is nothing to share). This plot justifies the whole ABM: the potential is real and substantial.

A day in the life of the community

[edit | edit source]
A plot showing the energy consumption of five households across two consecutive days without a community battery present.
Community energy consumption over two consecutive days without a community battery.
A complex figure showing the electrcity consumption of a small community for two consecutive days.
Community energy consumption over two consecutive days with a community battery.

The full step-by-step ABM lets us watch the community operate. The simulation is run with and without the addition of a 20 kWh community battery, to quantify its effects.

The top panel stacks each household's demand beneath the community solar curve; the surplus (green) is the raw material for sharing. The second panel shows the dynamic electricity price and highlights low-priced zones. The third panel shows the community battery charging through the solar peak (rising to ~12 kWh) and discharging overnight (a shared asset smoothing the whole neighbourhood rather than any single home). The fourth panel is the payoff: the community's net grid exchange. You can notice how this only comes into effect during the day, when no community battery is present. In the second plot, with the community battery, there is a steady exchange even overnight, which almost covers baseload, with the shared battery and P2P netting absorbing what individual homes could not. This can also be observed in the last subplot, with the primary power source at night switching from grid import to battery power. Note the archetype diversity that makes this work: House D (solar, no battery) is a natural exporter, House E (apartment, no solar) a natural importer, and the community lets them offset each other in real time.

Community results over the year

[edit | edit source]

Aggregating the five archetypes across the year gives the fairness picture: who benefits, and by how much. To separate the two sharing mechanisms, the neighbourhood was simulated twice: once with peer-to-peer netting alone (households exchange simultaneous surplus and deficit, no shared storage), and once with P2P plus a 20 kWh community battery that stores collective surplus for later. Comparing the two isolates exactly what the shared battery adds.

With P2P netting alone, the community reaches 39.8% self-sufficiency and 68.9% self-consumption, saving 186 €/year across the five households. The per-household breakdown for this P2P-only case:

Household Solar (kWh) Import (kWh) Export (kWh) SS% local SS% share Net cost no-share (€) Net cost share (€) Cost reduction % Shared bought (kWh) Shared net (kWh)
House A — Standard 4757 3688 1392 47.3 59.5 +1072 +1052 1.9 84 +16
House B — Young family 4757 5282 905 41.6 51.4 +1629 +1606 1.4 114 −56
House C — Retiree (no EV) 3483 4883 795 34.9 44.9 +1519 +1512 0.4 18 +33
House D — Solar, no battery 4757 2933 3275 33.6 44.5 +704 +659 6.5 12 +628
House E — Apartment (no solar) 0 2242 0 −0.0 27.7 +734 +644 12.3 621 −621
A plot showing the self-sufficiency, self-consumption and mean net cost per day over the course of a year for five households and no community battery.
Community year metrics, 14-day rolling means, without a community battery.

Community aggregates (P2P only): self-sufficiency 39.8% · self-consumption 68.9% · transformer peak 30.01 kW · community savings 186 €/year (buy 28 ct / sell 15 ct)

Adding the community battery lifts the community to 47.5% self-sufficiency and 84.3% self-consumption, and quadruples the saving to 796 €/year. The battery moves 2,326 kWh/year of energy that would otherwise have been exported cheaply and re-imported expensively, and, tellingly, its benefit is distributed very unevenly across the archetypes. The same breakdown, now for the P2P-plus-battery case:

Household Solar (kWh) Import (kWh) Export (kWh) SS% local SS% share Net cost no-share (€) Net cost share (€) Cost reduction % Shared bought (kWh) Shared net (kWh)
House A — Standard 4757 3688 1392 47.3 62.6 +1072 +1042 2.9 258 +397
House B — Young family 4757 5282 905 41.6 58.2 +1629 +1473 9.6 624 −179
House C — Retiree (no EV) 3483 4883 795 34.9 54.4 +1519 +1356 10.7 564 −254
House D — Solar, no battery 4757 2933 3275 33.6 60.1 +704 +622 11.7 492 +1686
House E — Apartment (no solar) 0 2242 0 −0.0 55.2 +734 +432 41.1 1237 −1237
A ghraphic showing the community year metrics: the self-consumption, self-sufficiency and mean net cost per day for different households in a community, and their average.
Community year metrics, 14-day rolling means, with a community battery

Community aggregates (P2P + battery): self-sufficiency 47.5% · self-consumption 84.3% · transformer peak 30.01 kW · community savings 796 €/year (buy 28 ct / sell 15 ct) · shared-battery throughput 2,326 kWh/year.

Three things stand out. First, sharing raises the "share" self-sufficiency of every household above its purely-local value, and the community battery is what makes that lift large: House E, the solar-less apartment, goes from total grid dependence to drawing 55% of its energy from the community, and its cost reduction jumps from 12.3% (P2P alone) to 41.1% with the battery. This is the equity story in one row: the participant least able to install their own PV benefits most, and it is the shared storage, not simultaneous netting, that delivers most of that benefit. House D, the exporter with panels but no battery of its own, is the natural counterpart: it sells 2,178 kWh into the community and finally has somewhere for its surplus to go.

Second, the community battery roughly quadruples the collective saving (186 → 796 €/year) while displacing about 17% of grid imports. That is a real and worthwhile gain — but it is worth being clear-eyed about scale: 796 €/year spread across five households is modest, and it exists only because the shared battery is a physical asset that genuinely shifts energy in time. The purely legal mechanism, P2P netting, the part §42c actually enables, contributes the smaller share.

Third, and soberingly, even the larger figure is thin relative to the energy moved, and the reason is entirely the tariff structure. At a 28 ct buy / 15 ct sell split, the per-kilowatt-hour wedge captured by sharing sits squarely inside the 4–10 ct/kWh net benefit that §42c's lack of financial incentive permits. The energy moves; the money barely does. This is not a limitation of the simulation, it is a faithful measurement of the law as written, and it is the project's central finding: energy sharing in its current German form works physically and, for those without their own generation or storage, meaningfully improves independence, but it does not yet pay.

The grid-stability finale

[edit | edit source]

The most striking result is what sharing does to the local grid transformer.

A figure showing the transformer load (kW) of the community for three seasons.
Seasonal transformer load profiles, with vs. without community sharing and with vs. without a community battery.

Here the mean net power flowing through the neighbourhood's shared transformer is shown by hour of day, split into three seasonal panels (winter, equinox, summer). Each hour carries three bars, tracing the progression the whole project describes: no sharing at all, then home batteries plus P2P netting, then the full community battery on top. Positive is import from the grid; negative is export back-feed into it. Reading the three bars left to right at any hour shows each mechanism peeling away another slice of grid stress.

Two effects dominate, and they are strongly seasonal. In winter, when there is little solar and the transformer is almost always importing, community coordination shaves the morning and evening import peaks: each successive bar sits lower than the last at the hours of highest demand, with the community battery discharging stored energy into the evening ramp. In summer, the story inverts: the midday panel is dominated by deep negative excursions as the neighbourhood back-feeds its solar surplus into the grid, and it is here that sharing does its most dramatic work. The un-shared case (the tallest downward bars, driven overwhelmingly by House D's unbuffered export) is progressively tamed — P2P netting absorbs some surplus into simultaneous neighbourhood demand, and the community battery absorbs much of the rest, so the violent noon power-reversal through the transformer is substantially reduced. The equinox panel shows both effects in miniature: import peaks at the day's edges, export dips at midday, each eased step by step.

The essential point is that sharing relieves the local infrastructure in both directions: lower import peaks in winter, shallower export troughs in summer, and that the community battery contributes the larger share of both, consistent with its dominant role in the energy and cost results above. For a distribution grid operator, this bidirectional peak-shaving is arguably worth more than the households' modest euro savings; it defers reinforcement of exactly the transformer and cabling that a solar-dense neighbourhood would otherwise overload. And it is precisely the value that the current fee structure fails to reward the households for providing: the same disconnect, seen now from the grid's side rather than the household's.

Limitations and model boundaries

[edit | edit source]

Honest simulation means being explicit about where the model simplifies reality. The most important boundaries:

  • The heat pump is not yet modelled deterministically from energy demand. It is currently a heuristic: a fixed-power block whose daily runtime scales linearly with heating-degree relative to a design temperature, with the thermal buffer treated as a black box and no coefficient-of-performance (COP) modelling. This makes the model deliberately conservative: it ignores the COP amplification that would let a real heat pump deliver several units of heat per unit of electricity, but it means heat-pump results should be read as first-order, not precise. A physically-grounded thermal model (COP as a function of outdoor temperature, explicit buffer-tank dynamics, distinct space-heating and hot-water demand) is the single most valuable modelling upgrade outstanding.
  • Optimisation is two-layer, not jointly optimal. The flex scheduler commits its decisions before the battery dispatch reacts to them. A true joint optimisation (flex devices and battery state of charge in one MILP) could do measurably better, because the scheduler cannot currently anticipate how its choices constrain the battery later in the day. The MILP is provably optimal for the device-scheduling subproblem — it is not a global optimum for the whole household once battery and EV heuristics are included.
  • P2P settlement and time-resolved pricing. Community savings are computed against representative buy/sell tariffs. A fully time-resolved settlement (pricing each shared kilowatt-hour at the exact market price of the interval in which it was shared) would refine the euro figures, since sharing concentrates in the low-price midday window.
  • Typical- rather than real-year weather. Solar production is derived from a typical meteorological year (a synthetic composite representing average conditions), not a specific historical year or live measurement. It is physically correct for "a representative year" but will not match any actual year's weather. Validation against the author's own logged inverter and consumption data is a planned next step.
  • Stochastic, not behavioural, occupancy. Loads are drawn from probability profiles rather than modelling real occupant behaviour, and the random-scheduling baseline may slightly overstate the status-quo inefficiency, since real people already do some manual optimisation (running the dishwasher when the sun is out).
  • Idealised community coordination. The shared-battery allocation and P2P netting assume perfect, frictionless coordination within each interval. Real §42c implementation involves metering delays, contractual structures, and (as the grid operators themselves have flagged) significant process complexity that this model abstracts away.

None of these undermine the qualitative findings, but they bound how literally the specific numbers should be taken.

Outlook and next steps

[edit | edit source]

The project is under active development, and several extensions are planned:

  • A deterministic, energy-based heat-pump model with an explicit COP curve and buffer-tank thermodynamics: the highest-priority physical upgrade, and one that connects directly to a real decision the author faces: whether to size a home battery to run a heat pump overnight, or install a thermal buffer to run it on midday solar instead.
  • Joint optimisation of flexible loads and storage in a single MILP, closing the gap left by the current two-layer approach, and allowing a rigorous statement of how much value the sequential simplification leaves on the table.
  • A policy sensitivity sweep on the grid levy for shared energy. Because the community tariff and levy are configurable parameters, the model can plot community savings against the levy: producing a break-even curve that directly addresses the §42c "no incentive" problem and shows, in euros, what a reduced grid fee for locally shared power would be worth. This is the most policy-relevant output the project can produce.
  • A Home Assistant integration, so that the single-household optimiser is not merely a simulation but an actual controller: exporting its optimised schedule to a real home's battery, heat pump and EV charger. This closes the loop from analysis to lived benefit.
  • An advanced public web interface, so that others can configure their own household or neighbourhood, run the model, and explore the results without touching the code.

The larger ambition remains what motivated the project at the outset: to show, with evidence rather than assertion, that a great deal of efficiency, resilience and fairness is achievable at the edge of the grid: in ordinary homes, coordinating locally, and to make the case that the rules should reward the people doing exactly what the energy transition needs.

Taken together, the two phases point to the same conclusion from different directions. The technical potential of local optimisation and neighbourhood sharing is real and measurable, but three barriers still stand between that potential and everyday practice. The first is an economics that grants no reward for sharing. The second is a metering infrastructure that most homes do not yet have. The third is a regulatory settlement process whose real-world complexity this model deliberately abstracts away. The extensions below are ordered with that gap in mind.

References

[edit | edit source]
  1. Bundesrepublik Deutschland (n.d.): §42c Energiewirtschaftsgesetz (EnWG) — Gemeinsame Nutzung elektrischer Energie aus Anlagen zur Erzeugung von Elektrizität aus erneuerbaren Energien. https://www.gesetze-im-internet.de/enwg_2005/__42c.html
  2. Bundesnetzagentur (n.d.): Energy Sharing. https://www.bundesnetzagentur.de/DE/Vportal/Energie/Energy_Sharing/start.html
  3. Bundesministerium für Wirtschaft und Energie (BMWE) (n.d.): Energiewirtschaftsgesetz (EnWG). https://www.bundeswirtschaftsministerium.de/Redaktion/DE/Gesetze/Energie/EnWG.html
  4. Bundesamt für Sicherheit in der Informationstechnik (BSI) (n.d.): Smart Meter und intelligente Messsysteme. https://www.bsi.bund.de/
  5. Bundesnetzagentur (2026): Mitteilung Nr. 73 zur Umsetzung des §42c EnWG.
  6. Europäische Union (2016): Verordnung (EU) 2016/679 (Datenschutz-Grundverordnung). https://eur-lex.europa.eu/eli/reg/2016/679/oj
  7. Stiftung Warentest (2026): Neues Gesetz zum Energy Sharing — So liefern Sie Strom in die Nachbarschaft. https://www.test.de/Neues-Gesetz-zum-Energy-Sharing-So-liefern-Sie-Strom-in-die-Nachbarschaft-6308740-0/
  8. GÖRG (2026): Ein Ausblick auf das ab 1. Juni 2026 geltende Energy Sharing gemäß §42c EnWG — Chancen und Grenzen.
  9. FfE (2026): Energy Sharing under §42c EnWG: A legislative milestone, framework conditions and next steps.
  10. Bundesnetzagentur (2026): Roll-out intelligenter Messsysteme — Quartalsweise Abfrage zum Stand des Rollouts. https://www.bundesnetzagentur.de/DE/Fachthemen/ElektrizitaetundGas/NetzzugangMesswesen/Mess-undZaehlwesen/iMSys/artikel.html
  11. Wechselpilot (2026): Smart-Meter-Rollout 2026: Aktueller Stand. https://www.wechselpilot.com/magazin/smart-meter-rollout-2026/

Software libraries: pvlib (solar modelling), SciPy (LP/MILP optimisation), NumPy, pandas. Electricity price data: EPEX day-ahead via aWATTar. Weather: PVGIS typical meteorological year; Open-Meteo forecast API.


This article describes a student research project for the course "Engineering for Equity Think Tank." The simulation code is open source; technical documentation and usage instructions are maintained in the project repository. Note on AI usage: Anthropic Claude Opus 4.8 was used for proof-reading this article and adjusting the wording. The program flow charts in the Methodology section were also generated by the same model.

Page data
SDG
Authors
License CC-BY-SA-4.0
Language English (en)
Related 0 subpages, 0 pages link here
Views 0 page views (analytics)
Created July 13, 2026 by Dragonfly7211
Last edit July 14, 2026 by Dragonfly7211
Cookies help us deliver our services. By using our services, you agree to our use of cookies.