EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 8 forks source link

Update returned search_space of maturity and spend_limit filter #255

Closed LennartMorlock closed 1 month ago

LennartMorlock commented 3 months ago

Description

Two new lines of code were added to the maturity and the spend_limit filters, and one line was replaced with them. The changes to both filters are identical.

The previous replaced line removed the columns corresponding to replacements that should not be considered according to the search rule. The two new lines turn the corresponding boolean values inside the search space Dataarray to False instead while keeping all columns.

This solves the related issue #254 , as it removes the possibility of an error if the filters are put in a row (e.g. maturity->spend_limit) and makes the with_asset_technology filter work normally if it is applied afterwards.

Finally, this makes the maturity and spend_limit filters also more in line with other filters like same_fuel or similar_technology in how they manipulate the search space as they also just change the boolean values of the search_space DataArray while keeping the dimensions identical.

Fixes # Issue 254

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.

Key checklist

Further checks

alexdewar commented 1 month ago

I'm merging in develop to check that the tests still pass.

alexdewar commented 1 month ago

This seems sensible enough.