Skip to content

Planner: latest planning on continuous mode#26295

Closed
iseeberg79 wants to merge 5 commits into
evcc-io:masterfrom
iseeberg79:fix/planner_continuous_latest
Closed

Planner: latest planning on continuous mode#26295
iseeberg79 wants to merge 5 commits into
evcc-io:masterfrom
iseeberg79:fix/planner_continuous_latest

Conversation

@iseeberg79
Copy link
Copy Markdown
Contributor

@iseeberg79 iseeberg79 commented Dec 31, 2025

small adjustments to fine-tune optimized for continuous planning

  • finalizing some discussions

Follow-up to #24423, depends on #26291.

@andig andig added the enhancement New feature or request label Dec 31, 2025
@andig
Copy link
Copy Markdown
Member

andig commented Jan 1, 2026

Schau mal, ich dachte an sowas? https://github.com/evcc-io/evcc/pull/26317/changes

@iseeberg79
Copy link
Copy Markdown
Contributor Author

iseeberg79 commented Jan 1, 2026

Verschieben ist nur nicht richtig bei günstigerem ersten Slot, darum die zusätzliche Prüfung: günstigst

@andig
Copy link
Copy Markdown
Member

andig commented Jan 1, 2026

Ahhh, jetzt macht's "klick" bei mir. Natürlich. Die Frage ist ob es überhaupt lohnt das anzupassen- wir sprechen von max. 15min und die aktuelle Lösung gibt etwas mehr Puffer (und ist einfacher). Ich würde dann zu "so lassen" tendieren?

@iseeberg79
Copy link
Copy Markdown
Contributor Author

iseeberg79 commented Jan 1, 2026

Ja, aber es sind nur ein paar Zeilen. Entweder weglassen, oder nur verschieben wenn der letzte Slot der günstigste ist fände ich begründbar. In der Regel sind die Rand-Slots noch im Rahmen günstiger möglicher Slots, aber nicht immer: da kann es blöde Ausreisser geben, aber das sind fast Grenzfälle. Genau wie es jetzt implementiert ist, ist es sehr konsistent mit dem Ansatz möglichst spät zu laden. Mir gefällt einer der Testfälle noch nicht, das ist redundant geprüft.

Comment thread core/planner/helper.go

// shift late if target slot (-1s to get containing slot) is equal or cheaper
if windowEnd.Before(targetTime) {
if SlotAt(targetTime.Add(-time.Second), rates).Value <= SlotAt(windowStart, rates).Value {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das -1s ist frickelig und den StartSlot kennst Du ohnehin (bestIndex). Da SlotAt relativ langsam ist (binary search) sollte das nicht verwendet werden.

Lass uns das einfach so lassen wie es ist. Good enough.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nicht bedacht! Ich hatte vorher den Ansatz mit der Helper Methode und berechnen des Fensters von hinten nach vorn, aber ich bin bei dir: good enough und gut begründbar. wir starten früh und im Bedarfsfall ist am Ende noch etwas Zeit bis zum Ziel übrig.

@andig andig closed this Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants