Getting some crazy numbers, but still claiming to be optimal ;-(
Very hard to debug which constraint is causing this issue.
2024-06-23 11:56:30,195 - web_server - INFO - Passed runtime parameters: {'prod_price_forecast': [-0.02, -0.02, -0.01, -0.01, 0.08, 0.1, 0.09, 0.21, 0.24, 0.31, 0.4, 0.49, 0.53, 0.5, 0.45, 0.4, 0.4, 0.39, 0.33, 0.3, 0.27, 0.28, 0.28, 0.16, 0.15, 0.11, 0.15, 0.11, 0.11, 0.08, 0.09, 0.09], 'load_cost_forecast': [0.05, 0.05, 0.06, 0.06, 0.16, 0.18, 0.18, 0.31, 0.48, 0.56, 0.66, 0.76, 0.8, 0.77, 0.71, 0.66, 0.66, 0.65, 0.44, 0.41, 0.37, 0.39, 0.39, 0.25, 0.25, 0.2, 0.25, 0.21, 0.2, 0.17, 0.18, 0.18], 'prediction_horizon': 31, 'alpha': 0, 'beta': 1, 'soc_init': 0.578, 'def_start_timestep': [0, 0, 19], 'def_end_timestep': [0, 0, 34], 'def_total_hours': [1, 0, 6], 'soc_final': 0.08}
2024-06-23 11:56:30,196 - web_server - INFO - >> Setting input data dict
2024-06-23 11:56:30,197 - web_server - INFO - Setting up needed data
2024-06-23 11:56:30,207 - web_server - INFO - Retrieve hass get data method initiated...
2024-06-23 11:56:35,571 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2024-06-23 11:56:40,408 - web_server - INFO - Retrieving data from hass for load forecast using method = naive
2024-06-23 11:56:40,411 - web_server - INFO - Retrieve hass get data method initiated...
2024-06-23 11:56:52,887 - web_server - INFO - >> Performing naive MPC optimization...
2024-06-23 11:56:52,888 - web_server - INFO - Performing naive MPC optimization
2024-06-23 11:56:52,953 - web_server - INFO - Perform an iteration of a naive MPC controller
2024-06-23 11:56:53,137 - web_server - DEBUG - Deferrable load 0: Proposed optimization window: 0 --> 0
2024-06-23 11:56:53,138 - web_server - DEBUG - Deferrable load 0: Validated optimization window: 0 --> 0
2024-06-23 11:56:53,161 - web_server - DEBUG - Deferrable load 1: Proposed optimization window: 0 --> 0
2024-06-23 11:56:53,162 - web_server - DEBUG - Deferrable load 1: Validated optimization window: 0 --> 0
2024-06-23 11:56:53,185 - web_server - DEBUG - Deferrable load 2: Proposed optimization window: 19 --> 34
2024-06-23 11:56:53,185 - web_server - DEBUG - Deferrable load 2: Validated optimization window: 19 --> 31
2024-06-23 11:56:54,372 - web_server - INFO - Status: Optimal
2024-06-23 11:56:54,373 - web_server - INFO - Total value of the Cost function = 10251017.19
2024-06-23 11:56:55,556 - web_server - INFO - Passed runtime parameters: {'custom_unit_load_cost_id': {'entity_id': 'sensor.unit_load_cost', 'unit_of_measurement': '$/kWh', 'friendly_name': 'Load Cost'}, 'custom_unit_prod_price_id': {'entity_id': 'sensor.unit_prod_price', 'unit_of_measurement': '$/kWh', 'friendly_name': 'Prod Price'}}
2024-06-23 11:56:55,557 - web_server - INFO - >> Setting input data dict
2024-06-23 11:56:55,558 - web_server - INFO - Setting up needed data
2024-06-23 11:56:55,567 - web_server - INFO - >> Publishing data...
2024-06-23 11:56:55,567 - web_server - INFO - Publishing data to HASS instance
2024-06-23 11:56:55,655 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = 6684.58
2024-06-23 11:56:55,718 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 1017.38
2024-06-23 11:56:55,755 - web_server - INFO - Successfully posted to sensor.p_pv_curtailment = 0.0
2024-06-23 11:56:55,795 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 3600.0
2024-06-23 11:56:55,834 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2024-06-23 11:56:55,871 - web_server - INFO - Successfully posted to sensor.p_deferrable2 = 125012500000.0
2024-06-23 11:56:55,909 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 50004992000.0
2024-06-23 11:56:55,952 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = -92782642.2
2024-06-23 11:56:55,990 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = -25002494000.0
2024-06-23 11:56:56,024 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = 10251020.84
2024-06-23 11:56:56,056 - web_server - INFO - Successfully posted to sensor.optim_status = Optimal
2024-06-23 11:56:56,093 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.05
2024-06-23 11:56:56,130 - web_server - INFO - Successfully posted to sensor.unit_prod_price = -0.02
Fixed: Reduced battery_minimum_state_of_charge from 0.05 to 0 and numbers are sensible again…