Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #806 +/- ##
=======================================
Coverage 86.65% 86.65%
=======================================
Files 46 46
Lines 5080 5080
Branches 5080 5080
=======================================
Hits 4402 4402
Misses 470 470
Partials 208 208 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@tsmbland , @alexdewar it would be good it you could have a look at this. Not so much what I've implemented but my comment in the PR description. I think we have an issue with the solver. |
|
@dalonsoa The reason MUSE2 is selecting I tried reordering |
|
I guess it is producing electricity when is not needed, so if the constrain is that supply == demand, things do break. |
|
Ohhh good point. If I relax the commodity balance constraint so that supply is >= demand instead, then it works. I'm just not sure if there will be other consequences to doing that... What do you think @ahawkes? The problem we have is that we have a process which produces both gas and electricity, but the model fails because it's producing electricity when we're investing for gas, so the electricity produced is all surplus to requirements because demand is zero for this dispatch run. |
|
Thanks. Yes we could relax the constraint for now, as it’s the easiest solution. But can we create a placeholder issue for this, as it’s not ideal to have commodities being wasted like that – and indeed could cause other issues (e.g. I wonder what it’s price will be – probably negative!).
From: Alex Dewar ***@***.***>
Date: Wednesday, 10 September 2025 at 09:04
To: EnergySystemsModellingLab/MUSE_2.0 ***@***.***>
Cc: Hawkes, Adam D ***@***.***>, Mention ***@***.***>
Subject: Re: [EnergySystemsModellingLab/MUSE_2.0] 📝 Add process producing two outputs. (PR #806)
[Image removed by sender.]alexdewar left a comment (EnergySystemsModellingLab/MUSE2#806)<#806 (comment)>
Ohhh good point. If I relax the commodity balance constraint so that supply is >= demand instead, then it works. I'm just not sure if there will be other consequences to doing that...
What do you think @ahawkes<https://github.com/ahawkes>? The problem we have is that we have a process which produces both gas and electricity, but the model fails because it's producing electricity when we're investing for gas, so the electricity produced is all surplus to requirements because demand is zero for this dispatch run.
—
Reply to this email directly, view it on GitHub<#806 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC37JLLYEDBOIQ35URRGJML3R7LSHAVCNFSM6AAAAACFTQILQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENZTHAYDENZQHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Maybe, for this example to make sense and be useful we need some process that needs electricity, so investing in the |
I think the algorithm is ok (famous last words). I'd just assume that heatpumps aren't seen as the economical choice for whatever reason. Adding more demand for electricity won't actually make it more likely that the e-refineries will be selected at any stage of investment. It's a bit weird, but the reason is because the primary output for them is gas and so e-refineries won't be considered when investing for electricity (other outputs aren't counted). For Anyway, regardless of what we do for the other models, maybe you could just give both We'll also need to do #822 before you'll be able to make progress on this issue, because I can't see a way to make this work while supply is constrained to be the same as demand. |
|
No longer relevant, as #903 covers the same functionality. |
Description
Adds an example with a process that produces two useful commodities. This is an hypothetical
e-refinerythat produces gas as well as electricity (maybe by making the gas pass through a turbine while it gets out of the depths of the Earth). The example uses as staring point themuse1_simpleexample, adding the relevant entries to theprocessrelated files.As far as I can tell, despite being cheaper than the
gassupply1, thee-refineryis never used and it makes no difference to the result. New capacity is added to thegassupply1as time goes by, but nothing is added to the new tech. As far as I can tell, this makes no sense.I notice that in neither the
muse1_simpleexample nor the two that derive from it (two_regionsand this one,two_processes- although it should betwo_outputs) there is an investment in any technology that were not there at the start. New techs (windturbine, heatpump, gasCCGT or e-refinery) are never invested in, which point to a bigger problem.Fixes #756
Type of change
Key checklist
$ cargo test$ cargo docFurther checks