macroenergy / Dolphyn.jl

DOLPHYN: Decision Optimization for Low Carbon Power and Hydrogen Nexus
https://macroenergy.github.io/Dolphyn.jl/
GNU General Public License v2.0
37 stars 20 forks source link

[BUG] Issue with Period Map creation in TDR #250

Closed federicoparolin closed 1 month ago

federicoparolin commented 2 months ago

Is there an existing issue for this?

Current Behavior

In the created Period_map.csv, not all Rep_Period entries have a match with a Period_Index.

As an example, running SmallNewEngland\ThreeZones_Gurobi with 20 representative periods (weeks):

immagine

Period 10 (i.e., Rep_Period=10) should be represented by representative period with Rep_Period_Index=9, which corresponds to Rep_Period=10. Similarly, period 15 (i.e., Rep_Period=15) should be represented by representative period with Rep_Period_Index=8 (Rep_Period=15).

This issue affects only LDS constraints.

Expected Behavior

Each representative period should be used to represent the period of the year (column Period_Index of Period Map) corresponding to its Rep_Period key.

SmallNewEngland\ThreeZones_Gurobi with 20 representative periods (weeks) would become:

immagine

Steps To Reproduce

No response

Environment

No response

Manifest.toml file

No response

Anything else?

No response