Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Be selective about re-investments in the ironing out loop

Open
#789 12 comments 0 reactions 1 assignee View on GitHub

@tsmbland is already working on this.

Since Sep 26, 2025.

Assessment

This issue has not been assessed yet.

Description

performance question

We currently redo all investments each round of the ironing out loop. Once #787 is done, this means that we will redo all investments if the price of any commodity is unstable. This is similar to what we do in MUSE1.

However, we could be more selective about this and only redo investments that could possibly be impacted by the unstable prices.

E.g I think the means that if the price of electricity changes from one iteration to the next, we should redo investments for all commodities that could consume electricity in the process of their production. Then, if any of those investments change compared to the previous iteration, we would have to redo the investments upstream of this (including electricity itself)

Let's say we had a very simple model:

gas -> electricity -> heat

  • In round 1 we perform investments for heat then electricity then gas based on commodity prices from the previous milestone year.
  • After doing all investments and then a final dispatch run to get new prices, we notice that the price of electricity has changed compared to the previous milestone year, so we have to redo investments for heat which might be impacted by this price change*
  • If heat investments are unchanged compared to round 1 then we're done (assuming the gas price is also stable)
  • If heat investments are changed compared to round 1 (perhaps towards a more electricity-efficient technology), then we'll have to redo investments for electricity, and likewise if these change then we'll need to redo investments for gas
  • After this new round of investments, we do another full dispatch run to get a new set of commodity prices, etc. etc.
  • This keeps going until the price of all commodities is stable, or the max number of iterations is reached

*Or, perhaps if the price of electricity has changed then this will be factored in to the price of heat so we don't need to look forward and can just redo investments for the commodities with changing prices, starting with those furthest along the supply chain?

@ahawkes Does this sound reasonable?

Dominant language
Rust
Stars
8
Forks
5
Avg merge
11h 31m
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EnergySystemsModellingLab/MUSE2

All issues in EnergySystemsModellingLab/MUSE2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.