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

feature: QuantityOrSensor fields for site capacities (flex-context) #985

Merged
merged 29 commits into from
Mar 4, 2024

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Feb 20, 2024

Description

This PR updates the site-consumption-capacity and site-production-capacity fields in the flex-context to use the QuantityOrSensor schema.

Look & Feel

Example flex-context with a dynamic consumption capacity recorded under sensor ID 8:

{
    "flex-context": {
        "site-power-capacity": "500 kVA",
        "site-consumption-capacity": {"sensor": 8},
        "site-production-capacity": "400 kW",
    }
}

How to test

To do.

Further Improvements

  • Write test
  • CLI support
  • Support site-power-capacity as a sensor? It's not as dynamic as it is usually related to cable thickness, but moreover I propose to wait until sensor support for the power-capacity field is fixed.
  • Update endpoint documentation (in trigger_schedule docstring)
  • Update API documentation (in scheduling.rst)
  • Create Issue to create tutorial for modelling dynamic network capacity contracts Create tutorial for modelling dynamic network capacity contracts #999

Related Items

Closes #925.


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

…te-production-capacity fields in the flex-context

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added this to the 0.20 milestone Feb 20, 2024
@Flix6x Flix6x self-assigned this Feb 20, 2024
@Flix6x Flix6x linked an issue Feb 20, 2024 that may be closed by this pull request
…flex-context

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

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>
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>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x marked this pull request as ready for review February 26, 2024 23:02
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>
Signed-off-by: F.N. Claessen <felix@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.

Great! This is something we are going to use a lot I think :D

I'm eager to see how to play with dynamic grid capacity constraints.

flexmeasures/cli/data_add.py Outdated Show resolved Hide resolved
flexmeasures/data/models/planning/utils.py Show resolved Hide resolved
flexmeasures/data/schemas/sensors.py Show resolved Hide resolved
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>
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>
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.

Awesome! Glad that you used the same test for the device production/consumption capacities.

@Flix6x Flix6x merged commit 2f3ea42 into main Mar 4, 2024
7 of 9 checks passed
@Flix6x Flix6x deleted the 925-site-level-power-constraints-defined-as-sensors branch March 4, 2024 16:19
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.

site-level power constraints defined as sensors
2 participants