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

Ensure GAMS can run all the benchmarks #183

Merged
merged 15 commits into from
Feb 23, 2024
Merged

Conversation

olejandro
Copy link
Member

No description provided.

@olejandro olejandro changed the title Ensure GAMS can run all the benchmarks Increase GAMS chances to run the benchmarks Feb 13, 2024
@olejandro olejandro marked this pull request as ready for review February 13, 2024 22:21
@olejandro olejandro marked this pull request as draft February 13, 2024 23:31
@olejandro olejandro changed the title Increase GAMS chances to run the benchmarks Ensure GAMS can run all the benchmarks Feb 13, 2024
@olejandro
Copy link
Member Author

olejandro commented Feb 13, 2024

#181 would need to be finished first to (hopefully) resolve domain violations in COM_DESC, COM_GMAP, COM_LIM, COM_TMAP, COM_TSL, COM_UNIT, NRG_TMAP, PRC_ACTUNT, PRC_DESC, PRC_MAP, PRC_TSL, PRC_VINT, and TOP for Ireland

@olejandro
Copy link
Member Author

Also there are Element is redifined errors which are caused by multiple descriptions for the same processes / commodities.

@Antti-L
Copy link

Antti-L commented Feb 15, 2024

What is the reasoning for including in times_prc_sets only "DMD", "CHP", "ELE", "HPL", "IRE", "NST", "PRE", "STG", "STK", "STS"? Why not include other types as well, e.g. DISTR, MISC, PRV, PRW, REF, XTRACT, RENEW? Some of these even have special meaning in the TIMES code, and therefore models would not work correctly if you exclude them.

@olejandro
Copy link
Member Author

olejandro commented Feb 15, 2024

Thanks, @Antti-L. No particular reason, except for the other types not present in any of the benchmarks and the ease with which the list can be expanded. I can include all of them already. I.e. all members of SET PRC_GRP in maplists.def?

@olejandro olejandro marked this pull request as ready for review February 22, 2024 12:23
@olejandro
Copy link
Member Author

Opened #194 based on results from CI, but also modified benchmarks to allow a successful GAMS run on Ireland.

@@ -205,6 +206,7 @@ def __init__(
self.all_attributes,
param_mappings,
) = Config._process_times_info(times_info_file)
self.times_sets = Config._read_times_sets(times_sets_file)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also add a type annotation for times_sets after line 193

olejandro pushed a commit that referenced this pull request Feb 23, 2024
Now I remember why I used subprocess to call `xl2times` from
`run_benchmarks.py`: in the CI, when it switches to the main branch, it
needs to run the main branch's version of the tool. But if we call the
tool as a python function, I think some of the PR version of the tool
remains in memory, and we don't get what we want. This looks to be the
reason CI is failing on this PR #183 :

https://github.com/etsap-TIMES/xl2times/actions/runs/8020431584/job/21910275023

(The error is that it can't find a file in `xl2times/config/...` that
was added by the PR when it is running tests in the main branch.)

This PR undoes the change from #193 that removed the use of subprocess.
See also
https://github.com/etsap-TIMES/xl2times/pull/193/files?diff=unified&w=0#r1498683705
@olejandro olejandro merged commit 69b172e into main Feb 23, 2024
1 check passed
@olejandro olejandro deleted the olex/update-benchmarks branch February 23, 2024 16:18
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.

3 participants