@@ -890,9 +890,11 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
890
890
"active_power_exclusion_lower_bound" : - 400 ,
891
891
},
892
892
SystemBounds (
893
- now ,
894
- Bounds (Power .from_watts (- 1000 ), Power .from_watts (10000 )),
895
- Bounds (Power .from_watts (- 700 ), Power .from_watts (600 )),
893
+ timestamp = now ,
894
+ inclusion_bounds = Bounds (
895
+ Power .from_watts (- 1000 ), Power .from_watts (10000 )
896
+ ),
897
+ exclusion_bounds = Bounds (Power .from_watts (- 700 ), Power .from_watts (600 )),
896
898
),
897
899
),
898
900
# Inverter bound changed, but metric result should not change.
@@ -903,9 +905,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
903
905
"active_power_exclusion_upper_bound" : 250 ,
904
906
},
905
907
expected_result = SystemBounds (
906
- now ,
907
- None ,
908
- None ,
908
+ timestamp = now ,
909
+ inclusion_bounds = None ,
910
+ exclusion_bounds = None ,
909
911
),
910
912
wait_for_result = False ,
911
913
),
@@ -918,9 +920,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
918
920
"power_exclusion_upper_bound" : 100 ,
919
921
},
920
922
SystemBounds (
921
- now ,
922
- Bounds (Power .from_watts (- 900 ), Power .from_watts (9000 )),
923
- Bounds (Power .from_watts (- 700 ), Power .from_watts (550 )),
923
+ timestamp = now ,
924
+ inclusion_bounds = Bounds (Power .from_watts (- 900 ), Power .from_watts (9000 )),
925
+ exclusion_bounds = Bounds (Power .from_watts (- 700 ), Power .from_watts (550 )),
924
926
),
925
927
),
926
928
Scenario (
@@ -932,9 +934,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
932
934
"power_exclusion_upper_bound" : 5 ,
933
935
},
934
936
SystemBounds (
935
- now ,
936
- Bounds (Power .from_watts (- 10 ), Power .from_watts (4200 )),
937
- Bounds (Power .from_watts (- 600 ), Power .from_watts (450 )),
937
+ timestamp = now ,
938
+ inclusion_bounds = Bounds (Power .from_watts (- 10 ), Power .from_watts (4200 )),
939
+ exclusion_bounds = Bounds (Power .from_watts (- 600 ), Power .from_watts (450 )),
938
940
),
939
941
),
940
942
Scenario (
@@ -946,9 +948,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
946
948
"active_power_exclusion_upper_bound" : math .nan ,
947
949
},
948
950
SystemBounds (
949
- now ,
950
- Bounds (Power .from_watts (- 10 ), Power .from_watts (200 )),
951
- Bounds (Power .from_watts (- 200 ), Power .from_watts (200 )),
951
+ timestamp = now ,
952
+ inclusion_bounds = Bounds (Power .from_watts (- 10 ), Power .from_watts (200 )),
953
+ exclusion_bounds = Bounds (Power .from_watts (- 200 ), Power .from_watts (200 )),
952
954
),
953
955
),
954
956
Scenario (
@@ -960,9 +962,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
960
962
"power_exclusion_upper_bound" : 50 ,
961
963
},
962
964
SystemBounds (
963
- now ,
964
- None ,
965
- None ,
965
+ timestamp = now ,
966
+ inclusion_bounds = None ,
967
+ exclusion_bounds = None ,
966
968
),
967
969
),
968
970
Scenario (
@@ -974,9 +976,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
974
976
"power_exclusion_upper_bound" : 20 ,
975
977
},
976
978
SystemBounds (
977
- now ,
978
- Bounds (Power .from_watts (- 100 ), Power .from_watts (100 )),
979
- Bounds (Power .from_watts (- 70 ), Power .from_watts (70 )),
979
+ timestamp = now ,
980
+ inclusion_bounds = Bounds (Power .from_watts (- 100 ), Power .from_watts (100 )),
981
+ exclusion_bounds = Bounds (Power .from_watts (- 70 ), Power .from_watts (70 )),
980
982
),
981
983
wait_for_result = False ,
982
984
),
@@ -989,9 +991,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
989
991
"active_power_exclusion_upper_bound" : 100 ,
990
992
},
991
993
SystemBounds (
992
- now ,
993
- Bounds (Power .from_watts (- 500 ), Power .from_watts (500 )),
994
- Bounds (Power .from_watts (- 120 ), Power .from_watts (120 )),
994
+ timestamp = now ,
995
+ inclusion_bounds = Bounds (Power .from_watts (- 500 ), Power .from_watts (500 )),
996
+ exclusion_bounds = Bounds (Power .from_watts (- 120 ), Power .from_watts (120 )),
995
997
),
996
998
wait_for_result = False ,
997
999
),
@@ -1004,9 +1006,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
1004
1006
"power_exclusion_upper_bound" : 130 ,
1005
1007
},
1006
1008
SystemBounds (
1007
- now ,
1008
- Bounds (Power .from_watts (- 300 ), Power .from_watts (400 )),
1009
- Bounds (Power .from_watts (- 130 ), Power .from_watts (130 )),
1009
+ timestamp = now ,
1010
+ inclusion_bounds = Bounds (Power .from_watts (- 300 ), Power .from_watts (400 )),
1011
+ exclusion_bounds = Bounds (Power .from_watts (- 130 ), Power .from_watts (130 )),
1010
1012
),
1011
1013
),
1012
1014
Scenario (
@@ -1018,9 +1020,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
1018
1020
"active_power_exclusion_upper_bound" : 80 ,
1019
1021
},
1020
1022
SystemBounds (
1021
- now ,
1022
- Bounds (Power .from_watts (- 400 ), Power .from_watts (450 )),
1023
- Bounds (Power .from_watts (- 210 ), Power .from_watts (210 )),
1023
+ timestamp = now ,
1024
+ inclusion_bounds = Bounds (Power .from_watts (- 400 ), Power .from_watts (450 )),
1025
+ exclusion_bounds = Bounds (Power .from_watts (- 210 ), Power .from_watts (210 )),
1024
1026
),
1025
1027
),
1026
1028
]
@@ -1034,14 +1036,14 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
1034
1036
batteries_in_pool = batteries_in_pool ,
1035
1037
waiting_time_sec = waiting_time_sec ,
1036
1038
all_pool_result = SystemBounds (
1037
- now ,
1038
- Bounds (Power .from_watts (- 400 ), Power .from_watts (450 )),
1039
- Bounds (Power .from_watts (- 210 ), Power .from_watts (210 )),
1039
+ timestamp = now ,
1040
+ inclusion_bounds = Bounds (Power .from_watts (- 400 ), Power .from_watts (450 )),
1041
+ exclusion_bounds = Bounds (Power .from_watts (- 210 ), Power .from_watts (210 )),
1040
1042
),
1041
1043
only_first_battery_result = SystemBounds (
1042
- now ,
1043
- Bounds (Power .from_watts (- 100 ), Power .from_watts (50 )),
1044
- Bounds (Power .from_watts (- 80 ), Power .from_watts (80 )),
1044
+ timestamp = now ,
1045
+ inclusion_bounds = Bounds (Power .from_watts (- 100 ), Power .from_watts (50 )),
1046
+ exclusion_bounds = Bounds (Power .from_watts (- 80 ), Power .from_watts (80 )),
1045
1047
),
1046
1048
)
1047
1049
@@ -1052,9 +1054,9 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
1052
1054
compare_messages (
1053
1055
msg ,
1054
1056
SystemBounds (
1055
- now ,
1056
- Bounds (Power .from_watts (- 300 ), Power .from_watts (400 )),
1057
- Bounds (Power .from_watts (- 130 ), Power .from_watts (130 )),
1057
+ timestamp = now ,
1058
+ inclusion_bounds = Bounds (Power .from_watts (- 300 ), Power .from_watts (400 )),
1059
+ exclusion_bounds = Bounds (Power .from_watts (- 130 ), Power .from_watts (130 )),
1058
1060
),
1059
1061
0.2 ,
1060
1062
)
0 commit comments