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: in play mode, allow showing any sensor on the asset page #740
Merged
Flix6x
merged 10 commits into
main
from
feature/support-showing-sensors-from-any-account
Aug 1, 2023
Merged
feat: in play mode, allow showing any sensor on the asset page #740
Flix6x
merged 10 commits into
main
from
feature/support-showing-sensors-from-any-account
Aug 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: F.N. Claessen <felix@seita.nl>
nhoening
requested changes
Jul 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
I suggest:
- mentioning in line 437 that now this exception exists.
- renaming
sensor_map
toallowed_sensor_map
- what if an ID is in
sensor_to_show
, but not inallowed_sensor_map
? I believe lines 482 and 484 would raise an error. Maybe catching that and logging a warning is better.
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
…m as well Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@Flix6x I did a couple changes here (as I needed this PR for a demo) and now I want you to review this PR, basically. (can happen next week) |
…ng-sensors-from-any-account
I approve. Thanks for the fixes. |
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@nhoening Please check my changelog entry + warning. |
nhoening
approved these changes
Aug 1, 2023
victorgarcia98
pushed a commit
that referenced
this pull request
Aug 1, 2023
This PR uses the FlexMeasures play mode to allow showing sensors across organisations. When showing simulation results, we want to be able to show results from different scenarios (stored under different accounts) on the same asset page. For example, when comparing a scenario against some other benchmark scenario. * feat: in play mode, allow showing any sensor on the asset page Signed-off-by: F.N. Claessen <felix@seita.nl> * fix checking for config value Signed-off-by: Nicolas Höning <nicolas@seita.nl> * more consistent naming of account variable Signed-off-by: Nicolas Höning <nicolas@seita.nl> * chore: rename variable of accessible sensors for readability Signed-off-by: Nicolas Höning <nicolas@seita.nl> * docs: mention this new possibility in function docstring Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix: do not fail if sensors are not accessible, log a warning for them as well Signed-off-by: Nicolas Höning <nicolas@seita.nl> * docs: changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: changelog warning Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
Flix6x
added a commit
that referenced
this pull request
Aug 3, 2023
…ces) (#770) Add binary constraint to avoid energy leakages during periods with negative prices. * add highs to requirements Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * docs: add changelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: get results with infeasible termination status instead of RuntimeError Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: add Binary constraint to prevent energy losses, and start new test against negative prices Signed-off-by: F.N. Claessen <felix@seita.nl> * fx: avoid double solving Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * style: fix HiGHS capitalization Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * remove HiGHS from requirements Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * remove dependency Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add dependency back Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * docs: document how to install HiGHS Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add HIghs to Dockerfile Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * remove extra lines Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix typos Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * load solution when termination_condition!=infeasible Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * refactor: run data preparation step in a different method Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * refactor: create run_device_scheduler function to return model and results objects and using it in the device_scheduler function Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add asserts and docstring in test_battery_solver_day_3 Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add documentation for the constraints device_up_derivative_sign and device_down_derivative_sign Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * install HiGHS in the CI testing env Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * address some textual changes Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fx CBC capitalization Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix grammar Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * check if there are results in a more robustly Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * little fixes Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * improve docstring of _prepare Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix definition of M Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * improve test Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * reorder installation instructions for CBC and HiGHS Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add production price fixture Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix loading results twice Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * remove TODO Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * increment StorageScheduler version Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add changelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix conftest Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * update test_hashing with a new hash due to the change in the version of the StorageScheduler Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: in play mode, allow showing any sensor on the asset page (#740) This PR uses the FlexMeasures play mode to allow showing sensors across organisations. When showing simulation results, we want to be able to show results from different scenarios (stored under different accounts) on the same asset page. For example, when comparing a scenario against some other benchmark scenario. * feat: in play mode, allow showing any sensor on the asset page Signed-off-by: F.N. Claessen <felix@seita.nl> * fix checking for config value Signed-off-by: Nicolas Höning <nicolas@seita.nl> * more consistent naming of account variable Signed-off-by: Nicolas Höning <nicolas@seita.nl> * chore: rename variable of accessible sensors for readability Signed-off-by: Nicolas Höning <nicolas@seita.nl> * docs: mention this new possibility in function docstring Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix: do not fail if sensors are not accessible, log a warning for them as well Signed-off-by: Nicolas Höning <nicolas@seita.nl> * docs: changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: changelog warning Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl> * fix fixture Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: changelog Signed-off-by: F.N. Claessen <felix@seita.nl> * revert (the refactoring part of aa32839): prepend model to the return 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> * clean code and latitude, longitude and account_id to get_or_create_generic_asset Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add highspy to test.txt and test.in Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: typos Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: test that needs to get the battery object Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: typo Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: clarify choice of SoC values in test Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: test case 2 says it tests for no oscillation, which is only guaranteed 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> * style: streamline variable names in test Signed-off-by: F.N. Claessen <felix@seita.nl> * revert 48fd692: unnecessary after #695 Signed-off-by: F.N. Claessen <felix@seita.nl> * style: black Signed-off-by: F.N. Claessen <felix@seita.nl> * remove installation of highspy as it's already being installed through the test requirements. Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix (docs): comment out cross reference to masked documentation page Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Victor <victor@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Victor Garcia Reolid <victor@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR uses the FlexMeasures
play
mode to allow showing sensors across organisations. When showing simulation results, we want to be able to show results from different scenarios (stored under different accounts) on the same asset page. For example, when comparing a scenario against some other benchmark scenario.Follow-up: