Skip to content
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

Suggestion for ps-strategy-lowest-price, Schedule not calculated #195

Open
CirruZZ opened this issue Dec 15, 2023 · 6 comments
Open

Suggestion for ps-strategy-lowest-price, Schedule not calculated #195

CirruZZ opened this issue Dec 15, 2023 · 6 comments
Labels
answerred Assume this is done. Should be closed by issuer. invalid This doesn't seem right

Comments

@CirruZZ
Copy link

CirruZZ commented Dec 15, 2023

The document states this regarding Schedule not calculated

If you select a period for example from 10:00 to 02:00, it may not be possible to calculate before the period starts. This is because electricity prices for the next day (in the Nord Pool area) normally are received around 13:00. The node cannot calculate the period until it has price data for the whole period.

I would suggest that it should try to get a schedule based on the precis it receives even if it is commanded to get lowest prices for a temaperiod that isn't complet with price data.

Example
Price data for 00-24 is given
Timeperiod asked for lowest price 18-04
Runtime 10:00

Today it gives Schedule not calculated

Why not just instead give lowest price for just 18-00?

@krispek
Copy link

krispek commented Jan 2, 2024

I agree on this, based on a different use case. I would like to charge my EV at night, somewhere between 18:00 and 6:00. This leads to the following config:

fromTime: 18
toTime: 6
hoursOn: "4"
maxPrice: null
doNotSplit: false
sendCurrentValueWhenRescheduling: true
outputIfNoSchedule: false
outputOutsidePeriod: false
outputValueForOn: 0
outputValueForOff: 1
outputValueForOntype: "num"
outputValueForOfftype: "num"
override: "auto"
contextStorage: "file"
hasChanged: true

But this one does not work after midnight, since not all the price data is known.

@ottopaulsen
Copy link
Owner

@krispek It should work by 18:00 if you receive prices around 13:00, so I cannot see that you actually have a problem there.

@CirruZZ Your suggestion raises some logical challenges.
Let us say you ask for 2 hours on between 10:00 and 02:00. You haven't gotten any prices for next day, but for the current day, the cheapest hours are from 10:00 to 12:00, so you turn them on. Then at 13:00 you get prices for the next day, and from 00:00 to 02:00 it is even cheaper. What should you do then? Turn on another 2 hours? No, that would be wrong. Do not turn on? Then you didn't get the 2 cheapest hours, so that is also wrong. I guess I will meet multiple such dilemmas if I start coding this feature, and of course, they could probably be solved by giving the user even more options to choose from, but then it is starting getting really complex, opening for misuse, misunderstanding and bugs, so no, I am sorry, I will not implement this feature, at least not yet.

@krispek
Copy link

krispek commented Jan 5, 2024

I checked my own flow again and found a bug indeed. My mistake. :)

@CirruZZ
Copy link
Author

CirruZZ commented Jan 5, 2024

Your suggestion raises some logical challenges. Let us say you ask for 2 hours on between 10:00 and 02:00. You haven't gotten any prices for next day, but for the current day, the cheapest hours are from 10:00 to 12:00, so you turn them on.

This is what I suggest.

Then at 13:00 you get prices for the next day, and from 00:00 to 02:00 it is even cheaper. What should you do then? Turn on another 2 hours? No, that would be wrong. Do not turn on? Then you didn't get the 2 cheapest hours, so that is also wrong.

Nothing should happen, just keep the previous schedule as is. If the user wants a updated schedule the a new request for a schedule should be run when the new prices is available.

I guess I will meet multiple such dilemmas if I start coding this feature, and of course, they could probably be solved by giving the user even more options to choose from, but then it is starting getting really complex, opening for misuse, misunderstanding and bugs, so no, I am sorry, I will not implement this feature, at least not yet.

I see no reason to overcomplicate it, no more logic needed. Just "work with what you have" regarding the prices.

If some other feature, then previous stated, could be considered is some information to the user that the prices given isn't complet for the requested periods, maybe a status message? But this is just a idea, no need realy.

@ottopaulsen
Copy link
Owner

Your suggestion will break the whole concept with the Lowest Price strategy. If I implement what you suggest, the node will no longer find the lowest price in the selected period.

@ottopaulsen ottopaulsen added invalid This doesn't seem right answerred Assume this is done. Should be closed by issuer. labels Jan 5, 2024
@CirruZZ
Copy link
Author

CirruZZ commented Jan 5, 2024

I do not agree. The node would still work as it should, just that it doesn't have all the priceinformation available, and therefore try to make the best of the situation.

If the user does not provide the node with enough information to solve the task, it should be up to the user to take responsibility for that, and also realize that the node cant guess the future.

That's how I see it ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answerred Assume this is done. Should be closed by issuer. invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants