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 flexmeasures add schedule generic command #730

Closed
wants to merge 26 commits into from

Conversation

victorgarcia98
Copy link
Contributor

Description

In order to make the testing of new schdulers easier, this PR introduces the command flexmeasures add schedule generic. This command gets a Scheduler class name as one of its inputs and allows create/edit the flex-model and flex-context using your default editor (e.g vim, vscode, pycharm, ...).

How it looks

Prerequisites

  • Sensor to store the results of the schedule (in the example, ID=1)
  • Sensor with cost data (ini the example ID=2)

Beware, you require to have data in the planning window, in this example, (2023-01-01 00, 2023-01-01 12).

  1. Run the command to add a new schedule:
flexmeasures add schedule generic --sensor-id 1 --scheduler ShiftableLoadScheduler  --start 2023-01-01T00:00:00+01:00 --duration PT12H --edit-flex-model
  1. Your default editor will open. Input the following flex-model and save:
{"cost-sensor": 2, "duration": "PT5H", "load-type": "INFLEXIBLE","power": 2.0}
  1. Show the resulting schedule:
flexmeasures show beliefs --sensor-id 1 --start 2023-01-01T00:00:00+01:00 --duration PT12H

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>
…in order to allow getting the class from the app context instead of the sensors attributes.

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>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
… only when optimizing a INFLEXIBLE or SHIFTABLE load type.

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

Closing this in favor of creating custom commands for the schedules.

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

1 participant