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

feat: add Binary constraint to prevent energy losses (at negative prices) #770

Merged
merged 62 commits into from Aug 3, 2023

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jul 24, 2023

To generate each row in my performance test, I changed line 181 in the test:

end = tz.localize(datetime(2015, 1, 4, 2))  # 8 steps
end = tz.localize(datetime(2015, 1, 4, 3))  # 12 steps
# etc..

And for the column without binary constraint I just commented out the binary constraints (lines 334-339) in linear_optimization.py.

victorgarcia98 and others added 6 commits July 19, 2023 17:32
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…eError

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…est against negative prices

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…sults objects and using it in the device_scheduler function

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…evice_down_derivative_sign

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
flexmeasures/data/models/generic_assets.py Outdated Show resolved Hide resolved
flexmeasures/data/models/generic_assets.py Outdated Show resolved Hide resolved
@Flix6x
Copy link
Contributor Author

Flix6x commented Aug 1, 2023

I feel that make test should install HiGHs now. Perhaps @nhoening can consult us on how to best do that. For instance, pip install highspy could be a new install instruction under install-for-test in our Makefile. Or should we be keeping track of the version of the HiGHs pip package within our dependency files?

Flix6x and others added 2 commits August 2, 2023 09:47
… tuple of the device_scheduler; this prevents duplicating a large docstring at the cost of introducing a breaking change in the function signature of the device_scheduler (but no external code uses that function to the best of my knowledge) (#781)

Signed-off-by: F.N. Claessen <felix@seita.nl>
…neric_asset

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
@victorgarcia98
Copy link
Contributor

I feel that make test should install HiGHs now. Perhaps @nhoening can consult us on how to best do that. For instance, pip install highspy could be a new install instruction under install-for-test in our Makefile. Or should we be keeping track of the version of the HiGHs pip package within our dependency files?

That makes sense. What about make install-for-dev? Maybe it's a good idea to shorten the setup time.

@nhoening
Copy link
Contributor

nhoening commented Aug 2, 2023

I am happy to include in install-for-test and even dev (as it's the default and installing is easy).

Tracking the version is a good thought, but I can't decide if we should do that here. Others solvers we support are not tracked by us this way. For now, I'd leave it at that.

We probably are not using intricate features of the solvers, right?

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…anteed when prefer-charging-sooner is true; otherwise, the solver will be completely indifferent to oscilations during the period with negative prices

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…h the test requirements.

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Copy link
Contributor

@victorgarcia98 victorgarcia98 left a comment

Choose a reason for hiding this comment

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

@Flix6x The changes that you introduced look good to me!

@Flix6x Flix6x merged commit b1a85e8 into main Aug 3, 2023
4 checks passed
More powerful scheduling of sensors automation moved this from In progress to Done Aug 3, 2023
@Flix6x Flix6x deleted the feature/no-energy-leakage branch August 3, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants