You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented custom constraints in my model like regional CO2/Capacity/SAFE- and would like to access the duals of these constraints. However- as currently implemented assign_duals() will only assign duals where the component name from (c, attr = name.split("-", 1) ) is a network component or is "GlobalConstraint".
I believe this is already an issue with other pypsa-eur/usa opts like SAFE and CCL where the constraint names are not tied to components.
A temporary solution for myself is to name these constraints as "GlobalConstraint-SAFE_XXX_Region". However, it could be useful to have a dedicated location for these regional/custom constraint duals + a place to store the constraints themselves. I am happy to implement a solution if you all have any preferred location/method for storing these variables.
Or- perhaps just adding in the documentation a note like "if you want to access your duals then set the constraint name to "GlobalConstraint-...."
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like to see
I have implemented custom constraints in my model like regional CO2/Capacity/SAFE- and would like to access the duals of these constraints. However- as currently implemented assign_duals() will only assign duals where the component name from (
c, attr = name.split("-", 1)
) is a network component or is "GlobalConstraint".I believe this is already an issue with other pypsa-eur/usa opts like SAFE and CCL where the constraint names are not tied to components.
A temporary solution for myself is to name these constraints as "GlobalConstraint-SAFE_XXX_Region". However, it could be useful to have a dedicated location for these regional/custom constraint duals + a place to store the constraints themselves. I am happy to implement a solution if you all have any preferred location/method for storing these variables.
Or- perhaps just adding in the documentation a note like "if you want to access your duals then set the constraint name to "GlobalConstraint-...."
The text was updated successfully, but these errors were encountered: