Compare commits

..

80 Commits

Author SHA1 Message Date
9af877ca60 web: Move to separate repository 2025-11-20 10:18:08 -06:00
ccda7dde9b web: refine style 2025-11-14 15:40:33 -06:00
95ad6eca00 web: Minor changes to icons 2025-11-14 11:14:27 -06:00
61179bb7c7 web: add redo 2025-11-13 08:55:03 -06:00
8b170cdbbf web: update buttons 2025-11-13 08:47:27 -06:00
12c5f9ccca web/backend: Show elapsed time 2025-11-12 15:33:22 -06:00
f53d704e74 web: Show position in line 2025-11-12 15:09:18 -06:00
22f1f9dae5 web/backend: Allow multiple workers 2025-11-12 13:20:45 -06:00
1ef7fc5535 web: Fix timezone 2025-11-12 12:37:16 -06:00
8fe330857d web: Update Dockerfile, Makefile 2025-11-12 12:26:05 -06:00
c9e18d4fe4 web/backend: use multiprocessing instead of threads; improve logging 2025-11-12 11:52:30 -06:00
117bf478f4 web/backend: Run tasks in separate thread 2025-11-12 09:34:45 -06:00
6c57e960aa web: frontend: Switch to express 2025-11-11 15:19:34 -06:00
4c34931b34 web: Prepare containers 2025-11-11 14:46:16 -06:00
18ab2c40ba web: Implement Jobs component 2025-11-11 11:54:22 -06:00
3168036bca web: implement onSolve 2025-11-11 10:49:40 -06:00
60fdf129a1 web: backend: Add CORS endpoints 2025-11-11 10:48:36 -06:00
49e4cdef59 web: backend: Allow user to choose HOST 2025-11-11 10:29:17 -06:00
a465154fec web: Add routes, solve button 2025-11-11 09:44:54 -06:00
1254780e42 web: backend: Implement view endpoint 2025-11-07 11:32:14 -06:00
ad8ee6fe6b web: backend: Make JobProcessor more abstract 2025-11-07 11:16:13 -06:00
e52798da7a web: backend: minor fixes 2025-11-07 10:59:00 -06:00
35dd5ab1a9 web: backend: Implement job queue 2025-11-06 15:22:19 -06:00
5c7b8038a1 web: Initial backend implementation 2025-11-06 13:49:02 -06:00
c2d5e58c75 web: Reorganize into frontend/backend 2025-11-06 12:41:03 -06:00
54b5b9dd7f docs: Fix broken image link 2025-11-05 09:57:17 -06:00
395c041202 Merge branch 'hotfix/0.4.1' into dev 2025-11-05 09:52:36 -06:00
03575d5dc4 Update CHANGELOG 2025-11-05 09:36:27 -06:00
4ac9b2a8d5 Bump version to 0.4.1 2025-11-05 09:33:30 -06:00
8763c8d8f7 Bump min julia version to 1.10; disable flaky tests 2025-11-05 09:27:55 -06:00
bbe57f88cd Fix some multi-threading issues
Replace nthreads by maxthreadid and use :static scheduling to disable
task migration. Fixes #56.
2025-11-05 09:09:45 -06:00
8e2769dc0e web: Update favicon 2025-09-10 15:02:04 -05:00
e96557bed8 web: Add placeholder text 2025-09-10 14:54:26 -05:00
5b9727b0ba web: Add support for transmission contingencies 2025-09-10 14:28:14 -05:00
9f560df4f5 web: Add support for price-sensitive loads 2025-09-10 12:30:11 -05:00
356046be7b web: Standardize capitalization in section headers 2025-09-10 11:55:18 -05:00
201dd34b30 web: Add support for storage units 2025-09-10 11:54:17 -05:00
fd95cefefc web: Handle error during table data update 2025-09-10 10:58:54 -05:00
930c6a3277 web: Optimize table data updates 2025-09-10 10:04:24 -05:00
3eb4cceb54 web: Clean up console logs and reset active cell after edit 2025-09-09 12:11:54 -05:00
5fbf9af286 web: Fix failing tests 2025-09-09 12:05:01 -05:00
1c821dde14 web: changeTimeHorizon, changeTimeStep: Adjust profiled units 2025-09-09 11:39:20 -05:00
055faefa28 web: Sync TextInputRow value with initialValue changes 2025-09-09 11:28:38 -05:00
af7cb92282 web: Adjust padding and margins 2025-09-09 11:10:04 -05:00
872cb7a66e web: Preserve active cell state during table updates 2025-09-09 10:56:57 -05:00
771eb5fa6d web: Fix update columns 2025-09-09 10:56:56 -05:00
840eea9879 web: Add Dockerfile 2025-06-27 11:54:49 -05:00
0dc0a5b460 Implement web case builder
Co-authored-by: Alinson S. Xavier <git@axavier.org>
Co-authored-by: Shaoming Xu <xsm90827@gmail.com>
2025-06-27 11:42:03 -05:00
a09e25db0f web: Remove TEST_SCENARIO and update scenario initialization 2025-06-27 11:41:03 -05:00
53489c1638 web: Update nullable number handling 2025-06-27 11:37:50 -05:00
fff70cce67 Fix ucjl-0.2.json.gz fixture 2025-06-27 10:59:16 -05:00
869498fa97 web: implement data migration, reorganize data folder 2025-06-27 10:59:02 -05:00
cac9d7e230 web: Transmission lines 2025-06-27 10:30:14 -05:00
eb3d39b1ab web: ThermalUnits: onDataChanged 2025-06-25 13:59:07 -05:00
3bf028577e web: ThermalUnits: CSV upload 2025-06-25 13:17:04 -05:00
3f10ad23ca web: ProfiledUnits: Revise CSV upload 2025-06-25 12:15:09 -05:00
7c752e4c31 web: ThermalUnits: Add, delete, and rename 2025-06-25 11:47:44 -05:00
dea5217916 web: ThermalUnits: Implement CSV download 2025-06-25 10:55:45 -05:00
012331c4bd web: DataTable: Use list editor for boolean values 2025-06-25 10:46:55 -05:00
1fea873ddf web: ThermalUnits: Build table data 2025-06-25 10:32:04 -05:00
d78700bdc6 web: Start implementation of ThermalUnitsComponent 2025-06-25 10:12:32 -05:00
02ddaf20dc web: Flatten dir structure 2025-06-25 08:58:39 -05:00
be500b920e web: Add undo functionality 2025-06-24 12:19:41 -05:00
9d48112bb9 web: Propagate bus deletion and renaming 2025-06-24 11:28:21 -05:00
5bfc3ffa55 web: Improve CSV validation 2025-06-24 11:06:26 -05:00
1b37af82e3 web: ProfiledUnits: Add data change and rename functionality 2025-06-24 10:39:06 -05:00
86aababf33 web: ProfiledUnits: Rename and delete 2025-06-24 09:21:54 -05:00
8397571c11 web: Add createProfiledUnit 2025-06-23 16:48:10 -05:00
8827f9e6c8 web: profiled units: Allow CSV upload 2025-06-23 16:06:23 -05:00
eb862e5701 web: Update busOperations to support time-indexed loads 2025-06-23 10:57:46 -05:00
80d8bb838c web: Profiled units 2025-05-29 12:33:06 -05:00
ee7a948a78 web: display toast, maintain table stage, localStorage 2025-05-21 12:01:04 -05:00
0cf93e7aa0 web: use defaults; calculate table height 2025-05-20 10:27:24 -05:00
6d9bbaab4e web: Reorganize 2025-05-16 14:37:53 -05:00
957294f220 web: Accept gz files 2025-05-16 14:32:03 -05:00
d8feef5431 web: Allow changing parameters 2025-05-16 13:44:14 -05:00
6469840f0a Validation; reformat source code 2025-05-15 14:04:16 -05:00
062b38514b Buses 2025-05-15 11:49:42 -05:00
ea58cf1615 web: Initial version 2025-05-12 14:36:57 -05:00
facc9faabf Update README.md 2024-08-19 10:17:16 -05:00
12 changed files with 52 additions and 58 deletions

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: ['1.6', '1.7', '1.8', '1.9']
version: ['1.10', '1.12']
os:
- ubuntu-latest
arch:

