Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 482 add scheduling test for maximizing self consumption (#532)
Add scheduling test for maximizing self-consumption, and improve time series db queries for fixed tariffs (and other long-term constants). * Better documentation of flexibility model for storage in endpoint; refactor its parameters and handling within the code for readability Signed-off-by: Nicolas Höning <nicolas@seita.nl> * add changelog entry Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make tests work, include updating older API versions, make prefer_charging_sooner part of storage specs & an optional parameter in API v3 Signed-off-by: Nicolas Höning <nicolas@seita.nl> * use storage_specs in CLI command, as well Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove default resolution of 15M, for now pass in what you want Signed-off-by: Nicolas Höning <nicolas@seita.nl> * various review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * black Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix tests Signed-off-by: Nicolas Höning <nicolas@seita.nl> * always load sensor when checking storage specs Signed-off-by: Nicolas Höning <nicolas@seita.nl> * begin to handle source model and version during scheduling Signed-off-by: Nicolas Höning <nicolas@seita.nl> * we can get multiple sources from our query (in the old setting, when we use name, but also in the new setting, unless we always include the user_id) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * give our two in-built schedulers an official __author__ and __version__ Signed-off-by: Nicolas Höning <nicolas@seita.nl> * review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * refactor getting data source for a job to util function; use the actual data source ID for this lookup if possible Signed-off-by: Nicolas Höning <nicolas@seita.nl> * pass sensor to check_storage_specs, as we always have it already Signed-off-by: Nicolas Höning <nicolas@seita.nl> * wrap Scheduler in classes, unify data source handling a bit more Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Support pandas 1.4 (#525) Add a pandas version check in initialize_index. * Use initialize_series util function Signed-off-by: F.N. Claessen <felix@seita.nl> * Update initialize_index for pandas>=1.4 Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Use initialize_index or initialize_series in all places where the closed keyword argument was used Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * mypy: PEP 484 prohibits implicit Optional Signed-off-by: F.N. Claessen <felix@seita.nl> * black after mypy Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop requiring min/max SoC attributes, which have defaults: - Default min = 0 - Default max = the highest target value, or np.nan if there are no targets, which subsequently maps to infinity in our solver Signed-off-by: F.N. Claessen <felix@seita.nl> * Set up device constraint columns for efficiencies in Charge Point scheduler, too Signed-off-by: F.N. Claessen <felix@seita.nl> * Derive flow constraints for battery scheduling, too (copied from Charge Point scheduler) Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename BatteryScheduler to StorageScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Warn for deprecation of schedule_battery and schedule_charging_station Signed-off-by: F.N. Claessen <felix@seita.nl> * Use StorageScheduler instead of ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Deprecate ChargingStationScheduler Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: move StorageScheduler to dedicated module Signed-off-by: F.N. Claessen <felix@seita.nl> * Update docstring Signed-off-by: F.N. Claessen <felix@seita.nl> * fix test Signed-off-by: F.N. Claessen <felix@seita.nl> * flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * Lose the v in version strings; prefer versions showing up as 'version: 3' over 'version: v3'. Even though Scheduler versioning does not necessarily need to follow semantic versioning (see discussion here: semver/semver#235), the v is still redundant. Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: rename module Signed-off-by: F.N. Claessen <felix@seita.nl> * Deal with empty SoC targets Signed-off-by: F.N. Claessen <felix@seita.nl> * Stop wrapping DataFrame representations in logging Signed-off-by: F.N. Claessen <felix@seita.nl> * Log warning instead of raising UnknownForecastException, and assume zero power values for missing values Signed-off-by: F.N. Claessen <felix@seita.nl> * Workaround for GH #484 Signed-off-by: F.N. Claessen <felix@seita.nl> * Test maximizing self-consumption Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: a single parameterized test instead of 2 tests with a lot of duplicate code Signed-off-by: F.N. Claessen <felix@seita.nl> * Remove debug statements Signed-off-by: F.N. Claessen <felix@seita.nl> * black Signed-off-by: F.N. Claessen <felix@seita.nl> * Correct mistake while refactoring Signed-off-by: F.N. Claessen <felix@seita.nl> * Check default price sensor in both scenarios Signed-off-by: F.N. Claessen <felix@seita.nl> * Expand explanation of optimization context Signed-off-by: F.N. Claessen <felix@seita.nl> * Reorder assertions and add more comments Signed-off-by: F.N. Claessen <felix@seita.nl> * Upgrade timely-beliefs to partly resolve workaround Signed-off-by: F.N. Claessen <felix@seita.nl> * changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
- Loading branch information