TARIFF-30: per-unit round-trip efficiency in the grid-charge decisions
Optional per-inverter key round_trip_eff (0.5-1). A unit's buy leg is priced at price / eta; the site trade, battery modes, day plan and Home use each unit's own. Not set: byte-identical to before. The discharge split is unchanged (part B is TARIFF-34). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -512,7 +512,14 @@ class CycleMixin:
|
||||
self._peak_proj)
|
||||
if site_trade:
|
||||
floor_pct, ceiling_pct = arbitrage.soc_bounds(self.o)
|
||||
charge_w, discharge_w = self.trade_power_w(floor_pct, ceiling_pct)
|
||||
# TARIFF-30. WHOSE OWN BUY LEG CLEARS (None: no efficiency is set,
|
||||
# which is today's behaviour exactly). The buy is sized to those
|
||||
# units alone; the others are held out of it below.
|
||||
legs = (self.charge_legs(self.fresh_tariff_plan(now), now)
|
||||
if any(e is not None for e in self.unit_etas().values())
|
||||
else None)
|
||||
charge_w, discharge_w = self.trade_power_w(floor_pct, ceiling_pct,
|
||||
legs)
|
||||
self.arb = arbitrage.decide(
|
||||
self.fresh_tariff_plan(now), now,
|
||||
peak_guard_active=arbitrage.guard_state(self.peak_guard),
|
||||
@@ -539,6 +546,9 @@ class CycleMixin:
|
||||
# it. (DECISIONS/MAIN-orchestration-archive.md)
|
||||
charge_w=charge_w, discharge_w=discharge_w,
|
||||
soc_floor_pct=floor_pct, soc_ceiling_pct=ceiling_pct)
|
||||
if legs is not None or self._lossy_hold[0]:
|
||||
self._hold_out_lossy(claims, maint_results, legs, charge_w,
|
||||
discharge_w, floor_pct, ceiling_pct, now)
|
||||
# SITE, and arbitrage.claim() says so on the object it builds. It
|
||||
# buys and sells at the grid against a day-ahead price: the price is
|
||||
# a property of the connection and the energy crosses the meter.
|
||||
|
||||
Reference in New Issue
Block a user