add_sectors uses two different state columns, STATE and reeds_state
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 40/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- data-engineering
Direzione di ricerca
Start in workflow/scripts/add_sectors.py at assign_bus_2_state (around L42-L67) and check how it sets STATE against the reeds_state column used by add_sector_foundation (L115). Then look at convert_generators_2_links (L473-L504) and the policy code in workflow/scripts/opts/policy.py. Done means one state column drives every consumer, with buses lacking reeds_state falling back to coordinates, and the sector test runs still agreeing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Request
add_sectors works out the state of a bus in two different ways:
reeds_state, the state of the bus' ReEDS zone, set when the network is built.add_sector_foundationcreates the state fuel buses ({ST} gas,{ST} coal, ...) from it (L115),GasData.get_states_in_modeluses it (L191-L197), and so do the state policy constraints (opts/policy.py).STATE, set inassign_bus_2_statefrom the state nearest to the bus coordinates (L42-L67).convert_generators_2_linksattaches the plants to the state fuel buses by it (L473-L504), and so dobuild_heatand the hydrogen links in #879.
The two agree in every network I checked: all my sector test runs, plus two western substation-level networks with about 2,000 and 2,700 AC buses. But if a bus ever gets a STATE different from its reeds_state (say, a cluster whose center falls in the neighboring state), its plants would draw fuel from another state's bus, or from one that doesn't exist, and the bus would count toward one state's policies but another state's fuel.
Suggested Solution
Use one column. The simplest fix is for assign_bus_2_state to take STATE from reeds_state where a bus has one, and fall back to the coordinates only for buses without it. Then a bus belongs to the same state everywhere in the model, policies included.
Additional Info
Came up in the review of #879: https://github.com/PyPSA/pypsa-usa/pull/879#discussion_r4512525990
- Lingua principale
- Python
- Stelle
- 154
- Fork
- 58
- Merge medio
- 3g 9h
- PR unite (30g)
- 51
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PyPSA/pypsa-usa
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di PyPSA/pypsa-usa
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
comet-ml/opik#9877 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Resource]: FlavianApertaresource-submission validation-passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
hesreallyhim/awesome-claude-code#3736 · 1 commento ·
-
area: trackers bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Review: WordPress copy/snapshot download media with no size cap and a hostname-only origin checkApertaperformance product:quill
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Community-Access/quill#2634 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno