mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
Rename Unit to ThermalUnit
This commit is contained in:
@@ -10,7 +10,7 @@ using UnitCommitment, Cbc, JuMP
|
||||
optimizer = optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0)
|
||||
sc = instance.scenarios[1]
|
||||
# All units should have unknown initial conditions
|
||||
for g in sc.units
|
||||
for g in sc.thermal_units
|
||||
@test g.initial_power === nothing
|
||||
@test g.initial_status === nothing
|
||||
end
|
||||
@@ -19,7 +19,7 @@ using UnitCommitment, Cbc, JuMP
|
||||
UnitCommitment.generate_initial_conditions!(sc, optimizer)
|
||||
|
||||
# All units should now have known initial conditions
|
||||
for g in sc.units
|
||||
for g in sc.thermal_units
|
||||
@test g.initial_power !== nothing
|
||||
@test g.initial_status !== nothing
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ test_approx(x, y) = @test isapprox(x, y, atol = 1e-3)
|
||||
@testset "cost and load share" begin
|
||||
sc = get_scenario()
|
||||
# Check original costs
|
||||
unit = sc.units[10]
|
||||
unit = sc.thermal_units[10]
|
||||
test_approx(unit.min_power_cost[1], 825.023)
|
||||
test_approx(unit.cost_segments[1].cost[1], 36.659)
|
||||
test_approx(unit.startup_categories[1].cost[1], 7570.42)
|
||||
|
||||
@@ -13,7 +13,7 @@ using UnitCommitment, LinearAlgebra, Cbc, JuMP, JSON, GZip
|
||||
@test modified.time == 2
|
||||
@test length(sc.power_balance_penalty) == 2
|
||||
@test length(sc.reserves_by_name["r1"].amount) == 2
|
||||
for u in sc.units
|
||||
for u in sc.thermal_units
|
||||
@test length(u.max_power) == 2
|
||||
@test length(u.min_power) == 2
|
||||
@test length(u.must_run) == 2
|
||||
|
||||
Reference in New Issue
Block a user