Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
707441d753
|
@ -221,7 +221,10 @@ class Aggregator:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
if len(node_data) == 1:
|
||||
if len(node_data) == 0:
|
||||
# No data collected, return default AggregatedData with zeros
|
||||
return AggregatedData(0.0, 0.0, 0.0, 0.0, 0.0)
|
||||
elif len(node_data) == 1:
|
||||
# Directly use the values for a single node
|
||||
for node_number, data in node_data.items():
|
||||
min_soc = data['soc'][0] if data['soc'] else 0.0
|
||||
|
|
|
@ -226,7 +226,10 @@ class Aggregator:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
if len(node_data) == 1:
|
||||
if len(node_data) == 0:
|
||||
# No data collected, return default AggregatedData with zeros
|
||||
return AggregatedData(0.0, 0.0, 0.0, 0.0, 0.0)
|
||||
elif len(node_data) == 1:
|
||||
# Directly use the values for a single node
|
||||
for node_number, data in node_data.items():
|
||||
min_soc = data['soc'][0] if data['soc'] else 0.0
|
||||
|
|
Loading…
Reference in New Issue