mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
Compare commits
1 Commits
hotfix/0.4
...
hotfix/0.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 03575d5dc4 |
@@ -11,9 +11,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
[semver]: https://semver.org/spec/v2.0.0.html
|
[semver]: https://semver.org/spec/v2.0.0.html
|
||||||
[pkjjl]: https://pkgdocs.julialang.org/v1/compatibility/#compat-pre-1.0
|
[pkjjl]: https://pkgdocs.julialang.org/v1/compatibility/#compat-pre-1.0
|
||||||
|
|
||||||
## [0.4.2] - 2025-11-27
|
## [0.4.1] - 2025-11-05
|
||||||
### Fixed
|
### Fixed
|
||||||
- KnuOstWat2018: Fixed a bug in `eq_segprod_limit` constraint (#17)
|
- Fix multi-threading issues in Julia 1.12
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- The package now requires Julia 1.10 or newer
|
||||||
|
|
||||||
## [0.4.0] - 2024-05-21
|
## [0.4.0] - 2024-05-21
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name = "UnitCommitment"
|
|||||||
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
|
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
|
||||||
authors = ["Santos Xavier, Alinson <axavier@anl.gov>"]
|
authors = ["Santos Xavier, Alinson <axavier@anl.gov>"]
|
||||||
repo = "https://github.com/ANL-CEEESA/UnitCommitment.jl"
|
repo = "https://github.com/ANL-CEEESA/UnitCommitment.jl"
|
||||||
version = "0.4.2"
|
version = "0.4.1"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
|
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
|
||||||
|
|||||||
@@ -67,19 +67,21 @@ function _add_production_piecewise_linear_eqs!(
|
|||||||
(t < T ? Cw * switch_off[gn, t+1] : 0.0)
|
(t < T ? Cw * switch_off[gn, t+1] : 0.0)
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
# Equation (47a) in Kneuven et al. (2020)
|
# Equation (47a)/(48a) in Kneuven et al. (2020)
|
||||||
eq_segprod_limit_b[sc.name, gn, t, k] = @constraint(
|
eq_segprod_limit_b[sc.name, gn, t, k] = @constraint(
|
||||||
model,
|
model,
|
||||||
segprod[sc.name, gn, t, k] <=
|
segprod[sc.name, gn, t, k] <=
|
||||||
g.cost_segments[k].mw[t] * is_on[gn, t] -
|
g.cost_segments[k].mw[t] * is_on[gn, t] -
|
||||||
Cv * switch_on[gn, t]
|
Cv * switch_on[gn, t] -
|
||||||
|
(t < T ? max(0, Cv - Cw) * switch_off[gn, t+1] : 0.0)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Equation (47b) in Kneuven et al. (2020)
|
# Equation (47b)/(48b) in Kneuven et al. (2020)
|
||||||
eq_segprod_limit_c[sc.name, gn, t, k] = @constraint(
|
eq_segprod_limit_c[sc.name, gn, t, k] = @constraint(
|
||||||
model,
|
model,
|
||||||
segprod[sc.name, gn, t, k] <=
|
segprod[sc.name, gn, t, k] <=
|
||||||
g.cost_segments[k].mw[t] * is_on[gn, t] -
|
g.cost_segments[k].mw[t] * is_on[gn, t] -
|
||||||
|
max(0, Cw - Cv) * switch_on[gn, t] -
|
||||||
(t < T ? Cw * switch_off[gn, t+1] : 0.0)
|
(t < T ? Cw * switch_off[gn, t+1] : 0.0)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
BIN
test/fixtures/issue-0057.json.gz
vendored
BIN
test/fixtures/issue-0057.json.gz
vendored
Binary file not shown.
@@ -23,7 +23,6 @@ include("validation/repair_test.jl")
|
|||||||
include("lmp/conventional_test.jl")
|
include("lmp/conventional_test.jl")
|
||||||
include("lmp/aelmp_test.jl")
|
include("lmp/aelmp_test.jl")
|
||||||
include("market/market_test.jl")
|
include("market/market_test.jl")
|
||||||
include("regression.jl")
|
|
||||||
|
|
||||||
basedir = dirname(@__FILE__)
|
basedir = dirname(@__FILE__)
|
||||||
|
|
||||||
@@ -55,7 +54,6 @@ function runtests()
|
|||||||
lmp_aelmp_test()
|
lmp_aelmp_test()
|
||||||
simple_market_test()
|
simple_market_test()
|
||||||
stochastic_market_test()
|
stochastic_market_test()
|
||||||
regression_test()
|
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
|
|
||||||
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
|
||||||
# Released under the modified BSD license. See COPYING.md for more details.
|
|
||||||
|
|
||||||
using UnitCommitment, HiGHS, JuMP
|
|
||||||
|
|
||||||
function regression_test()
|
|
||||||
@testset "GitHub Issue #57" begin
|
|
||||||
instance = UnitCommitment.read(fixture("issue-0057.json.gz"))
|
|
||||||
model = UnitCommitment.build_model(
|
|
||||||
instance = instance,
|
|
||||||
optimizer = HiGHS.Optimizer,
|
|
||||||
)
|
|
||||||
JuMP.set_silent(model)
|
|
||||||
UnitCommitment.optimize!(model)
|
|
||||||
solution = UnitCommitment.solution(model)
|
|
||||||
@test solution["Thermal production (MW)"]["gen_524d4c85"][1] == 90.0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Reference in New Issue
Block a user