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

Load following heuristic #262

Merged
merged 10 commits into from
Dec 29, 2023
Merged

Conversation

camirmas
Copy link
Collaborator

@camirmas camirmas commented Dec 27, 2023

Load Following Heuristic

This PR reworks #135 for compatibility with HOPP v2.0+

I've removed the example for now, planning to make a followup to rework it in the style of our current examples (see #263).

Impacted areas of the software

Optimal dispatch

@@ -73,22 +73,22 @@ def _set_power_fraction_limits(self, gen: list, grid_limit: list):
@staticmethod
def enforce_power_fraction_simple_bounds(power_fraction) -> float:
""" Enforces simple bounds (0,1) for battery power fractions."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe should change the docstring to 0.9 instead of 1 for the bounds. I think ideally bounds would be an assignable variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree. I think this is part of a bigger issue where we need more configurability for the dispatch, with varying config options for different strategies. A quick fix would be to add power fraction options to HybridDispatchOptions, but I think it deserves a bit more work than that

discharge_power = power_fraction * self.maximum_power
soc = soc0 - self.time_duration[0] * (1/(self.discharge_efficiency/100.) * discharge_power) / self.capacity
elif power_fraction < 0.0:
elif power_fraction < 0.9:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this if elif statement mean that it will charge only if the power_fraction is less than 0.1, is that correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is is kinda misleading. It's equivalent to saying elif power_fraction < 0.1, so maybe that's a clearer way to express this

hopp/simulation/technologies/grid.py Outdated Show resolved Hide resolved
hopp/simulation/technologies/grid.py Outdated Show resolved Hide resolved
hopp/simulation/technologies/grid.py Outdated Show resolved Hide resolved
@camirmas camirmas force-pushed the load_following_heuristic branch 2 times, most recently from d579490 to 427ddef Compare December 28, 2023 23:14
@camirmas camirmas merged commit e993c8a into NREL:develop Dec 29, 2023
4 checks passed
@camirmas camirmas deleted the load_following_heuristic branch December 29, 2023 19:22
@bayc bayc mentioned this pull request Apr 22, 2024
3 tasks
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.

None yet

3 participants