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: add command flexmeasures add schedule for-process #768

Merged
merged 65 commits into from Aug 1, 2023

Conversation

victorgarcia98
Copy link
Contributor

@victorgarcia98 victorgarcia98 commented Jul 21, 2023

Description

This PR introduces a custom CLI command to trigger process schedules.

Look & Feel

image

TOMORROW=$(date --date="next day" '+%Y-%m-%d')
 flexmeasures add schedule for-process --sensor-id 4 --start ${TOMORROW}T00:00:00+01:00 --duration PT24H --process-duration PT4H --process-power 0.4MW --process-type SHIFTABLE --consumption-price-sensor 2

How to test

  1. Create toy account: flexmeasures add toy-account --kind process

  2. Price data.

  3. Call the scheduler:

TOMORROW=$(date --date="next day" '+%Y-%m-%d')
 flexmeasures add schedule for-process --sensor-id 4 --start ${TOMORROW}T00:00:00+01:00 --duration PT24H --process-duration PT4H --process-power 0.4MW --process-type SHIFTABLE --consumption-price-sensor 2

Related Items

#729


  • 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

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

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>
…port shiftable.

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>
@nhoening
Copy link
Contributor

Idea: Should we extend add toy-account so that --kind shiftable-load becomes possible, as well?

Then your example would become shorter :)

But also it would be a useful addition, which we might expand for a shiftable load tutorial later (e.g. with a limited capacity, or with two shiftable processes ...)

Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Great stuff.

Also needs an entry in the CLI changelog and I would add this PR to the changelog about the shiftable scheduler.

flexmeasures/cli/data_add.py Outdated Show resolved Hide resolved
flexmeasures/cli/data_add.py Outdated Show resolved Hide resolved
flexmeasures/cli/data_add.py Outdated Show resolved Hide resolved
flexmeasures/cli/tests/conftest.py Outdated Show resolved Hide resolved
flexmeasures/cli/tests/test_data_add.py Show resolved Hide resolved
@nhoening nhoening added this to the 0.15.0 milestone Jul 24, 2023
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
@victorgarcia98 victorgarcia98 changed the title Feature/cli/trigger shiftable load Feature/cli/trigger process scheduler Jul 27, 2023
@victorgarcia98 victorgarcia98 changed the title Feature/cli/trigger process scheduler feature: flexmeasures add schedule for-process Jul 27, 2023
@victorgarcia98 victorgarcia98 changed the title feature: flexmeasures add schedule for-process feature: add command flexmeasures add schedule for-process Jul 27, 2023
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>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

I think I found one more possible improvement.

flexmeasures/cli/tests/conftest.py Outdated Show resolved Hide resolved
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>
Base automatically changed from feature/shiftable-load-scheduler to main July 31, 2023 09:59
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>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

You solved the CLI test issue to the best of our abilities right now, thanks.

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>
@victorgarcia98 victorgarcia98 merged commit e8eb247 into main Aug 1, 2023
4 checks passed
@victorgarcia98 victorgarcia98 deleted the feature/cli/trigger_shiftable_load branch August 1, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants