Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate MILESTONYR and modify gams scaffold to include it #119

Merged
merged 6 commits into from
Sep 16, 2023

Conversation

siddharth-krishna
Copy link
Collaborator

This PR generates MILESTONYR (but does not implement the alternative method from #97).

In order for this to pass regression tests, we also need to add milestonyr.dd to each demo in olejandro/demos-dd#1 (if they are correctly generated?)

Fixes #97 (right?)

tables_in_file = {
"ts.dd": ["ALL_TS"],
"milestonyr.dd": ["MILESTONYR"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to call it milestony.dd instead of milestonyr.inc so that our existing dd_to_csv.py script will automatically convert it and count this table as existing in the ground truth, so once we add this file to demos-dd, the additional rows regression should be resolved

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is what we would like avoid, because in the existing workflow milestone years are not generated into a dd file, but are added to the run file. Also we should be able to pass the name of the milestone year definition for to the tool to use.

Copy link
Collaborator Author

@siddharth-krishna siddharth-krishna Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. We want to use the milestone years as computed by our tool from the period definitions in the input XL files, right? Then the tool must output it somewhere, whether the run file or a separate file. (and it's cleaner for it to be output to a separate file than for us to find the appropriate line in scenario.run and modify it)

And similarly, we need to know be given the ground truth values of milestone years for the demos-dd. Otherwise how do we check if our tool is computing them correctly?

Perhaps I'm missing something obvious :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not being clear on this one. We would need to expand our testing to do this correctly. If we want to test whether our tool generates correct milestone years, we should include information on all the milestone years definitions in the benchmarks and then compare those to the ones generated by the tool.

Copy link

@Antti-L Antti-L Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to be given the ground truth values of milestone years for the demos-dd

Comment: There is no unique ground truth to that, other than what I have said before: The actual set used in any model run must be a subset of the full set of milestone years according to the active period definition, such that when the subset contains N members, those members must be equal to the first N years from that full set. It is a free choice of the user to select the period definition (if several have been defined) and then the subset thereof when launching a model run, and the second choice does not even affect the contents of the DD files (the first choice does affect the B and E parameters). Therefore, I think the tool should also support making that choice, like VEDA does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we plan to add a command line flag to enable the user to pick. But for the tests it is sufficient for the ground truth to contain any valid milestone years.

@@ -51,7 +51,7 @@ $ BATINCLUDE initmty.mod
$IF NOT DECLARED REG_BNDCST $Abort "You need to use TIMES v2.3.1 or higher"

$BATINCLUDE output.dd
SET MILESTONYR /2005,2006/;
$BATINCLUDE milestonyr.dd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$BATINCLUDE milestonyr.inc

tables_in_file = {
"ts.dd": ["ALL_TS"],
"milestonyr.dd": ["MILESTONYR"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"milestonyr.inc": ["MILESTONYR"],

@olejandro olejandro merged commit 60cb2ff into main Sep 16, 2023
@olejandro olejandro deleted the sidk/milestonyr branch September 16, 2023 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate MILESTONYR
3 participants