EnergySystemsModellingLab / MUSE_2.0

Welcome to the MUSE 2.0 repository
GNU General Public License v3.0
1 stars 0 forks source link

Read in commodities-related CSV files #150

Closed alexdewar closed 1 week ago

alexdewar commented 1 month ago

Description

The latest installment of the input layer work. This one is minimally invasive; it just adds support for two commodity-related CSV files (commodities.csv and commodity_costs.csv).

The commodity constraints file (which is currently empty in the example) is not read in by this code, but I've opened an issue to tackle it in future: #149.

Closes #62.

Type of change

Key checklist

Further checks

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.96%. Comparing base (cd6d92c) to head (9fd6c20). Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
src/model.rs 33.33% 4 Missing :warning:
src/lib.rs 0.00% 1 Missing :warning:
src/time_slice.rs 87.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #150 +/- ## ========================================== - Coverage 85.20% 84.96% -0.25% ========================================== Files 11 12 +1 Lines 338 379 +41 ========================================== + Hits 288 322 +34 - Misses 50 57 +7 ```

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

alexdewar commented 1 week ago

I'm not entirely sure how the timeslices will work in practice, though, now that they can be provided also as a season level only.

I guess we can cross that bridge when we come to it :smile:. We will need to decide what to do e.g. if a user specifies a specific time slice (winter.evening) when there's already a cost specified for the whole season (winter) at some point. I've opened an issue for this: #153