microsoft / times-excel-reader

MIT License
6 stars 3 forks source link

Incorrect ~ActivePDef in input Excel files? #4

Open siddharth-krishna opened 2 years ago

siddharth-krishna commented 2 years ago

The active time period (~ActivePDef) in https://github.com/samwebster/times-ireland-model/blob/main/SysSettings.xlsx is P15, but I think it should be P22. (@samwebster @olejandro ?)

I think the tables B, M, and E correspond to the start/mid/end years shown in this worked example (page 50 of https://iea-etsap.org/docs/TIMES%20Documentation%20PART%20IV_final.pdf): image

Note that the length of these tables should be equal to the length of the time period definition. P15 has length 15, and P22 has 22. The output DD files have length 22. I also tweaked the input to P22 and ran our script, and the tables matched (except for one extra row in B which I'll look into next). This bumped our progress up 0.1%:

42.0% of ground truth rows present in output (11902/28320)

olejandro commented 2 years ago

Good point! The DD files were probably generated with P22. Sorry for that! Basically, the period definition used in a case is set in Cases. ~ActivePDef is the defaul value that is used when a new case is created.

siddharth-krishna commented 2 years ago

Aha, thanks for the pointer. Currently I don't think we're reading any json files as input. I suppose the correct thing to do is to also read Cases.json and generate DD files for a particular case?

Do you know which of the 3 cases the DD files correspond to?

olejandro commented 2 years ago

That would be best! As far as I remember, I generated DDs, so that they could be used for any of the cases. At least this was the intention! Groups contains an overview of DDs belonging to specific group (i.e. using checked: true). Cases specifies the group that is used. Normally the name of a case and the group it uses are similar.

olejandro commented 2 years ago

Regarding parameters B, M and E:

~StartYear indicates the starting point for definition of available model periods.

~StartYear 
2018
~TimePeriods Short Medium Long
1 2 3
1 1 1
2 1
3 4
1
1

Period definition names don't have to include number of periods, so it is best not to rely on such info.

The above input would result in the following B and E:

Short

B ALLYEAR Value
2018 2018
2019 2019
E ALLYEAR Value
2018 2018
2019 2019

Medium

B ALLYEAR Value
2018 2018
2020 2020
2021 2021
2024 2023
E ALLYEAR Value
2018 2019
2020 2020
2021 2022
2024 2025

Long

B ALLYEAR Value
2019 2018
2021 2021
2022 2022
2024 2023
2027 2027
2028 2028
E ALLYEAR Value
2019 2020
2021 2021
2022 2022
2024 2026
2027 2027
2028 2028
samwebster commented 2 years ago

Is there any documentation for the json files?

olejandro commented 2 years ago

Not that I'm aware of... I can probably tell how most of the info is used / help create one.