Skip to content

Commit

Permalink
bugfix: set load to zero if no loads found in island
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoderys committed Oct 14, 2024
1 parent 09dce5a commit 755831f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emf/loadflow_tool/model_merger/merge_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ def generate_merge_report(merged_model, input_models, merge_data):
island['slack_bus_region'] = ''

network_balance = {"generation_p": float(generation_by_component.loc[island['connected_component_num']].p),
"load_p": float(load_by_component.loc[island['connected_component_num']].p),
"load_p": float(load_by_component.loc[island['connected_component_num']].p) if island['connected_component_num'] in load_by_component.index else float(0),
"generation_q": float(generation_by_component.loc[island['connected_component_num']].q),
"load_q": float(load_by_component.loc[island['connected_component_num']].q),
"load_q": float(load_by_component.loc[island['connected_component_num']].q) if island['connected_component_num'] in load_by_component.index else float(0),
"buses": int(buses_by_component.loc[island['connected_component_num']]),
"branches": int(branches_by_component.loc[island['connected_component_num']]),
}
Expand Down

0 comments on commit 755831f

Please sign in to comment.