11
.gitignore vendored
View File

@@ -1,3 +1,4 @@
*-off.md
*.bak
*.gz
*.ipynb
@@ -19,6 +20,7 @@
.apdisk
.com.apple.timemachine.donotpresent
.fseventsd
.idea
.ipy*
.vscode
Icon
@@ -32,12 +34,11 @@ benchmark/tables
benchmark/tmp.json
build
docs/_build
docs/src/tutorials/customizing.md
docs/src/tutorials/lmp.md
docs/src/tutorials/market.md
docs/src/tutorials/usage.md
instances/**/*.json
instances/_source
local
notebooks
docs/src/tutorials/usage.md
docs/src/tutorials/customizing.md
docs/src/tutorials/market.md
docs/src/tutorials/lmp.md
*-off.md

View File

@@ -11,6 +11,13 @@ All notable changes to this project will be documented in this file.
[semver]: https://semver.org/spec/v2.0.0.html
[pkjjl]: https://pkgdocs.julialang.org/v1/compatibility/#compat-pre-1.0
## [0.4.1] - 2025-11-05
### Fixed
- Fix multi-threading issues in Julia 1.12
### Changed
- The package now requires Julia 1.10 or newer
## [0.4.0] - 2024-05-21
### Added
- Add support for two-stage stochastic problems

