3.1. Community and Hardware
We consider a local energy community of three grid-connected industrial sites (P1–P3) with heterogeneous roles, load profiles, PV arrays and storage systems, all based on commercially available Suntech SunStorage PRO equipment (Suntech, Wuxi, China). Two distinct integration architectures are represented, reflecting the two dominant retrofit paths in practice. The overall architecture—the three sites with their PV, storage and load subsystems, the internal sharing of the coordinated regime, and the market interface with its contractual price terms—is shown schematically in
Figure 1.
P1 and P2 are producing consumers: industrial sites with on-site loads that generate, consume, and sell surplus energy. Both use the DC-coupled hybrid architecture of the modular SunStorage PRO storage family [
14]: P1 combines the Suntech SunStorage PRO STE-50HT-150 hybrid inverter (50 kW AC output, recommended PV input up to 80 kWp) with the SunStorage PRO STE-112A-DC LiFePO4 cabinet (112.5 kWh, 314 Ah cells, 90% depth of discharge, rated at 8000 cycles, battery charge/discharge efficiency of 97.5% per direction, i.e., approximately 95% round-trip); P2 uses the smaller SunStorage PRO STE-30HT-150 inverter (30 kW AC, up to 48 kWp PV) with an identical STE-112A-DC cabinet. The hybrid inverter couples PV and battery on the DC side and imposes a hard AC output limit, which our model represents explicitly.
P3 is a real merchant PV plant: a 98.56 kWp installation in southern Bulgaria (EVN distribution area) that sells its entire output on the market through an offtake contract and has no significant on-site load. The plant retains its existing string inverter; storage is retrofitted with the AC-coupled Suntech SunStorage PRO STE-261L-125P all-in-one cabinet [
15]: 261.24 kWh of LiFePO4 capacity (LFP 314 Ah cells), 125 kW rated power conversion, 95% depth of discharge, ≥8000 cycles, and a system round-trip efficiency of ≥89% including the integrated power conversion stage. Because the cabinet contains no PV inverter, it attaches at the plant’s AC bus—precisely the configuration assumed here, in which existing PV assets are upgraded with storage without replacing the PV inverter. Export at each site is bounded by its connection capacity, taken equal to the installed AC rating.
Table 1 summarizes the configuration.
3.2. Market Data and Contractual Framework
Electricity prices are taken from the day-ahead market of the Independent Bulgarian Energy Exchange (IBEX) [
16]. We use the trailing twelve months of available data (6 June 2025 to 5 June 2026, 8760 hourly steps). The market moved from hourly to 15 min market time units on delivery day 1 October 2025 (trading day 30 September 2025), with the transition implemented simultaneously across the European Single Day-Ahead Coupling [
17]; quarter-hourly prices are accordingly averaged to hourly resolution. Bulgaria adopted the euro on 1 January 2026 at the irrevocably fixed conversion rate of 1 EUR = 1.95583 BGN [
18]; prices published in BGN before euro adoption are converted at this rate, while prices already published in EUR are used directly, yielding a continuous hourly series. The compiled and harmonized dataset used in all experiments is openly available [
19]. Over this window, the mean price is 115.0 EUR/MWh, with a minimum of −79.5 EUR/MWh, a maximum of 936.7 EUR/MWh, and 191 h of negative prices.
The export side is modeled on the terms of a real market offtake contract with a licensed electricity trader acting as balancing-group coordinator under the national Electricity Trading Rules [
20], of the type now standard for small producers on the Bulgarian market. Produced net active energy is purchased at an indexed price equal to the day-ahead clearing price of the relevant settlement period minus a fixed administrative fee of 2.15 EUR/MWh. Crucially, the contract passes negative prices through to the producer—when the clearing price is negative, the producer pays for injected energy—and obliges the producer to stop production in settlement periods notified as strongly negative. We represent this mechanism endogenously: PV output is a decision variable bounded by the available resource, so the optimizer curtails whenever injection would be value-destroying, i.e., whenever the day-ahead price falls below the 2.15 EUR/MWh fee; this encompasses both the mandatory stop-production obligation in strongly negative periods and voluntary economic curtailment at low positive prices.
We further assume that the metering and contractual arrangement permit the batteries to charge from the grid and that all exported energy is settled at the contract price; where contract terms or guarantees of origin restrict the re-export of grid-charged energy, an additional constraint separating PV-charged from grid-charged energy would be required; the impact of disallowing grid charging is quantified in
Section 4.9. Balancing costs, which the contract allocates to the producer within a standard balancing group, are outside the scope of the day-ahead dispatch model and are noted as a limitation. On the consumption side, imports are priced at the day-ahead price plus a network-and-supply adder of 30 EUR/MWh, a representative assumption for industrial supply contracts.
3.3. PV Resource and Load Modeling
PV generation is modeled physically for a south-facing (azimuth 0°) array tilted at 35°. Hourly plane-of-array irradiance is computed from solar geometry and an atmospheric transmittance, scaled by a monthly clearness index and a performance ratio of 0.82, and clipped at the AC rating of the respective inverter. Two locations are evaluated: Sofia (42.70° N), calibrated to a specific annual yield of 1300 kWh/kWp, and Stara Zagora (42.43° N) in the sunnier south—the region where the real P3 plant operates—calibrated to 1390 kWh/kWp; both values are consistent with estimates from the European Commission’s PVGIS tool for these locations [
21]. Load profiles for P1 and P2 are representative synthetic time series for the two industrial archetypes (single-shift manufacturing with a daytime peak, and continuous cold storage with a flat profile and a mild night dip), with weekday/weekend modulation, scaled to the annual energies in
Table 1; they are intended to be replaced by metered data as the sites are instrumented. P3 carries no load, reflecting the real plant. Specifically, the normalized hourly shape of P1 is s
1(h) = 0.25 + 0.75·max{sin(π(h − 6)/12), 0} with a weekend factor of 0.40 (single-shift manufacturing), and that of P2 is s
2(h) = 0.85 + 0.15 ·cos(π(h − 15)/12) with a weekend factor of 0.92 (continuous cold storage); both shapes are normalized so that the annual energies match
Table 1. The sensitivity of the results to these synthetic shapes is tested with alternative industrial profiles in
Section 4.9.
3.4. MILP Dispatch Model
Each site is modeled at its AC node with the following hourly variables over a time step Δt = 1 h: grid import
gimp and export
gexp, battery charge
pch and discharge
pdis, dispatched PV output g
pv (curtailment allowed), stored energy
et, and a binary mode indicator
yt ∈ {0,1} that forbids simultaneous charging and discharging. Given the day-ahead load
Lt and the available PV resource ĝ
pv, the daily cost-minimization problem for one site is:
where the import and export prices follow the supply assumption and the offtake contract, respectively:
with
fimp = 30 EUR/MWh and
fadm = 2.15 EUR/MWh. Note that
πexp becomes negative whenever the day-ahead price falls below the administrative fee, so injection is then penalized rather than remunerated—the contractual negative-price pass-through. The constraints are:
Here
ηc and
ηd are the charge and discharge efficiencies (
ηc =
ηd = √
ηrt),
Gconn is the export connection capacity, and the first condition in (6) makes curtailment an endogenous decision. The import bound in (6) is set to the site’s AC rating plus the battery charging power. Constraint (7) enforces the joint AC output limit of the DC-coupled hybrid inverters at P1 and P2; the AC-coupled battery at P3 has its own power conversion stage and is limited by its rating and the export cap. The two integration architectures thus differ in three respects: (i) at P1 and P2 dispatched PV and battery discharge share the hybrid inverter’s AC stage and jointly compete for its rating through (7), whereas at P3 no joint limit with the PV inverter applies; (ii) conversion losses are lumped into the per-direction efficiencies ηc = ηd = √ηrt, with ηrt = 95% for the DC-coupled cabinets and ηrt = 89% for the AC-coupled system, the lower figure reflecting the additional AC/DC conversion of its integrated power stage; and (iii) grid charging at P3 passes through the cabinet’s own converter, while at P1 and P2 it shares the hybrid inverter within the same AC limit.
The binary constraints (5) make the model a genuine MILP, and their role merits a precise statement. With strictly positive round-trip losses and non-negative prices, simultaneous charging and discharging is never optimal, so the binaries are typically inactive at the optimum and the LP relaxation attains the MILP optimum. The situation changes in degenerate price regimes. When the export price is negative (191 h in our window), the LP relaxation may admit objective-equivalent loss-dissipating charge/discharge cycles even though PV curtailment is available as a free disposal channel; and when the import price itself becomes negative (π_DA < −30 EUR/MWh, 22 h in our window), such simultaneous cycles become strictly profitable, since dissipating imported energy through the round-trip loss is then remunerated. The binary mode constraints exclude both artifacts—the spurious equivalent optima and the strictly profitable energy burning—and likewise remove analogous objective-equivalent degeneracies under the capacity-aware objective introduced below. There is therefore no contradiction with the empirical observation in
Section 4.9 that the LP relaxation is tight for the cost-only objective at 15 min resolution: tightness there is a property of the particular price realization, verified ex post against the MILP solution, whereas the binary constraints guarantee physical consistency for any price series, including the negative-price and peak-priced regimes in which the relaxation can fail. Since the daily instances solve in milliseconds, retaining the binaries costs little and removes the need for case-by-case tightness verification.
The final term in (1) assigns a small terminal value to stored energy at the daily mean import price to avoid spurious end-of-horizon discharging; the horizon is one day (24 h), reflecting the day-ahead market, and the state of charge is carried across consecutive days.
In the coordinated regime, the three sites are optimized jointly as an energy community. Only the community net position interacts with the grid, so internal surpluses—including the merchant plant’s output—offset internal deficits before any import or export occurs:
with the per-site constraints (3) and (5)–(7) retained. The objective replaces the per-site grid flows in (1) with the community flows in (8). All instances are solved to proven optimality with the CBC branch-and-bound solver (v2.10) via PuLP (v3.3): a daily single-site instance comprises 168 variables (24 binary) and about 120 constraints, the coordinated instance roughly 550 variables (72 binary) and 360 constraints, and a full annual evaluation (2920 daily MILPs per location) completes in under one minute on a single CPU core (18 ms per instance on average, 0.5 s worst case).
For reproducibility, the remaining dispatch assumptions are stated explicitly. The state of charge is initialized at 50% of capacity on the first simulated day and carried across consecutive days. End-of-day stored energy is valued at the daily mean import price (the terminal term in (1));
Section 4.9 shows that replacing this valuation with a hard end-of-day restoration to 50% changes the annual results by less than 4% and leaves the coordination gain unchanged. Internal sharing in the coordinated regime is a virtual netting of the three AC nodes at the community boundary, Equation (8): battery and inverter losses are borne inside each site, whereas network losses and charges on internally shared energy are not modeled in the base case and are bounded by the wheeling-fee sensitivity of
Section 4.9. Finally, the coordination benefit is reported at community level; its allocation among members is a settlement-design choice that can be layered on top of the dispatch—e.g., proportionally to shared volumes or through cooperative-game schemes as in [
11]—without altering the optimization itself.
The coordinated regime should be read as an idealized settlement assumption: the three sites are netted within a single perimeter—as in an energy community or aggregator arrangement—and internally shared energy incurs no wheeling or network charges. Realistic settlement frameworks may levy such charges on shared energy, which would reduce the coordination gain proportionally; the sensitivity of the gain to the import price spread (
Section 4.1) and to an explicit wheeling fee on shared energy (
Section 4.9) bounds this effect. Whether virtual netting of separately metered sites is permitted depends on the applicable regulatory framework [
20].
In the Bulgarian context, specifically, the three sites are separately metered grid users with their own supply and offtake contracts. Since 3 February 2026, the national Electricity Trading Rules [
20] have included a dedicated framework for shared electricity involving groups of active customers, citizen energy communities and renewable-energy communities—transposing the energy-sharing provisions of RED II and RED III [
1]—which regulates the registration of such groups with the network operators, settlement-period metering with remote reading, a two-stage methodology for allocating the shared quantities, their reflection in suppliers’ invoices, and an exemption from transmission-network charges for shared quantities that meet the operator’s connection criteria (State Gazette No. 13 of 3 February 2026). The coordinated regime modeled here should nevertheless be interpreted as an upper-bound settlement case with frictionless community netting: its practical realization depends on eligibility and registration, network topology, the statutory allocation methodology, the contractual arrangements with supplier and offtaker, and the network charges applicable to shared quantities, which our wheeling-fee sensitivity (
Section 4.9) captures only in aggregate. The legal possibility of energy sharing thus now exists; what the model idealizes is the absence of the associated frictions and charges.
3.5. Capacity-Aware Objective
Cost-only dispatch is indifferent to when power is drawn as long as the monetary result is optimal, which concentrates charging in the cheapest hours. To represent connection-capacity limits and demand charges, we extend the objective with a peak term. A daily peak variable
pk bounds the grid import in every hour:
and the capacity-aware objective augments the energy cost with the priced peak:
where
C denotes the energy-cost objective of (1)—with the community flows of (8) in the coordinated regime, in which case the peak variable bounds the community import
Gimp,t instead of the site-level import—and
ccap is the capacity rate.
We use an illustrative capacity-rate parameter of 0.35 EUR/kW per day, rate-equivalent to approximately 10.6 EUR/kW per month. Capacity-based per-kW components are a standard element of European distribution-tariff design [
12]; the numerical rate used here is a scenario parameter and is not intended to reproduce a specific regulated tariff. The daily peak penalty is likewise a modeling proxy;
Section 4.5 therefore prices the resulting schedules ex post under both daily and equivalent monthly billing, and extending the optimization itself to rolling monthly demand charges is identified as future work in
Section 5. In the coordinated regime, the peak variable applies to the community import; in the independent regime, each site limits its own peak. All four combinations (independent/coordinated × cost-only/capacity-aware) are evaluated for both locations.
3.6. Scenarios and Indicators
Six configurations are compared per location: grid-only (loads supplied entirely from the grid, no PV revenue), PV-only (PV with negative-price curtailment but no storage), and PV with storage under the four dispatch variants. The evaluation indicators are the net annual energy cost (imports minus export revenue; negative values denote net income), reported separately from capacity charges, which are proportional to the peak; the PV self-consumption ratio SC, defined as the share of PV generation used within the community (one minus exported over generated energy); the self-sufficiency ratio SS, defined as the share of the consuming sites’ demand covered without grid import; the coincident peak community grid import; curtailed PV energy; and the equivalent full battery cycles, computed as total discharged energy divided by battery capacity. Because grid charging is permitted in the base case, SC is interpreted as a net-export-based accounting indicator rather than a strict physical tracing of PV-origin energy. Because the community includes a merchant plant whose business is to export, a low community self-consumption ratio is a structural feature rather than an inefficiency, and we interpret SC accordingly.