mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 00:08:52 -06:00
Flatten dir structure, update docstrings
This commit is contained in:
@@ -21,7 +21,7 @@ import UnitCommitment:
|
||||
# policy 1: allow offlines; consider startups
|
||||
aelmp_1 = UnitCommitment.compute_lmp(
|
||||
model,
|
||||
AELMP.Method(),
|
||||
AELMP(),
|
||||
optimizer=HiGHS.Optimizer
|
||||
)
|
||||
@test aelmp_1["B1", 1] ≈ 231.7 atol = 0.1
|
||||
@@ -29,7 +29,7 @@ import UnitCommitment:
|
||||
# policy 2: do not allow offlines; but consider startups
|
||||
aelmp_2 = UnitCommitment.compute_lmp(
|
||||
model,
|
||||
AELMP.Method(
|
||||
AELMP(
|
||||
allow_offline_participation=false,
|
||||
consider_startup_costs=true
|
||||
),
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
using UnitCommitment, Cbc, HiGHS, JuMP
|
||||
import UnitCommitment:
|
||||
LMP
|
||||
import UnitCommitment: ConventionalLMP
|
||||
|
||||
function solve_lmp_testcase(path::String)
|
||||
instance = UnitCommitment.read(path)
|
||||
@@ -13,13 +12,11 @@ function solve_lmp_testcase(path::String)
|
||||
optimizer = Cbc.Optimizer,
|
||||
variable_names = true,
|
||||
)
|
||||
# set silent, solve the UC
|
||||
JuMP.set_silent(model)
|
||||
UnitCommitment.optimize!(model)
|
||||
# get the lmp
|
||||
lmp = UnitCommitment.compute_lmp(
|
||||
model,
|
||||
LMP.Method(),
|
||||
ConventionalLMP(),
|
||||
optimizer=HiGHS.Optimizer,
|
||||
)
|
||||
return lmp
|
||||
|
||||
Reference in New Issue
Block a user