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

Name emissions constraints to allow for emissions extensions #36

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

* Updated minor issues in the documentation (docstrings, indices, and quick start).
* Use dev version of EMB for examples when running as part of tests, solving [Issue #17](https://github.com/EnergyModelsX/EnergyModelsBase.jl/issues/17).
* Naming of the total emission constraint to allow for updates in the coefficients in other packages.

## Version 0.7.0 (2024-05-24)

Expand Down
5 changes: 3 additions & 2 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ function constraints_emissions(m, 𝒩, 𝒯, 𝒫, modeltype::EnergyModel)
𝒯ᴵⁿᵛ = strategic_periods(𝒯)

# Creation of the individual constraints.
@constraint(m, [t ∈ 𝒯, p ∈ 𝒫ᵉᵐ],
m[:emissions_total][t, p] == sum(m[:emissions_node][n, t, p] for n ∈ 𝒩ᵉᵐ)
@constraint(m, con_em_tot[t ∈ 𝒯, p ∈ 𝒫ᵉᵐ],
m[:emissions_total][t, p] ==
sum(m[:emissions_node][n, t, p] for n ∈ 𝒩ᵉᵐ)
)
@constraint(m, [t_inv ∈ 𝒯ᴵⁿᵛ, p ∈ 𝒫ᵉᵐ],
m[:emissions_strategic][t_inv, p] ==
Expand Down
Loading