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

481 extend documentation and toy tutorial with scheduling within the context of a building with PV #534

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
31afb2e
fix charging sensor name in tutorial
Flix6x Nov 15, 2022
e60f97d
update price sensor name in tutorial (prefer non-capitalized sensor n…
Flix6x Nov 15, 2022
625bc2b
Print out account ID if toy account already exists
Flix6x Nov 15, 2022
fd19381
Fix for changed default when reading in timezone naive data: we no lo…
Flix6x Nov 15, 2022
a5278de
Add solar power sensor to toy account, and allow existing toy account…
Flix6x Nov 15, 2022
4220d92
Support JSON and Callable arguments
Flix6x Nov 15, 2022
07f8dc8
get or create price sensor
Flix6x Nov 15, 2022
bd977b2
Refactor to keep original order of sensor ids
Flix6x Nov 15, 2022
be49c47
Add CLI option to pass inflexible device sensors
Flix6x Nov 15, 2022
9320a6d
Expand tutorial with scheduling against solar, which limits the avail…
Flix6x Nov 15, 2022
639dd25
Add note about resampling
Flix6x Nov 15, 2022
e48e055
black
Flix6x Nov 15, 2022
644cdc2
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Nov 21, 2022
24cf156
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Nov 29, 2022
ba4ca70
Allow nesting sensors_to_show to support layering multiple sensors in…
Flix6x Nov 30, 2022
1b95b9d
Textual changes
Flix6x Nov 30, 2022
bd91967
Remove print statement
Flix6x Nov 30, 2022
cf16ecf
Add missing timezone
Flix6x Nov 30, 2022
7dcb001
Fix call to make_schedule
Flix6x Nov 30, 2022
141a794
Ensure storage specs, also when make_schedule is called directly (i.e…
Flix6x Nov 30, 2022
fec7cbb
Legend shows which asset a sensor belongs to, too, and sensors that s…
Flix6x Nov 30, 2022
15a59a2
Add CLI command for adding a data source
Flix6x Nov 30, 2022
42523e4
DB migration for source types 'forecaster' and 'scheduler'
Flix6x Nov 30, 2022
8d283d5
Attribute toy solar forecasts to a new DataSource of type 'forecaster'
Flix6x Nov 30, 2022
5170616
Check common cases of shared sensor types
Flix6x Nov 30, 2022
daf0273
Add version identifier and missing parenthesis
Flix6x Nov 30, 2022
cd4f41b
black and flake8
Flix6x Nov 30, 2022
9eb668d
Fix test (no legend in PositionFieldDef)
Flix6x Nov 30, 2022
71e983f
Remove redundant detail encodings
Flix6x Nov 30, 2022
f174c35
Upgrade timely-beliefs for required feature from https://github.com/S…
Flix6x Dec 2, 2022
b6a923c
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Dec 2, 2022
0d3e004
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Dec 12, 2022
a495bd1
Merge db revisions
Flix6x Dec 12, 2022
401cd3e
black
Flix6x Dec 12, 2022
491982e
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Dec 16, 2022
f67096f
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Dec 20, 2022
a337269
Speed up viz by avoiding redundant client-side transformation
Flix6x Dec 20, 2022
8992ea4
Bump vega-lite and vegaembed
Flix6x Dec 20, 2022
9159126
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Dec 20, 2022
4001deb
Ensure full-width bar width
Flix6x Dec 20, 2022
b2746ae
black
Flix6x Dec 21, 2022
5cae176
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Dec 30, 2022
42b55ee
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Jan 3, 2023
0583d83
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Jan 4, 2023
0df0632
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Jan 16, 2023
786255c
Merge branch 'main' into 481-extend-documentation-and-toy-tutorial-wi…
Flix6x Mar 9, 2023
061c153
Update CLI scheduling command by adding `for-storage`
Flix6x Mar 9, 2023
f1dc65d
Improve introduction to using `flexmeasures add source`
Flix6x Mar 9, 2023
5f99e63
Introduce follow-up solar example
Flix6x Mar 9, 2023
1c04f5f
Refactor: rename "scheduling script" to "scheduler" and "forecasting …
Flix6x Mar 9, 2023
9340613
Clarify event start domain setting
Flix6x Mar 9, 2023
67ad86c
Raise instead of warn in case toy account already exists
Flix6x Mar 9, 2023
7c96949
Clarify loop over kwargs
Flix6x Mar 21, 2023
6c25137
black
Flix6x Mar 21, 2023
ab000f2
Merge steps
Flix6x Mar 21, 2023
8b6c2c4
Clarify when we choose not to show the sensor name
Flix6x Mar 21, 2023
452e3c4
Add return type annotations
Flix6x Mar 24, 2023
6c76e93
Add default sensors_to_show attribute to test asset
Flix6x Mar 24, 2023
51d1068
Add test cases for bad sensors_to_show attribute
Flix6x Mar 24, 2023
8c1d013
Validate sensors_to_show attribute
Flix6x Mar 24, 2023
a592109
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Mar 24, 2023
1ae0b43
Simplify code lines
Flix6x Mar 24, 2023
770fef6
black
Flix6x Mar 24, 2023
0611afd
Refactor: move util function
Flix6x Mar 24, 2023
c16b01b
flake8
Flix6x Mar 27, 2023
838d9f3
Changelog entry plus upgrade instructions
Flix6x Mar 27, 2023
1a4008a
Add documentation for nested sensors_to_show attribute
Flix6x Mar 27, 2023
6f5c727
Resolve import error
Flix6x Mar 27, 2023
5e00455
redundant space
Flix6x Mar 27, 2023
b37fea8
Resolve circular import
Flix6x Mar 27, 2023
cbf8e17
add a missing output style
nhoening Mar 30, 2023
3d42a6f
Fix GH Issue #604
Flix6x Apr 5, 2023
f90ded6
Correct spacing of header markings
Flix6x Apr 9, 2023
810c6ea
Add sensors_to_show attribute to tutorial printout
Flix6x Apr 9, 2023
fca5f6e
Correct sensor name in tutorial
Flix6x Apr 9, 2023
eee7b97
Correct column name in tutorial
Flix6x Apr 9, 2023
625f189
Shift sensor ids in tutorial
Flix6x Apr 9, 2023
1467fc6
fix capitalization
Flix6x Apr 9, 2023
1f54b81
Update uniplot output (looks like later versions have a more intuitiv…
Flix6x Apr 9, 2023
4dc0361
Correct data source IDs
Flix6x Apr 9, 2023
b393cad
test
Flix6x Apr 9, 2023
a336a07
Merge remote-tracking branch 'origin/main' into HEAD
Flix6x Apr 9, 2023
d0f509b
Revert "test"
Flix6x Apr 9, 2023
57e61a7
Resolve circular import coming to light through mypy
Flix6x Apr 9, 2023
f98304d
Generalize util function
Flix6x Apr 9, 2023
dc58d9a
Add documentation for new CLI command
Flix6x Apr 10, 2023
deedb7d
Add documentation for new CLI option
Flix6x Apr 10, 2023
5d5481a
Merge remote-tracking branch 'origin/main' into 481-extend-documentat…
Flix6x Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions documentation/changelog.rst
Expand Up @@ -8,9 +8,12 @@ v0.13.0 | April XX, 2023

.. warning:: The API endpoint (`[POST] /sensors/(id)/schedules/trigger <api/v3_0.html#post--api-v3_0-sensors-(id)-schedules-trigger>`_) to make new schedules sunsets the deprecated (since v0.12) storage flexibility parameters (they move to the ``flex-model`` parameter group), as well as the parameters describing other sensors (they move to ``flex-context``).

.. warning:: Upgrading to this version requires running ``flexmeasures db upgrade`` (you can create a backup first with ``flexmeasures db-ops dump``).

New features
-------------
* Keyboard control over replay [see `PR #562 <https://www.github.com/FlexMeasures/flexmeasures/pull/562>`_]
* Overlay charts (e.g. power profiles) on the asset page using the `sensors_to_show` attribute, and distinguish plots by source (different trace), sensor (different color) and source type (different stroke dash) [see `PR #534 <https://www.github.com/FlexMeasures/flexmeasures/pull/534>`_]
* The ``FLEXMEASURES_MAX_PLANNING_HORIZON`` config setting can also be set as an integer number of planning steps rather than just as a fixed duration, which makes it possible to schedule further ahead in coarser time steps [see `PR #583 <https://www.github.com/FlexMeasures/flexmeasures/pull/583>`_]
* Different text styles for CLI output for errors, warnings or success messages. [see `PR #609 <https://www.github.com/FlexMeasures/flexmeasures/pull/609>`_]

Expand Down
6 changes: 6 additions & 0 deletions documentation/cli/change_log.rst
Expand Up @@ -4,6 +4,12 @@
FlexMeasures CLI Changelog
**********************

since v0.13.0 | April XX, 2023
=================================

* Add ``flexmeasures add source`` CLI command for adding a new data source.
* Add ``--inflexible-device-sensor`` option to ``flexmeasures add schedule``.

since v0.12.0 | January 04, 2023
=================================

Expand Down
1 change: 1 addition & 0 deletions documentation/cli/commands.rst
Expand Up @@ -33,6 +33,7 @@ of which some are referred to in this documentation.
``flexmeasures add asset`` Create a new asset.
``flexmeasures add sensor`` Add a new sensor.
``flexmeasures add beliefs`` Load beliefs from file.
``flexmeasures add source`` Add a new data source.
``flexmeasures add forecasts`` Create forecasts.
``flexmeasures add schedule for-storage`` Create a charging schedule for a storage asset.
``flexmeasures add holidays`` Add holiday annotations to accounts and/or assets.
Expand Down
10 changes: 5 additions & 5 deletions documentation/index.rst
Expand Up @@ -39,12 +39,12 @@ A tiny, but complete example: Let's install FlexMeasures from scratch. Then, usi
$ docker pull postgres; docker run --name pg-docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=flexmeasures-db -d -p 5433:5432 postgres:latest
$ export SQLALCHEMY_DATABASE_URI="postgresql://postgres:docker@127.0.0.1:5433/flexmeasures-db" && export SECRET_KEY=notsecret
$ flexmeasures db upgrade # create tables
$ flexmeasures add toy-account --kind battery # setup account & a user, a battery (Id 2) and a market (Id 3)
$ flexmeasures add beliefs --sensor-id 3 --source toy-user prices-tomorrow.csv --timezone utc # load prices, also possible per API
$ flexmeasures add schedule for-storage --sensor-id 2 --consumption-price-sensor 3 \
$ flexmeasures add toy-account --kind battery # setup account incl. a user, battery (ID 1) and market (ID 2)
$ flexmeasures add beliefs --sensor-id 2 --source toy-user prices-tomorrow.csv --timezone utc # load prices, also possible per API
$ flexmeasures add schedule for-storage --sensor-id 1 --consumption-price-sensor 2 \
--start ${TOMORROW}T07:00+01:00 --duration PT12H \
--soc-at-start 50% --roundtrip-efficiency 90% # this is also possible per API
$ flexmeasures show beliefs --sensor-id 2 --start ${TOMORROW}T07:00:00+01:00 --duration PT12H # also visible per UI, of course
$ flexmeasures show beliefs --sensor-id 1 --start ${TOMORROW}T07:00:00+01:00 --duration PT12H # also visible per UI, of course

We discuss this in more depth at :ref:`tut_toy_schedule`.

Expand Down Expand Up @@ -94,7 +94,7 @@ Your journey, from dipping your toes in the water towards being a happy FlexMeas



Where to start reading ?
Where to start reading?
--------------------------

You (the reader) might be a user connecting with a FlexMeasures server or working on hosting FlexMeasures. Maybe you are planning to develop a plugin or even core functionality. In :ref:`getting_started`, we have some helpful tips how to dive into this documentation!
Expand Down
2 changes: 1 addition & 1 deletion documentation/tut/forecasting_scheduling.rst
Expand Up @@ -58,7 +58,7 @@ In FlexMeasures, the usual way of creating forecasting jobs would be right in th
So technically, you don't have to do anything to keep fresh forecasts.

The decision which horizons to forecast is currently also taken by FlexMeasures. For power data, FlexMeasures makes this decision depending on the asset resolution. For instance, a resolution of 15 minutes leads to forecast horizons of 1, 6, 24 and 48 hours. For price data, FlexMeasures chooses to forecast prices forward 24 and 48 hours
These are decent defaults, and fixing them has the advantage that scheduling scripts (see below) will know what to expect. However, horizons will probably become more configurable in the near future of FlexMeasures.
These are decent defaults, and fixing them has the advantage that schedulers (see below) will know what to expect. However, horizons will probably become more configurable in the near future of FlexMeasures.

You can also add forecasting jobs directly via the CLI. We explain this practice in the next section.

Expand Down