-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forecast not being generated when horizon longer than 48h #1245
Comments
Potential fixThank you for taking the time to write a clear issue. I believe your problem has to do with the belief time of your actuals. Could you try adding the actuals using:
and then run the forecaster again? ExplanationIn your last screenshot it became clear to me that your actuals have currently been recorded with the belief time set to the moment at which you ran the CLI command. Subsequently, the forecaster will ignore any data that shouldn't be considered to have been known at the time of creating the 5-day forecast. The |
@Flix6x if to-date - horizon < last_actual_data_date In fact the longer/larger horizon the further back in time data is used for the forecast, assuming the to-date stays the same. |
Hello @devansh287, can you help clear up something. i'm noticing that in the second picture the This might lead me to consider that maybe there was a mix-up between old values on that sensor. because if you use the command on a fresh sensor: the result would be: So can you try again with a new sensor and see if the same error persists. |
Appreciate your response, @BelhsanHmida. I did try what you suggested, but I am still not getting the desired forecast. Here is a snapshot of the sensor's csv. As you can see, the belief time is off by one day for the actuals. I am also attaching some additional messages I got from the worker log when it claimed that the forecast was generated:
Hope this is helpful. |
Hello @devansh287 , thanks for the detailed response. just wanted to let you know this currently being looked into. |
Hello @devansh287, |
Dear @BelhsanHmida, |
Thanks for the kind words @devansh287 – I appreciate it, and I wish the same for you! I'm glad to hear the issue is still relevant. As for the fix, it's difficult to estimate since we've traced the issue to the |
@BelhsanHmida, we want to do a 30-day forecast. Is there anything we can do to help? |
Hi @devansh287 we're trying to find time for this again this week, meaning to find out why lags are not properly created in the timetomodel package - or in the collaboration of FlexMeasures code in Hopefully this would be an easy fix once we find out where it is going wrong. In the meantime we are working on a new implementation of the way FlexMeasures makes forecasts, but that will not be released very soon - we're testing it for simulations, and then will implement it for use in FlexMeasures directly. Do you believe a 30-day forecast will be very useful? |
Hi @nhoening, Thank you for your continued efforts on this issue. To clarify our use case, our sensor operates with a daily resolution, not hourly. As a result, any forecasts involving this sensor will inherently span multiple days. With the introduction of peak power tariffs, the ability to forecast daily peak power consumption over a 30-day period will be particularly valuable for planning and cost optimization. Looking forward to your thoughts on this and any guidance you can provide on potential next steps. |
Hello @devansh287, We managed to trace the issue to
This results in missing values in the DataFrame passed for creating lags, ultimately leading to Solution: Steps to Reproduce:
Outcome: Note: For 30-day forecasting, more testing is needed as it's currently not stable. However, I suggest
Hope this message is of help, and I look forward to making the 30-day forecast work correctly! |
My goal is to make a forecast with a horizon of five days. However, that is not being generated even though the log claims that it is generated. You can reproduce the steps given below to arrive at the problem situation.
Steps taken so far
I edited the list of acceptable horizons in
supported_horizons()
function inflexmeasures/utils/time_utils.py
to include 5 days.I also modified the cli verification in the
create_forecasts
function inflexmeasures/cli/data_add.py
and added support for 5 days (which is 120 hours).I added a sensor with a daily resolution. You can put in the
asset_id
of any asset that you have createdflexmeasures add sensor --name 'grid' --unit kW --event-resolution 'P1D' --timezone 'UTC' --asset <asset_id> --attributes '{"capacity_in_mw": 0.5}
Load the following data into a csv.
Add the csv data to the sensor. Please replace
sensor_id
with the id that you get when you create the sensor.flexmeasures add beliefs --sensor <sensor_id> --source 'actuals' sensor_data_full_utc.csv --timezone 'UTC'
As you can see in the csv, we have actuals till November 14th. Lets try making a forecast for Nov 19th, which we should be able to do since our horizon has been expanded to five days.
flexmeasures add forecasts --sensor <sensor_id> --from-date '2024-11-19' --to-date '2024-11-19' --horizon 120 --as-job
This is what we get in the log:
However, as we can see in the screenshot, no forecast has actually been made.
I tried downloading the data as a csv, and it does show a belief for Nov 19th, but the value is empty.
Note: the values are all shifted by five hours and thirty minutes as I am in India, which is UTC+5:30.
Is there a misconfiguration preventing the 5-day forecast from being generated/saved properly? Are additional modifications required to support a 5-day horizon beyond supported_horizons() and CLI verification?
The text was updated successfully, but these errors were encountered: