calliope icon indicating copy to clipboard operation
calliope copied to clipboard

Allow node params on links

Open jnnr opened this issue 11 months ago • 3 comments

Fixes the following issue:

I am not allowed to set a constraint on flow_out of transmission links. I will get this error:

calliope.exceptions.ModelError: (data_sources, boundary_link_flow_out) | Cannot define transmission technology data over the `nodes` dimension.

I am trying to provide the model with a data table like this:

nodes,techs,timesteps,fix_link_flow_out
ESP,ESP_to_FRA,2017-01-01,120

And a constraint like this:

constraints:
  boundary_constraint_link_flow_out_group_ub:
    foreach: [nodes,techs,carriers,timesteps]
    where: "base_tech=transmission AND carriers=electricity AND fix_link_flow_out"
    equations:
      - expression: flow_out == fix_link_flow_out

Summary of changes in this pull request

I convert the error message into a warning.

Reviewer checklist

  • [ ] Test(s) added to cover contribution
  • [ ] Documentation updated
  • [ ] Changelog updated
  • [ ] Coverage maintained or improved

jnnr avatar Jan 27 '25 14:01 jnnr

Thanks for the contribution @jnnr. My only concern is that this was in there for a reason. If you define transmission data at a node in YAML, what happens with this change? It would require some tests to check for what happens.

brynpickering avatar Feb 03 '25 15:02 brynpickering

Thanks for your comments, @brynpickering and @irm-codebase. Apparently, we need to first better understand how link data is treated in preprocessing to understand the scenarios of failure we are opening up. I will take some time with to study this with @irm-codebase at the whiteboard and come back to this soon.

jnnr avatar Feb 14 '25 10:02 jnnr

Any progress on identifying the link @jnnr ?

brynpickering avatar Feb 25 '25 20:02 brynpickering