PyPSA / linopy

Linear optimization with N-D labeled arrays in Python
https://linopy.readthedocs.io
MIT License
162 stars 44 forks source link

Fh/fix 266 #290

Closed apfelix closed 4 months ago

apfelix commented 4 months ago

fix #266

cached properties of the model's MatrixAccessor are cleared (if existent) at the start of solve, to avoid using old cached data on resolving the model after modification.

I also added a pytest for this, which failed before and works now.

apfelix commented 4 months ago

code coverage upload failed for some reason, could you have a look at this @FabianHofmann ?

FabianHofmann commented 4 months ago

@apfelix thanks for your PR! I retriggered the CI, don't know where that came from.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.70%. Comparing base (f0c8457) to head (55c0bb4). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #290 +/- ## ========================================== - Coverage 89.69% 86.70% -3.00% ========================================== Files 16 16 Lines 4019 4024 +5 Branches 939 941 +2 ========================================== - Hits 3605 3489 -116 - Misses 281 411 +130 + Partials 133 124 -9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.