Optimization runs no without throwing errors - but I always get Status: Infeasible
stdout: "HTTP/1.1 201 CREATED\r\nContent-Length: 45\r\nContent-Type: text/html; charset=utf-8\r\nDate: Fri, 19 Jul 2024 13:29:37 GMT\r\nServer: waitress\r\n\r\nEMHASS >> Action dayahead-optim executed..."
stderr: "% Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r100 236 0 0 100 236 0 196 0:00:01 0:00:01 --:--:-- 196\r100 236 0 0 100 236 0 107 0:00:02 0:00:02 --:--:-- 107\r100 236 0 0 100 236 0 73 0:00:03 0:00:03 --:--:-- 73\r100 236 0 0 100 236 0 56 0:00:04 0:00:04 --:--:-- 56\r100 236 0 0 100 236 0 45 0:00:05 0:00:05 --:--:-- 45\r100 236 0 0 100 236 0 38 0:00:06 0:00:06 --:--:-- 0\r100 236 0 0 100 236 0 32 0:00:07 0:00:07 --:--:-- 0\r100 236 0 0 100 236 0 28 0:00:08 0:00:08 --:--:-- 0\r100 236 0 0 100 236 0 25 0:00:09 0:00:09 --:--:-- 0\r100 236 0 0 100 236 0 23 0:00:10 0:00:10 --:--:-- 0\r100 236 0 0 100 236 0 21 0:00:11 0:00:11 --:--:-- 0\r100 236 0 0 100 236 0 19 0:00:12 0:00:12 --:--:-- 0\r100 236 0 0 100 236 0 17 0:00:13 0:00:13 --:--:-- 0\r100 236 0 0 100 236 0 16 0:00:14 0:00:14 --:--:-- 0\r100 236 0 0 100 236 0 15 0:00:15 0:00:15 --:--:-- 0\r100 281 100 45 100 236 2 14 0:00:22 0:00:16 0:00:06 9\r100 281 100 45 100 236 2 14 0:00:22 0:00:16 0:00:06 11"
returncode: 0
2024-07-19 15:28:29,984 - web_server - INFO - Status: Infeasible
2024-07-19 15:28:29,985 - web_server - INFO - Total value of the Cost function = -1629.64
2024-07-19 15:29:37,175 - web_server - INFO - Passed runtime parameters: {'load_cost_forecast': [0.24352, 0.26881, 0.28493, 0.30191, 0.33691, 0.41955, 0.3357, 0.32006, 0.30184, 0.30563, 0.2993, 0.29792, 0.29986, 0.30504, 0.30452, 0.30177, 0.29523, 0.27406, 0.25216, 0.19903, 0.1929, 0.18737, 0.18779, 0.18947]}
2024-07-19 15:29:37,175 - web_server - INFO - >> Setting input data dict
2024-07-19 15:29:37,176 - web_server - INFO - Setting up needed data
2024-07-19 15:29:37,182 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2024-07-19 15:29:39,656 - web_server - INFO - Retrieving data from hass for load forecast using method = naive
2024-07-19 15:29:39,657 - web_server - INFO - Retrieve hass get data method initiated...
2024-07-19 15:29:52,322 - web_server - INFO - >> Performing dayahead optimization...
2024-07-19 15:29:52,323 - web_server - INFO - Performing day-ahead forecast optimization
2024-07-19 15:29:52,344 - web_server - INFO - Perform optimization for the day-ahead
2024-07-19 15:29:52,639 - web_server - WARNING - Solver default unknown, using default
Welcome to the CBC MILP Solver
Version: 2.10.3
Build Date: Dec 15 2019
command line - /usr/local/lib/python3.11/dist-packages/pulp/solverdir/cbc/linux/64/cbc /tmp/6e13cd391afd49f7a3780c36b519bc9e-pulp.mps -max -timeMode elapsed -branch -printingOptions all -solution /tmp/6e13cd391afd49f7a3780c36b519bc9e-pulp.sol (default strategy 1)
At line 2 NAME MODEL
At line 3 ROWS
At line 693 COLUMNS
At line 4117 RHS
At line 4806 BOUNDS
At line 5311 ENDATA
Problem MODEL has 688 rows, 480 columns and 2847 elements
Coin0008I MODEL read with 0 errors
Option for timeMode changed from cpu to elapsed
Problem is infeasible - 0.01 seconds
Option for printingOptions changed from normal to all
Total time (CPU seconds): 0.02 (Wallclock seconds): 0.02
2024-07-19 15:29:52,837 - web_server - INFO - Status: Infeasible
2024-07-19 15:29:52,838 - web_server - INFO - Total value of the Cost function = -1629.64
Last run optimization results table
index P_PV P_Load P_deferrable0 P_deferrable1 P_deferrable2 P_grid_pos P_grid_neg P_grid P_batt SOC_opt P_hybrid_inverter unit_load_cost unit_prod_price cost_profit cost_fun_selfcons
2024-07-19 15:00:00+02:00 6191 1098 0 0 0 1223 0 1223 -6315 1.000 -124 0.244 0.074 -0.298 -0.298
2024-07-19 16:00:00+02:00 5283 1090 2500 1000 2500 1807 0 1807 0 1.000 5283 0.269 0.074 -0.486 -0.486
2024-07-19 17:00:00+02:00 4418 1303 1200 0 1913 0 0 0 0 1.000 4418 0.285 0.074 -0.000 -0.000
2024-07-19 18:00:00+02:00 2855 1665 0 1000 188 0 0 0 0 1.000 2855 0.302 0.074 -0.000 -0.000
2024-07-19 19:00:00+02:00 1703 1304 1 0 397 0 0 0 0 1.000 1703 0.337 0.074 -0.000 -0.000
2024-07-19 20:00:00+02:00 588 952 0 0 0 0 0 0 364 0.974 952 0.420 0.074 -0.000 -0.000
2024-07-19 21:00:00+02:00 -4 2313 0 0 0 0 0 0 2317 0.812 2313 0.336 0.074 -0.000 -0.000
2024-07-19 22:00:00+02:00 -4 1013 0 0 0 0 0 0 1017 0.740 1013 0.320 0.074 -0.000 -0.000
2024-07-19 23:00:00+02:00 -4 1050 0 0 0 0 0 0 1054 0.666 1050 0.302 0.074 -0.000 -0.000
2024-07-20 00:00:00+02:00 -4 1051 0 0 0 0 0 0 1055 0.592 1051 0.306 0.074 -0.000 -0.000
2024-07-20 01:00:00+02:00 -4 1016 0 0 0 0 0 0 1020 0.521 1016 0.299 0.074 -0.000 -0.000
2024-07-20 02:00:00+02:00 -4 1045 0 0 0 233 0 233 816 0.463 812 0.298 0.074 -0.070 -0.070
2024-07-20 03:00:00+02:00 -4 1143 0 0 0 0 0 0 1147 0.383 1143 0.300 0.074 -0.000 -0.000
2024-07-20 04:00:00+02:00 -4 1241 0 0 0 0 0 0 1245 0.295 1241 0.305 0.074 -0.000 -0.000
2024-07-20 05:00:00+02:00 -4 1339 0 0 0 0 0 0 1343 0.201 1339 0.305 0.074 -0.000 -0.000
2024-07-20 06:00:00+02:00 -4 1437 0 0 0 0 0 0 1441 0.100 1437 0.302 0.074 -0.000 -0.000
2024-07-20 07:00:00+02:00 1404 1535 0 0 0 131 0 131 0 0.100 1404 0.295 0.074 -0.039 -0.039
2024-07-20 08:00:00+02:00 3726 1633 1297 998 2500 2703 0 2703 0 0.100 3726 0.274 0.074 -0.741 -0.741
2024-07-20 09:00:00+02:00 5592 1731 0 0 0 0 -3861 -3861 0 0.100 5592 0.252 0.074 0.287 0.287
2024-07-20 10:00:00+02:00 10072 1829 0 0 0 0 -8243 -8243 0 0.100 10072 0.199 0.074 0.613 0.613
2024-07-20 11:00:00+02:00 11770 1927 0 0 0 0 -9843 -9843 0 0.100 11770 0.193 0.074 0.732 0.732
2024-07-20 12:00:00+02:00 13164 2025 0 0 0 0 -11138 -11138 0 0.100 13164 0.187 0.074 0.829 0.829
2024-07-20 13:00:00+02:00 13954 2123 0 0 0 0 -11830 -11830 0 0.100 13954 0.188 0.074 0.880 0.880
2024-07-20 14:00:00+02:00 13596 3555 0 0 0 0 -2146 -2146 -7894 0.600 5701 0.189 0.074 0.160 0.160
Summary table for latest optimization results
Variable Value
cost_profit 1.867
cost_fun_selfcons 1.867
optim_status Infeasible
Is this result to be expected or am I doing something wrong?
shell_command:
dayahead_optim: 'curl -i -H "Content-Type:application/json" -X POST -d ''{"load_cost_forecast":{{((state_attr(''sensor.nordpool_tibber_de_price_day_ahead'', ''raw_today'') | map(attribute=''value'') | list + state_attr(''sensor.nordpool_tibber_de_price_day_ahead'', ''raw_tomorrow'') | map(attribute=''value'') | list))[now().hour:][:24] }}}'' http://localhost:5000/action/dayahead-optim'
perfect_optim: 'curl -i -H "Content-Type:application/json" -X POST -d ''{"load_cost_forecast":{{((state_attr(''sensor.nordpool_tibber_de_price_day_ahead'', ''raw_today'') | map(attribute=''value'') | list + state_attr(''sensor.nordpool_tibber_de_price_day_ahead'', ''raw_tomorrow'') | map(attribute=''value'') | list))[now().hour:][:24] }}}'' http://localhost:5000/action/perfect-optim'
publish_data: 'curl -i -H "Content-Type:application/json" -X POST -d ''{}'' http://localhost:5000/action/publish-data'
logging_level: INFO
data_path: /share/
costfun: self-consumption
sensor_power_photovoltaics: sensor.wr_deye_1_pv_power
sensor_power_load_no_var_loads: sensor.power_load_no_var_loads
set_total_pv_sell: false
set_nocharge_from_grid: false
set_nodischarge_to_grid: true
maximum_power_from_grid: 65000
maximum_power_to_grid: 20000
number_of_deferrable_loads: 3
list_nominal_power_of_deferrable_loads:
- nominal_power_of_deferrable_loads: 2500
- nominal_power_of_deferrable_loads: 1000
- nominal_power_of_deferrable_loads: 2500
list_operating_hours_of_each_deferrable_load:
- operating_hours_of_each_deferrable_load: 2
- operating_hours_of_each_deferrable_load: 3
- operating_hours_of_each_deferrable_load: 3
list_start_timesteps_of_each_deferrable_load:
- start_timesteps_of_each_deferrable_load: 1
- start_timesteps_of_each_deferrable_load: 1
- start_timesteps_of_each_deferrable_load: 1
list_end_timesteps_of_each_deferrable_load:
- end_timesteps_of_each_deferrable_load: 18
- end_timesteps_of_each_deferrable_load: 18
- end_timesteps_of_each_deferrable_load: 18
list_peak_hours_periods_start_hours:
- peak_hours_periods_start_hours: "05:00"
- peak_hours_periods_start_hours: "18:00"
list_peak_hours_periods_end_hours:
- peak_hours_periods_end_hours: "10:00"
- peak_hours_periods_end_hours: "03:00"
list_treat_deferrable_load_as_semi_cont:
- treat_deferrable_load_as_semi_cont: true
- treat_deferrable_load_as_semi_cont: true
- treat_deferrable_load_as_semi_cont: true
list_set_deferrable_load_single_constant:
- set_deferrable_load_single_constant: true
- set_deferrable_load_single_constant: true
- set_deferrable_load_single_constant: true
list_set_deferrable_startup_penalty:
- set_deferrable_startup_penalty: 0
- set_deferrable_startup_penalty: 0
- set_deferrable_startup_penalty: 0
load_peak_hours_cost: 0.37
load_offpeak_hours_cost: 0.179
photovoltaic_production_sell_price: 0.0744
list_pv_module_model:
- pv_module_model: Risen_Energy_Co__Ltd__RSM144_7_430BMDG
- pv_module_model: Risen_Energy_Co__Ltd__RSM144_7_430BMDG
- pv_module_model: Risen_Energy_Co__Ltd__RSM144_7_430BMDG
- pv_module_model: Risen_Energy_Co__Ltd__RSM144_7_430BMDG
list_pv_inverter_model:
- pv_inverter_model: Ginlong_Technologies_Co___Ltd___RHI_1P10K_HVES_5G__240V_
- pv_inverter_model: Ginlong_Technologies_Co___Ltd___RHI_1P10K_HVES_5G__240V_
- pv_inverter_model: Ginlong_Technologies_Co___Ltd___RHI_1P10K_HVES_5G__240V_
- pv_inverter_model: Ginlong_Technologies_Co___Ltd___RHI_1P10K_HVES_5G__240V_
list_surface_tilt:
- surface_tilt: 41
- surface_tilt: 41
- surface_tilt: 41
- surface_tilt: 32
list_surface_azimuth:
- surface_azimuth: 107
- surface_azimuth: 287
- surface_azimuth: 107
- surface_azimuth: 287
list_modules_per_string:
- modules_per_string: 18
- modules_per_string: 16
- modules_per_string: 12
- modules_per_string: 12
list_strings_per_inverter:
- strings_per_inverter: 1
- strings_per_inverter: 1
- strings_per_inverter: 1
- strings_per_inverter: 1
inverter_is_hybrid: true
compute_curtailment: false
set_use_battery: true
battery_nominal_energy_capacity: 15000
method_ts_round: first
continual_publish: true
battery_discharge_power_max: 10000
battery_charge_power_max: 10000
battery_minimum_state_of_charge: 0.1
battery_maximum_state_of_charge: 1
time_zone: Europe/Berlin
prod_price_forecast_method: constant
days_to_retrieve: 7
freq: 60
optimization_time_step: 60