add a biomass supply chain that is not an asset in the base year (mis…#643
add a biomass supply chain that is not an asset in the base year (mis…#643
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 88.79% 88.46% -0.33%
==========================================
Files 38 39 +1
Lines 3391 3555 +164
Branches 3391 3555 +164
==========================================
+ Hits 3011 3145 +134
- Misses 188 219 +31
+ Partials 192 191 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alexdewar
left a comment
There was a problem hiding this comment.
Looks good! And it makes sense to have examples that test these cases.
I guess it probably makes sense for us to add some documentation saying what the different examples are for at some point -- maybe we could add a description field to model.toml.
We should add a regression test for this, in the same form as in tests/regression_simple.rs. We can do that for you.
What does the MC stand for in the name?
There was a problem hiding this comment.
Note there's a PR open to remove settings.toml files from model dirs: #637
We can fix it up though
|
MC = missing commodity!
Thanks.
BTW, noticed when I tested this that model is very sensitive to minor typos like a leading space in a field “ sed” instead of “sed”, and to missing fields (ie lack of commas even though there’s no data to input). Though on the bright side error messages were helpful in tracking these down!
…________________________________
From: Alex Dewar ***@***.***>
Sent: Friday, June 20, 2025 2:15:36 PM
To: EnergySystemsModellingLab/MUSE_2.0 ***@***.***>
Cc: Hawkes, Adam D ***@***.***>; Assign ***@***.***>
Subject: Re: [EnergySystemsModellingLab/MUSE_2.0] add a biomass supply chain that is not an asset in the base year (mis… (PR #643)
@alexdewar commented on this pull request.
Looks good! And it makes sense to have examples that test these cases.
I guess it probably makes sense for us to add some documentation saying what the different examples are for at some point -- maybe we could add a description field to model.toml.
We should add a regression test for this, in the same form as in tests/regression_simple.rs. We can do that for you.
What does the MC stand for in the name?
________________________________
On examples/simple_mc/settings.toml<#643 (comment)>:
Note there's a PR open to remove settings.toml files from model dirs: #637<#637>
We can fix it up though
—
Reply to this email directly, view it on GitHub<#643 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC37JLKTPWO3IVMD27GFF6L3EQCPRAVCNFSM6AAAAAB7YG4FWGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDSNBWGA3DQMBZGY>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
Ah ok. I might rename it to something slightly more verbose to make it clearer.
Yeah it should be quite pendantic (one benefit of using a strongly typed language like Rust 😄). Good that the error messages were helpful, at least! Maybe we should trim whitespace from headers and fields by default though. Looks like there is an option for it: https://docs.rs/csv/latest/csv/struct.ReaderBuilder.html#method.trim |
|
Trimming white space would be good. But obvs not urgent. |
|
I've opened an issue to track it (#648). We can do it sometime down the line |
|
Looks good. @alexdewar are you happy to make the suggested changes? At some point, if we're going to have lots of example models (which I think we should), it would be worth building these models from a script - especially if they're all variations on the same base model with a few extra processes/commodities/agents included. I've done this for MUSE1 and it's been a life saver. |
|
Good suggestion Tom!
From: Tom Bland ***@***.***>
Date: Monday, 23 June 2025 at 17:45
To: EnergySystemsModellingLab/MUSE_2.0 ***@***.***>
Cc: Hawkes, Adam D ***@***.***>, Assign ***@***.***>
Subject: Re: [EnergySystemsModellingLab/MUSE_2.0] add a biomass supply chain that is not an asset in the base year (mis… (PR #643)
[Image removed by sender.]tsmbland left a comment (EnergySystemsModellingLab/MUSE2#643)<#643 (comment)>
Looks good. @alexdewar<https://github.com/alexdewar> are you happy to make the suggested changes?
At some point, if we're going to have lots of example models (which I think we should), it would be worth building these models from a script - especially if they're all variations on the same base model with a few extra processes/commodities/agents included. I've done this for MUSE1 and it's been a life saver.
—
Reply to this email directly, view it on GitHub<#643 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC37JLLWAZR42FPRVXUCY4T3FAHKFAVCNFSM6AAAAAB7YG4FWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJWG44DENJQGA>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
Sure.
Good idea! Wanna open an issue for it 😄? We could even generate them on the fly in |
Description
Adds a new simple model in the examples directory that has a biomass supply chain in it. This supply chain has no capacity in the base year. It is for testing of (a) price generation for commodities that are not utilised in a year, but could be utilised in the next milestone year (so we need a price for it to consider investment), and (b) investment in a milestone year, as I think this process will be competitive to meet the end-use demand in the simple model.
Fixes # none
Type of change
Key checklist
$ cargo test$ cargo docFurther checks
n/a