@@ -321,6 +321,9 @@ def simple_scenario(
321321 iboost_enable = False ,
322322 iboost_on_discharge = False ,
323323 iboost_prevent_discharge = False ,
324+ assert_iboost_running = False ,
325+ assert_iboost_running_solar = False ,
326+ assert_iboost_running_full = False ,
324327):
325328 """
326329 No PV, No Load
@@ -462,6 +465,15 @@ def simple_scenario(
462465 if abs (metric_keep - assert_keep ) >= 0.1 :
463466 print ("ERROR: Metric keep {} should be {}" .format (metric_keep , assert_keep ))
464467 failed = True
468+ if assert_iboost_running != prediction .iboost_running :
469+ print ("ERROR: iBoost running should be {}" .format (assert_iboost_running ))
470+ failed = True
471+ if assert_iboost_running_solar != prediction .iboost_running_solar :
472+ print ("ERROR: iBoost running solar should be {}" .format (assert_iboost_running_solar ))
473+ failed = True
474+ if assert_iboost_running_full != prediction .iboost_running_full :
475+ print ("ERROR: iBoost running full should be {}" .format (assert_iboost_running_full ))
476+ failed = True
465477
466478 if failed :
467479 prediction .run_prediction (charge_limit_best , charge_window_best , discharge_window_best , discharge_limit_best , pv10 , end_record = (my_predbat .end_record ), save = "test" )
@@ -1636,7 +1648,18 @@ def run_model_tests(my_predbat):
16361648 inverter_limit = 2.0 ,
16371649 )
16381650 failed |= simple_scenario (
1639- "iboost_pv" , my_predbat , 0 , 1 , assert_final_metric = 0 , assert_final_soc = 0 , with_battery = False , iboost_enable = True , iboost_solar = True , assert_final_iboost = 24
1651+ "iboost_pv" ,
1652+ my_predbat ,
1653+ 0 ,
1654+ 1 ,
1655+ assert_final_metric = 0 ,
1656+ assert_final_soc = 0 ,
1657+ with_battery = False ,
1658+ iboost_enable = True ,
1659+ iboost_solar = True ,
1660+ assert_final_iboost = 24 ,
1661+ assert_iboost_running = True ,
1662+ assert_iboost_running_solar = True ,
16401663 )
16411664 failed |= simple_scenario (
16421665 "iboost_gas1" ,
@@ -1668,6 +1691,8 @@ def run_model_tests(my_predbat):
16681691 iboost_charging = False ,
16691692 export_limit = 10 ,
16701693 assert_final_iboost = 200 ,
1694+ assert_iboost_running = True ,
1695+ assert_iboost_running_full = True ,
16711696 )
16721697 failed |= simple_scenario (
16731698 "iboost_gas3" ,
@@ -1700,6 +1725,8 @@ def run_model_tests(my_predbat):
17001725 iboost_charging = False ,
17011726 export_limit = 10 ,
17021727 assert_final_iboost = 200 ,
1728+ assert_iboost_running = True ,
1729+ assert_iboost_running_full = True ,
17031730 )
17041731 failed |= simple_scenario (
17051732 "iboost_rate1" ,
@@ -1728,6 +1755,8 @@ def run_model_tests(my_predbat):
17281755 iboost_charging = False ,
17291756 export_limit = 10 ,
17301757 assert_final_iboost = 200 ,
1758+ assert_iboost_running = True ,
1759+ assert_iboost_running_full = True ,
17311760 )
17321761 failed |= simple_scenario (
17331762 "iboost_rate3" ,
@@ -1742,6 +1771,8 @@ def run_model_tests(my_predbat):
17421771 iboost_charging = False ,
17431772 export_limit = 10 ,
17441773 assert_final_iboost = 200 ,
1774+ assert_iboost_running = True ,
1775+ assert_iboost_running_full = True ,
17451776 )
17461777 failed |= simple_scenario (
17471778 "iboost_rate3" ,
@@ -1772,6 +1803,8 @@ def run_model_tests(my_predbat):
17721803 assert_final_iboost = 12 ,
17731804 charge_period_divide = 2 ,
17741805 export_limit = 1 ,
1806+ assert_iboost_running = True ,
1807+ assert_iboost_running_full = True ,
17751808 )
17761809 failed |= simple_scenario (
17771810 "iboost_charge2" ,
@@ -1787,6 +1820,8 @@ def run_model_tests(my_predbat):
17871820 iboost_charging = True ,
17881821 assert_final_iboost = 100 ,
17891822 end_record = 12 * 60 ,
1823+ assert_iboost_running = True ,
1824+ assert_iboost_running_full = True ,
17901825 )
17911826 failed |= simple_scenario (
17921827 "iboost_charge3" ,
@@ -1803,6 +1838,8 @@ def run_model_tests(my_predbat):
18031838 iboost_charging = True ,
18041839 assert_final_iboost = 100 ,
18051840 end_record = 12 * 60 ,
1841+ assert_iboost_running = True ,
1842+ assert_iboost_running_full = True ,
18061843 )
18071844 failed |= simple_scenario (
18081845 "iboost_charge4" ,
@@ -1865,6 +1902,8 @@ def run_model_tests(my_predbat):
18651902 iboost_on_discharge = True ,
18661903 export_limit = 1 ,
18671904 assert_final_iboost = 24 ,
1905+ assert_iboost_running = True ,
1906+ assert_iboost_running_full = True ,
18681907 )
18691908 failed |= simple_scenario (
18701909 "iboost_prevent_discharge1" ,
@@ -1881,6 +1920,8 @@ def run_model_tests(my_predbat):
18811920 iboost_prevent_discharge = False ,
18821921 export_limit = 1 ,
18831922 assert_final_iboost = 24 ,
1923+ assert_iboost_running = True ,
1924+ assert_iboost_running_full = True ,
18841925 )
18851926 failed |= simple_scenario (
18861927 "iboost_prevent_discharge2" ,
@@ -1897,6 +1938,8 @@ def run_model_tests(my_predbat):
18971938 iboost_prevent_discharge = True ,
18981939 export_limit = 1 ,
18991940 assert_final_iboost = 24 ,
1941+ assert_iboost_running = True ,
1942+ assert_iboost_running_full = True ,
19001943 )
19011944 failed |= simple_scenario (
19021945 "keep_discharge1" ,
@@ -1928,6 +1971,8 @@ def run_model_tests(my_predbat):
19281971 iboost_rate_threshold = import_rate ,
19291972 iboost_charging = False ,
19301973 assert_final_iboost = 120 ,
1974+ assert_iboost_running = True ,
1975+ assert_iboost_running_full = True ,
19311976 )
19321977 failed |= simple_scenario (
19331978 "iboost_rate_pv1" ,
@@ -1943,6 +1988,8 @@ def run_model_tests(my_predbat):
19431988 iboost_charging = False ,
19441989 assert_final_iboost = 12 ,
19451990 export_limit = 1 ,
1991+ assert_iboost_running = True ,
1992+ assert_iboost_running_solar = True ,
19461993 )
19471994 failed |= simple_scenario (
19481995 "iboost_rate_pv2" ,
@@ -1958,6 +2005,8 @@ def run_model_tests(my_predbat):
19582005 iboost_charging = False ,
19592006 assert_final_iboost = 12 * 1 ,
19602007 export_limit = 2 ,
2008+ assert_iboost_running = True ,
2009+ assert_iboost_running_solar = True ,
19612010 )
19622011 failed |= simple_scenario (
19632012 "iboost_rate_pv3" ,
@@ -1973,6 +2022,8 @@ def run_model_tests(my_predbat):
19732022 iboost_charging = False ,
19742023 assert_final_iboost = 12 * 2 ,
19752024 export_limit = 2 ,
2025+ assert_iboost_running = True ,
2026+ assert_iboost_running_solar = True ,
19762027 )
19772028
19782029 if failed :
0 commit comments