Reorganize test folder

This commit is contained in:
2021-06-01 08:21:47 -05:00
parent 572fce48f1
commit 38259428e4
17 changed files with 541 additions and 530 deletions

View File

@@ -0,0 +1,28 @@
# 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, Cbc, JuMP
@testset "generate_initial_conditions!" begin
# Load instance
instance = UnitCommitment.read("$(pwd())/fixtures/case118-initcond.json.gz")
optimizer = optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0)
# All units should have unknown initial conditions
for g in instance.units
@test g.initial_power === nothing
@test g.initial_status === nothing
end
# Generate initial conditions
UnitCommitment.generate_initial_conditions!(instance, optimizer)
# All units should now have known initial conditions
for g in instance.units
@test g.initial_power !== nothing
@test g.initial_status !== nothing
end
# TODO: Check that initial conditions are feasible
end