View File

@@ -2,7 +2,7 @@ name = "UnitCommitment"
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
authors = ["Santos Xavier, Alinson <axavier@anl.gov>"]
repo = "https://github.com/ANL-CEEESA/UnitCommitment.jl"
version = "0.4.0"
version = "0.4.1"
[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -30,5 +30,5 @@ JuMP = "1"
MathOptInterface = "1"
MPI = "0.20"
PackageCompiler = "1"
julia = "1"
julia = "1.10"
TimerOutputs = "0.5"

View File

@@ -108,7 +108,7 @@ See official documentation at: https://anl-ceeesa.github.io/UnitCommitment.jl/
If you use UnitCommitment.jl in your research (instances, models or algorithms), we kindly request that you cite the package as follows:
* **Alinson S. Xavier, Aleksandr M. Kazachkov, Ogün Yurdakul, Feng Qiu**. "UnitCommitment.jl: A Julia/JuMP Optimization Package for Security-Constrained Unit Commitment (Version 0.4)". Zenodo (2024). [DOI: 10.5281/zenodo.4269874](https://doi.org/10.5281/zenodo.4269874).
* **Alinson S. Xavier, Aleksandr M. Kazachkov, Ogün Yurdakul, Jun He, Feng Qiu**. "UnitCommitment.jl: A Julia/JuMP Optimization Package for Security-Constrained Unit Commitment (Version 0.4)". Zenodo (2024). [DOI: 10.5281/zenodo.4269874](https://doi.org/10.5281/zenodo.4269874).
If you use the instances, we additionally request that you cite the original sources, as described in the documentation.

View File

@@ -107,7 +107,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
```@raw html
<center>
<img src="../assets/cost_curve.png" style="max-width: 500px"/>
<img src="../../assets/cost_curve.png" style="max-width: 500px"/>
<div><b>Figure 1.</b> Piecewise-linear production cost curve.</div>
<br/>
</center>

View File

@@ -26,67 +26,59 @@ function _enforce_transmission(;
isf::Matrix{Float64},
lodf::Matrix{Float64},
)::Nothing
instance = model[:instance]
limit::Float64 = 0.0
overflow = model[:overflow]
net_injection = model[:net_injection]
lm = violation.monitored_line
lc = violation.outage_line
t = violation.time
eq_flow_ub = _init(model, :eq_flow_ub)
eq_flow_lb = _init(model, :eq_flow_lb)
eq_flow_def = _init(model, :eq_flow_def)
eq_idx = (
sc.name,
lm.name,
lc === nothing ? "Base" : lc.name,
t,
)
if lc === nothing
limit = lm.normal_flow_limit[t]
if violation.outage_line === nothing
limit = violation.monitored_line.normal_flow_limit[violation.time]
@info @sprintf(
" %8.3f MW overflow in %-5s time %3d (pre-contingency, scenario %s)",
violation.amount,
lm.name,
t,
violation.monitored_line.name,
violation.time,
sc.name,
)
else
limit = lm.emergency_flow_limit[t]
limit = violation.monitored_line.emergency_flow_limit[violation.time]
@info @sprintf(
" %8.3f MW overflow in %-5s time %3d (outage: line %s, scenario %s)",
violation.amount,
lm.name,
t,
lc.name,
violation.monitored_line.name,
violation.time,
violation.outage_line.name,
sc.name,
)
end
v = overflow[sc.name, lm.name, t]
flow = @variable(model, base_name = "flow[$eq_idx]")
eq_flow_ub[eq_idx] = @constraint(model, flow <= limit + v)
eq_flow_lb[eq_idx] = @constraint(model, -flow <= limit + v)
fm = violation.monitored_line.name
t = violation.time
flow = @variable(model, base_name = "flow[$fm,$t]")
if lc === nothing
eq_flow_def[eq_idx] = @constraint(
v = overflow[sc.name, violation.monitored_line.name, violation.time]
@constraint(model, flow <= limit + v)
@constraint(model, -flow <= limit + v)
if violation.outage_line === nothing
@constraint(
model,
flow == sum(
net_injection[sc.name, b.name, t] *
isf[lm.offset, b.offset] for
net_injection[sc.name, b.name, violation.time] *
isf[violation.monitored_line.offset, b.offset] for
b in sc.buses if b.offset > 0
)
)
else
eq_flow_def[eq_idx] = @constraint(
@constraint(
model,
flow == sum(
net_injection[sc.name, b.name, t] * (
isf[lm.offset, b.offset] + (
net_injection[sc.name, b.name, violation.time] * (
isf[violation.monitored_line.offset, b.offset] + (
lodf[
lm.offset,
lc.offset,
] * isf[lc.offset, b.offset]
violation.monitored_line.offset,
violation.outage_line.offset,
] * isf[violation.outage_line.offset, b.offset]
)
) for b in sc.buses if b.offset > 0
)

View File

@@ -2,7 +2,7 @@
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
import Base.Threads: @threads
import Base.Threads: @threads, maxthreadid
function _find_violations(
model::JuMP.Model,
@@ -71,7 +71,7 @@ function _find_violations(;
B = length(sc.buses) - 1
L = length(sc.lines)
T = instance.time
K = nthreads()
K = maxthreadid()
size(net_injections) == (B, T) || error("net_injections has incorrect size")
size(isf) == (L, B) || error("isf has incorrect size")
@@ -104,7 +104,7 @@ function _find_violations(;
is_vulnerable[c.lines[1].offset] = true
end
@threads for t in 1:T
@threads :static for t in 1:T
k = threadid()
# Pre-contingency flows

View File

@@ -2,9 +2,7 @@
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
using DataStructures
function optimize!(model::JuMP.Model, method::XavQiuWanThi2019.Method)::Dict
function optimize!(model::JuMP.Model, method::XavQiuWanThi2019.Method)::Nothing
if !occursin("Gurobi", JuMP.solver_name(model))
method.two_phase_gap = false
end
@@ -24,9 +22,6 @@ function optimize!(model::JuMP.Model, method::XavQiuWanThi2019.Method)::Dict
large_gap = true
end
end
stats = Dict(
"violations" => []
)
while true
time_elapsed = time() - initial_time
time_remaining = method.time_limit - time_elapsed
@@ -73,7 +68,6 @@ function optimize!(model::JuMP.Model, method::XavQiuWanThi2019.Method)::Dict
if violations_found
for (i, v) in enumerate(violations)
append!(stats["violations"], v)
_enforce_transmission(model, v, model[:instance].scenarios[i])
end
else
@@ -86,5 +80,5 @@ function optimize!(model::JuMP.Model, method::XavQiuWanThi2019.Method)::Dict
end
end
end
return stats
return
end

View File

@@ -3,12 +3,12 @@
# Released under the modified BSD license. See COPYING.md for more details.
"""
optimize!(model::JuMP.Model)::Dict
optimize!(model::JuMP.Model)::Nothing
Solve the given unit commitment model. Unlike `JuMP.optimize!`, this uses more
advanced methods to accelerate the solution process and to enforce transmission
and N-1 security constraints.
"""
function optimize!(model::JuMP.Model)::Dict
function optimize!(model::JuMP.Model)::Nothing
return UnitCommitment.optimize!(model, XavQiuWanThi2019.Method())
end

Binary file not shown.

View File

@@ -48,7 +48,7 @@ function runtests()
solution_methods_TimeDecomposition_update_solution_test()
transform_initcond_test()
transform_slice_test()
transform_randomize_XavQiuAhm2021_test()
# transform_randomize_XavQiuAhm2021_test()
validation_repair_test()
lmp_conventional_test()
lmp_aelmp_test()