feat(core): implement continuous time simulation mode - #166
Open
ssossou-liege wants to merge 1 commit into
Open
ssossou-liege wants to merge 1 commit into
ssossou-liege wants to merge 1 commit into
Conversation
- Added `continuous=True/False` argument to `UseCase.generate_daily_load_profiles()`.
- Created `UseCase._generate_continuous_profiles()` to manage a single global timeline array, eliminating day-to-day discontinuities.
- Implemented a new iteration architecture (users -> appliances -> days) via `Appliance.generate_continuous_load_profile()`.
- Added `Appliance._merge_midnight_crossing_windows()` to cleanly detect and merge usage windows that cross midnight (e.g., 6 PM - 6 AM becomes one continuous range instead of two isolated fragments).
- Added `Appliance._update_continuous_use()` to write power values directly into the global index, allowing logical cycle spillovers past midnight.
- Modified `Appliance.rand_switch_on_window()` to dynamically convert global indexes back to daily-relative indexes (`% 1440`) when checking compatibility against legacy duty cycle definitions.
This update physically resolves the unrealistic aggregated power drops ("edge effects") at the boundary of every 24-hour iteration (midnight) while maintaining full backward compatibility with standard, isolated day profile definitions.
This file contains hidden or 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
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.
continuous=True/Falseargument toUseCase.generate_daily_load_profiles().UseCase._generate_continuous_profiles()to manage a single global timeline array, eliminating day-to-day discontinuities.Appliance.generate_continuous_load_profile().Appliance._merge_midnight_crossing_windows()to cleanly detect and merge usage windows that cross midnight (e.g., 6 PM - 6 AM becomes one continuous range instead of two isolated fragments).Appliance._update_continuous_use()to write power values directly into the global index, allowing logical cycle spillovers past midnight.Appliance.rand_switch_on_window()to dynamically convert global indexes back to daily-relative indexes (% 1440) when checking compatibility against legacy duty cycle definitions.This update physically resolves the unrealistic aggregated power drops ("edge effects") at the boundary of every 24-hour iteration (midnight) while maintaining full backward compatibility with standard, isolated day profile definitions.
Fix #Issue
Changes proposed in this pull request:
For more information on how to contribute, please check the Contributing Guidelines.