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

Replace some maps with `TimeSliceID`s as keys in agent investment code with simple `Vec`s

Open
#706 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Locate the agent investment code and identify the maps keyed by TimeSliceID, along with the flow and demand maps mentioned in the issue. Trace how values are accessed across time slices before deciding which Vec layouts preserve ordering and behavior. Done means the relevant maps are replaced with ordered Vec-based structures and the affected code still works.

Written by the indexing model from the issue text.

Description

performance question

(The Vecs should be ordered by TimeSliceID, obviously!)

I think this will make the code simpler and will also be much easier for the compiler to optimise. We don't care about performance that much at this stage, but it seems sensible to try to get the design right sooner rather than later.

As part of this I think we should change various flow/demand maps to be something like HashMap<(CommodityID, RegionID>, Vec<Flow>> instead, so we can get the values for all time slices in one step.

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.