etsap-TIMES / xl2times

Open source tool to convert TIMES models specified in Excel
https://xl2times.readthedocs.io/
MIT License
12 stars 7 forks source link

Preserve some parameters defined for external regions #189

Open olejandro opened 7 months ago

olejandro commented 7 months ago
          I see there is a section **Remove external region columns from the all tables except tradelinks**.

Note that there are some parameters defined for external regions that must be preserved, at least IRE_XBND.

Originally posted by @Antti-L in https://github.com/etsap-TIMES/xl2times/issues/181#issuecomment-1946824878

olejandro commented 7 months ago

@Antti-L, I've opened this issue to we can proceed with the discussion. :)

Do you have any model available that could be used as a test case for this? It would also help ensuring that functionality won't break in the future versions.

Also, do you have an overview of attributes, in addition to IRE_XBND, for which this is important?

Antti-L commented 7 months ago

TIMES definitely supports using IRE_XBND for external regions, and it works well. Regarding VEDA support, see some earlier discussion here: https://forum.kanors-emr.org/showthread.php?tid=199&highlight=IRE_XBND Unfortunately, I was not able to get it working under VEDA2, when I now tried! I have now complained about it on the VEDA2 Forum. Anyway, as TIMES fully supports it, I think it would be nice to have it supported also by the xl2times tool...

Preserving some UC attributes might also be useful for model linking, but not necessary for normal usage.

olejandro commented 7 months ago

Thanks @Antti-L! I can defnitely see how supporting e.g. IRE_XBND for external regions could be useful. From the TIMES perspective, should any other input data, other than the attribute values and ALL_REG membership of the external region, be retained / specified for the external region in dd files?

Antti-L commented 7 months ago

From the TIMES perspective, should any other input data, other than the attribute values and ALL_REG membership of the external region, be retained / specified for the external region in dd files?

I am not quite sure what you mean by "other than the attribute values". If you refer to sets as opposed to parameter attributes, I confirm that no other set attributes than ALL_REG need to be retained for external regions, in normal usage.

Anyway, there are quite a few TIMES attributes declared on ALL_REG for the "main" region index, but I guess IRE_XBND may actually be the only one needed for normal usage. All the other attributes (e.g. various TS and UC attributes) are apparently supported just to facilitate easier model linking (based on the original design of TIMES).

However, there are several IRE attributes that have both a "main" region index and a companion region index, where the second region index is required to be supported for any region. Such are IRE_BND, IRE_CCVT and IRE_TSCVT, of which at least IRE_BND should be supported by xl2times for any region as the second region index.

Antti-L commented 7 months ago

Breaking news: The next version of VEDA2 will correctly support IRE_XBND for external regions. :grin:

olejandro commented 7 months ago

That's great news! Thanks :-)