Skip to content

Planner: add continuous strategy (BC)#24423

Merged
andig merged 138 commits intoevcc-io:masterfrom
iseeberg79:feature/planner-15m-singleplan
Dec 30, 2025
Merged

Planner: add continuous strategy (BC)#24423
andig merged 138 commits intoevcc-io:masterfrom
iseeberg79:feature/planner-15m-singleplan

Conversation

@iseeberg79
Copy link
Copy Markdown
Contributor

@iseeberg79 iseeberg79 commented Oct 15, 2025

Fix #24461, fix #24769, fix #24486

SinglePlan / Continuous Window Mode (optimized)

  • Creates a single continuous charging window for the required duration.
  • Chooses the window with the lowest cost.
  • preconditioning can be added at the end.
  • Ensures uninterrupted charging.

Cheapest Window / Default Mode (old)

  • Uses the cheapest combination of available slots to cover the required duration.
  • Slots do not need to be continuous.

Video

plan.webm

Screenshots
image

image image image image image

Breaking Change

The precondition / late charging feature has moved from plan level to vehicle level. This simplifies our API and UI but means that all plans of a vehicle (static&repeating) use the same precondition option now.

TODOs

  • validate performance
  • validate results
  • validate UI
  • validate repeating plans UI (long text)
  • validate repeating plans function
  • validate integration (soc-based, energy based, plan execution)
  • fix tests: mock
  • check for persisted plan settings
  • fix tests: integration (combobox)
  • double-check playwright adaptions
  • decide smallSlotDuration/smallGapDuration (and verify)
  • document api changes in openapi.yaml
  • double-check commit (e8fd4c3)
  • impact on integrators because of planner API changes

@andig andig added ux User experience/ interface backlog Things to do later tariffs Specific tariff support labels Oct 15, 2025
@naltatis
Copy link
Copy Markdown
Member

@iseeberg79 thanks for the PR. I dont think this is the right choice UI-wise. Having three knobs there is too cluttered and needs more explanation when we can provide on this small space. The "Late" Option already was a stretch that confused people.

I guess the important question is: Do we really need to have this level of control per plan? The above examples show a loadpoint plan (kWh based). We also have soc-based plans in combination with recurring plans (stored at vehicle level).

Suggestion: Make the "Planner Strategy" (Lade+Timespan? Continuous vs Cheapest?) a top level configuration that applies for all plans of this vehicle/loadpoint. This way we can simplify the actual plan items (lines). I'd see the strategy configuration collapsed by default (text that summarizes current state) and something the user can expand if we wants to make changes. Assumption being, that changing strategy is something you do less often then setting goals.

The drawback is, that the user has less granule control (late charging on Wednesdays, cheapest charging on Sundays). But I'd say this is fine.

@iseeberg79
Copy link
Copy Markdown
Contributor Author

iseeberg79 commented Oct 15, 2025

As you might have realized, I am NOT a UI designer 😀

I'd love the flexibility in the UI. What about reusing the late toggle for advanced options, defaulting to 0min preconditioning and the option to enable single slot planning?

I agree on "much options" are confusing, keep it simple.

A loadpoint setting would define a planning default which would be a great extension but from my actual point of view it's not flexible enough. But that's relative..

Initially I thought about a loadpoint setting only, but prefer the UI choice at the moment.

Best option with counterparts would be a combination within the planning logic but that's way too complex and never meets anybodies criteria.

@naltatis
Copy link
Copy Markdown
Member

I'd love the flexibility in the UI. What about reusing the late toggle for advanced options, defaulting to 0min preconditioning and the option to enable single slot planning?

Interesting idea. Let me think on this.

A loadpoint setting would define a planning default which would be a great extension

I wouldn't want to go the route of having configurable defaults and per item overwrites. That's indeed most flexible but also a hard to understand and visualize mechanism.

@iseeberg79
Copy link
Copy Markdown
Contributor Author

I read your comment once more, thought about and absolutely agree, top level configuration of planning strategy that applies to any repeating plan makes sense and simplifies.

@iseeberg79
Copy link
Copy Markdown
Contributor Author

iseeberg79 commented Oct 16, 2025

What I was thinking about: is it possible and useful to somehow integrate or visualize the loadpoint gap constraints in the UI (preview)? I'd love to try applying some kind of mask for the constraints to get visible (preview level at least). What do you think?

@naltatis
Copy link
Copy Markdown
Member

@iseeberg79 can you explain, what you mean with "visualize the loadpoint gap constraints" exactly?

@naltatis
Copy link
Copy Markdown
Member

I read your comment once more, thought about and absolutely agree, top level configuration of planning strategy that applies to any repeating plan makes sense and simplifies.

Then let's start with this. That means we need to persist and publish the planContinuous flag on loadpoint level (already done for energy based plans) and on vehicle level (valid for single plan and repeating plans).

I can offer to do the UI part here. I'd likely make this an option that's located near the preview chart so users can see its effect immediately. Since it's similar I'd also like to do this for precondition/late, but lets keep this for a dedicated followup PR to not blow up this one.

@iseeberg79
Copy link
Copy Markdown
Contributor Author

I can offer to do the UI part here. I'd likely make this an option that's located near the preview chart so users can see its effect immediately.

That would be cool.
I believe I did the required things yesterday? I copied the logic of the precondition so it's available at loadpoint and vehicle already.

@iseeberg79
Copy link
Copy Markdown
Contributor Author

@iseeberg79 can you explain, what you mean with "visualize the loadpoint gap constraints" exactly?

Let's perhaps not blow this PR up. Involved you in Slack for a full reference. At this moment just thinking about.

@iseeberg79 iseeberg79 force-pushed the feature/planner-15m-singleplan branch from 0b66689 to fff0039 Compare October 17, 2025 07:24
Comment thread core/planner/planner_continuous.go Outdated
Comment thread core/planner/planner.go
Comment thread core/planner/planner_single_test.go Outdated
Comment thread core/planner/planner_continuous.go Outdated
Comment thread core/planner/planner.go Outdated
Comment thread core/planner/planner_continuous.go Outdated
@iseeberg79
Copy link
Copy Markdown
Contributor Author

ich brauch 'ne Sekunde.. hab bei mir gerade den lokalen Stand vor dem Upload in echt durchgetestet. Du überholst micht gerade ;)

@andig andig enabled auto-merge (squash) December 30, 2025 22:39
@andig
Copy link
Copy Markdown
Member

andig commented Dec 30, 2025

All done, merging!

@andig andig merged commit 291898f into evcc-io:master Dec 30, 2025
7 checks passed
andig added a commit that referenced this pull request Dec 31, 2025
andig added a commit that referenced this pull request Dec 31, 2025
andig added a commit that referenced this pull request Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backlog Things to do later prio Priority tariffs Specific tariff support ux User experience/ interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tibber Zeitraum API Varianten implementieren Single 15 minute charging slots are skipped Begrenzung Anzahl solitärer 15 Minuten Ladungen

5 participants