EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2

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

Aperta
#706 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
performance question
Lingua principale
Rust
Stelle
8
Fork
5
Merge medio
1g 2m
PR unite (30g)
37

Descrizione

(The `Vec`s 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>` instead, so we can get the values for all time slices in one step.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Individua il codice per gli investimenti degli agenti e identifica le map indicizzate per TimeSliceID, insieme alle map di flusso e domanda menzionate nell’issue. Traccia il modo in cui si accede ai valori tra le diverse fasce temporali prima di decidere quali layout di Vec preservino l’ordine e il comportamento. Il lavoro è completato quando le map rilevanti sono sostituite da strutture ordinate basate su Vec e il codice interessato continua a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
backend
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.