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

Negative shadow price for Global CO2 constraint (also in linopy model ) #843

Open
martavp opened this issue Feb 20, 2024 · 0 comments · May be fixed by #870
Open

Negative shadow price for Global CO2 constraint (also in linopy model ) #843

martavp opened this issue Feb 20, 2024 · 0 comments · May be fixed by #870
Labels

Comments

@martavp
Copy link
Member

martavp commented Feb 20, 2024

The CO2 shadow price associated with the 'GlobalConstraint-CO2limit' is negative in the postnetwork obtained from pypsa-eur. I checked the linopy model m.dual['GlobalConstraint-CO2limit'] and it is also negative there.

Actually, I realized that for the m.dual['GlobalConstraint-CO2limit'] a long array is saved. I was expecting to get only one value as I do when I ask for m.dual['GlobalConstraint-co2_sequestration_limit'].

You can access my linopy model here and reproduce this by

m.linopy_read_netcdf(filename)
m.dual['GlobalConstraint-CO2limit']

I'm using the (almost) latest versions, in particular
python 3.11.7
pandas 2.1.4
pypsa 0.26.2
linopy 0.3.2
xarray 2023.12.0
so the fix implemented in September is included. I also checked the release notes and this does not seem to be fixed in the version of the past few days.

@FabianHofmann Would you mind checking if you are also getting negative values for the CO2 shadow price? thanks!

@martavp martavp added the bug label Feb 20, 2024
@martavp martavp linked a pull request Apr 17, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant