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

EMS - Load 1h -> Sub1h Probability Table for other states / Performance #272

Open
drbacke opened this issue Dec 21, 2024 · 1 comment
Open
Assignees

Comments

@drbacke
Copy link
Collaborator

drbacke commented Dec 21, 2024

EMS - Load 1h -> Sub1h Probability Table for other states (Battery ...)

  • Faster Interpolation Method
@drbacke drbacke self-assigned this Dec 21, 2024
@redmoon2711
Copy link

Hi, for a better performance you can use a lookup-table for the calculation of self consumption in inverter.py.

    def calculate_scr(self, erzeugung: float, verbrauch: float) -> float:
        """ Check if the consumption and production is in the lookup table. If not, calculate and store the value."""

        if verbrauch not in self.scr_lookup:
            self.scr_lookup[verbrauch] = {}

        if erzeugung not in self.scr_lookup[verbrauch]:
            scr = self.self_consumption_predictor.calculate_self_consumption(verbrauch, erzeugung)
            self.scr_lookup[verbrauch][erzeugung] = scr
            return scr

        return self.scr_lookup[verbrauch][erzeugung]

Self consumption is only calculated for the specified values ​​of "erzeugung" and "verbrauch". In the remaining iterations, the value from memory is used. This significantly reduces the execution time.

Merry Christmas

redmoon2711 added a commit to redmoon2711/EOS that referenced this issue Dec 27, 2024
redmoon2711 added a commit to redmoon2711/EOS that referenced this issue Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants