Discharge Strategy
The Discharge strategy discharges the battery at maximum power until MinStateOfCharge is reached, then holds it at Idle until the strategy changes.
How It Works
For common behaviour shared by all strategies (mode gate, SoC guard, base class helpers), see the Strategies overview.
Each time the strategy fires it runs through this pipeline:
The strategy reads the current battery status, checks a single condition, and dispatches one of two setpoints:
- SoC above
MinStateOfCharge- discharges atMaxDischargePower. The battery provides as much power as the device can deliver up to the configured limit. - SoC at or below
MinStateOfCharge- sends an Idle setpoint (0 W). This actively stops any ongoing discharge rather than simply doing nothing, ensuring the device transitions out of any previous discharge state.
There is no ramping, rate limiting, or feedback loop. The strategy runs the battery at full discharge rate until the floor is hit.
Configuration
The Discharge strategy reads two values from BatteryConfiguration. Both are set per battery asset in the platform database and loaded on every control cycle via GetBatteryConfiguration.
| Parameter | Description |
|---|---|
MinStateOfCharge | Lower SoC limit (%). Discharging stops and Idle is commanded once this is reached. |
MaxDischargePower | Maximum discharge rate (W) sent as the setpoint while discharging. |
There are no strategy-specific tuning parameters - the Discharge strategy has no deadband, rate limit, or quantization step of its own.
Behaviour Tests
Gateway mode gating is covered by GatewayModeBehaviorTests - see Strategies overview.
No dedicated tests
DischargeStrategy does not yet have dedicated unit or integration tests. The SoC guard and setpoint dispatch logic are straightforward enough to be covered by integration tests against a simulated battery; the mode-gate behaviour is already covered by GatewayModeBehaviorTests.