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 pull request introduces support for operating reserves in off-grid scenarios with Combined Heat and Power (CHP) systems. It enables modeling of CHP as either a provider or a consumer of operating reserves, depending on the scenario configuration. The changes also add a comprehensive test to verify correct behavior when CHP requires operating reserves and ElectricStorage provides them.
Key changes include:
Support for CHP Operating Reserve Logic:
operating_reserve_required_fractionfield to theCHPstruct, with logic to set and validate it based on theoff_grid_flag. This allows CHP to either require or provide operating reserves in off-grid scenarios. [1] [2] [3] [4]Techsconstruction to classify CHP as requiring or providing operating reserves in off-grid mode, based on itsoperating_reserve_required_fraction.Constraint and Expression Updates:
Scenario and Input Handling:
off_grid_flagto the CHP constructor. [1] [2]Testing and Validation:
chp_offgrid.json) and a detailed test script (test_chp_offgrid.jl) that verifies: [1] [2]These changes collectively enhance the model's flexibility for off-grid microgrid scenarios involving CHP and operating reserves.