Settlement Engine
Reward, penalty and discount settlement · rates set by the RL policy
RL Policy· REINFORCE-trained ratespvlib· hourly productionLoad profiles· residential / commercial / industrial
Formulas used
Hourly penalty (under-production)USER_CONFIGURABLE
penalty_hour = deficit_kWh × penalty_rate deficit_kWh = max(0, cons_kWh − prod_kWh)
penalty_rate — ₹/kWh — from RL policy or default (₹4)
Hourly bonus (over-production)USER_CONFIGURABLE
bonus_hour = surplus_kWh × bonus_rate surplus_kWh = max(0, prod_kWh − cons_kWh)
bonus_rate — ₹/kWh — from RL policy or default (₹2)
Consumer discount (self-consumption)USER_CONFIGURABLE
discount_hour = self_consumed_kWh × discount_rate self_consumed = min(prod, cons)
discount_rate — ₹/kWh — from RL policy or default (₹1)
Net owner settlementMODEL_LEARNED · RL
net_owner = total_bonus − total_penalty total_penalty = Σ deficit_kWh × penalty_rate total_bonus = Σ surplus_kWh × bonus_rate total_discount = Σ self_consumed × discount_rate
RL reward function (REINFORCE)MODEL_LEARNED
reward = Σ (bonus − penalty) − α × variance(deviation) policy π(a|s) updates via policy gradient: ∇θ J = E[∇θ log π(a|s) × G_t]
α — Risk-aversion penalty weight on deviation variance
G_t — Discounted return from time t
Provenance: MODEL_LEARNED + USER_CONFIGURABLE — Rates may come from the RL policy (REINFORCE on real irradiance data) or from configurable defaults. The settlement is a decision-support tool, not a regulatory settlement.
Penalty Rate
—/kWh
Shortfall charge
Bonus Rate
—/kWh
Surplus reward
Discount Rate
—/kWh
Consumer incentive
Policy
Default
RL rate source
No settlement run yet
Run a day settlement to see penalty, bonus and discount outcomes