Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move over deprecated soc-targets field (#566)
Fixes the following bugs: - test_trigger_and_get_schedule was not checking for soc-targets sent in the deprecated soc-targets field - test_trigger_and_get_schedule was not taking into account efficiency losses when checking soc-targets - test_trigger_and_get_schedule was not checking for soc-targets sent within the flex-model field - test_trigger_and_get_schedule was assuming wrong units for the soc-max and soc-targets fields, thereby creating an unsolvable scheduling problem - The deprecated soc-targets field was hidden in an unused **kwargs variable, and not moved over to become part of the flex-model field - The deprecated soc-targets field was still being deserialized by the API endpoint rather than by the scheduler - The SoC state was stored with the wrong units as an asset attribute * soc-targets are now deserialized with the SOCTargetSchema by the scheduler rather than by the /schedules/trigger/ endpoint Signed-off-by: F.N. Claessen <felix@seita.nl> * Test whether SOC targets are met, in the new and the old way Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix test Signed-off-by: F.N. Claessen <felix@seita.nl> * Another small bug Signed-off-by: F.N. Claessen <felix@seita.nl> * Move field setup to a single place, and add inline comments relating to SoC units Signed-off-by: F.N. Claessen <felix@seita.nl> * Now that we added comments about the SoC units, it becomes obvious that we set up the constraints for an infeasible problem; let's remedy that Signed-off-by: F.N. Claessen <felix@seita.nl> * Let's not silently assume that a non-kWh unit is automatically a MWh unit Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor and test whether persist_flex_model did what it was supposed to do Signed-off-by: F.N. Claessen <felix@seita.nl> * black and flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl>
- Loading branch information
Showing
6 changed files
with
45 additions
and
26 deletions.
There are no files selected for viewing
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
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
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
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
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
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