Add filter yaml capability to upgrades_analyzer #38
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.
Resolves #[issue number here].
Pull Request Description
This PR introduces "filter_yaml" capability to upgrades_analyzer. filter_yamls are add-ons to the project definition files used for running ResStock or ComStock. The filter_yaml has the following schema which is similar to the schema of the regular project definition file except there are only two top level keys (besides the schema version):
all_upgrades_remove_logic
andupgrades
.all_upgrades_remove_logic
can be used to define a removal logic (following the same syntax as any apply_logic) that will be used to remove buildings from all upgrades. The logic can greedy and include more buildings than what's in the upgrade - only the buildings that are actually available in the upgrade will be impacted, and the buildings not in the upgrade will be ignored.upgrades
block can be used to define (additional) removal logic for individual upgrades. The upgrades are referred to by the corresponding name in the project yaml, and the removal logic is specified underremove_logic
key.