Reorganize files; document some methods

This commit is contained in:
2021-05-28 22:48:12 -05:00
parent e594a68492
commit 4e8426beba
30 changed files with 849 additions and 636 deletions

20
src/model/jumpext.jl Normal file
View File

@@ -0,0 +1,20 @@
# 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.
# This file extends some JuMP functions so that decision variables can be safely
# replaced by (constant) floating point numbers.
import JuMP: value, fix, set_name
function value(x::Float64)
return x
end
function fix(x::Float64, v::Float64; force)
return abs(x - v) < 1e-6 || error("Value mismatch: $x != $v")
end
function set_name(x::Float64, n::String)
# nop
end