Skip to content

Commit

Permalink
updates for pmr v0.8 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin authored Feb 2, 2024
1 parent 33338a0 commit bb95d7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ GasPowerModels.jl Change Log
### staged
- nothing

### v0.6.0
- Update to PowerModelsRestoration v0.8 (breaking)

### v0.5.1
- Update normalized pressure zone values in matgas data
- Add missing `report` flags to variables
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "GasPowerModels"
uuid = "1fcaf345-95e3-5b8b-91d6-2145eb844b9d"
authors = ["Russell Bent"]
repo = "https://github.com/lanl-ansi/GasPowerModels.jl"
version = "0.5.1"
version = "0.6.0"

[deps]
GasModels = "5e113713-6c35-5477-b766-e1109486666f"
Expand All @@ -18,7 +18,7 @@ InfrastructureModels = "~0.6, ~0.7"
JSON = "~0.21"
JuMP = "~0.23, 1"
Memento = "~1.0, ~1.1, ~1.2, ~1.3, ~1.4"
PowerModelsRestoration = "~0.6, ~0.7"
PowerModelsRestoration = "~0.8"
julia = "1.6"

[extras]
Expand Down
3 changes: 1 addition & 2 deletions src/core/objective.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ function objective_expression_opf_cost(gpm::AbstractGasPowerModel; n::Int = nw_i
gen_cost = Dict{Tuple{Int, Int}, Any}()

for (i, gen) in _IM.ref(gpm, _PM.pm_it_sym, n, :gen)
conductor_ids = _PM.conductor_ids(_get_powermodel_from_gaspowermodel(gpm), n)
pg = sum(_IM.var(gpm, _PM.pm_it_sym, n, :pg, i)[c] for c in conductor_ids)
pg = _IM.var(gpm, _PM.pm_it_sym, n, :pg, i)

if length(gen["cost"]) == 1
gen_cost[(n, i)] = gen["cost"][1]
Expand Down

0 comments on commit bb95d7f

Please sign in to comment.