fix: use rtc_mw as fallback for client_load when ppa_capacity is not set
- Fallback order: client_load_mw -> ppa_capacity_mw -> rtc_mw Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
48fe2129bf
commit
34a4cf7abd
1 changed files with 5 additions and 1 deletions
|
|
@ -483,10 +483,14 @@ def run_scenario(inputs: ScenarioInput) -> ScenarioResult:
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
cod_year = inputs.project.cod_year
|
||||
# Default client load to ppa_capacity if not set
|
||||
# Default client load: use client_load_mw if set, else ppa_capacity, else rtc_mw
|
||||
client_load_mw = inputs.commercial.client_load_mw
|
||||
if client_load_mw is None:
|
||||
client_load_mw = inputs.commercial.ppa_capacity_mw
|
||||
if client_load_mw is None or client_load_mw == 0:
|
||||
# Fallback to rtc_mw if available
|
||||
if inputs.rtc is not None and inputs.rtc.rtc_mw > 0:
|
||||
client_load_mw = inputs.rtc.rtc_mw
|
||||
|
||||
# Transmission + aux loss factor for client_end
|
||||
loss_factor = 1.0 - inputs.commercial.aux_consumption_pct - inputs.commercial.transmission_loss_pct - inputs.commercial.dsm_loss_pct
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue