Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomha committed May 17, 2024
1 parent 7248d17 commit c5e62b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/test_device_thermal_generation_constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
"quadratic_fuel_test_ts",
"pwl_io_fuel_test_ts",
"pwl_incremental_fuel_test_ts",
"market_bid_cost"
"market_bid_cost",
]
for i in test_cases
@testset "$i" begin
Expand Down
8 changes: 4 additions & 4 deletions test/test_model_decision.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ end
check_duration_off_initial_conditions_values(model, ThermalMultiStart)
@test solve!(model) == PSI.RunStatus.SUCCESSFULLY_FINALIZED

######## Test with ThermalCompactUnitCommitment ########
######## Test with ThermalStandardUnitCommitment ########
template = get_thermal_standard_uc_template()
c_sys5_uc = PSB.build_system(PSITestSystems, "c_sys5_pglib"; force_build = true)
set_device_model!(template, ThermalMultiStart, ThermalCompactUnitCommitment)
set_device_model!(template, ThermalStandard, ThermalCompactUnitCommitment)
set_device_model!(template, ThermalMultiStart, ThermalStandardUnitCommitment)
set_device_model!(template, ThermalStandard, ThermalStandardUnitCommitment)
model = DecisionModel(template, c_sys5_uc; optimizer = HiGHS_optimizer)
@test build!(model; output_dir = mktempdir(; cleanup = true)) ==
PSI.ModelBuildStatus.BUILT
Expand Down Expand Up @@ -654,7 +654,7 @@ end
template = get_thermal_dispatch_template_network()
c_sys5_bat = PSB.build_system(PSITestSystems, "c_sys5_bat_ems"; force_build = true)
device_model = DeviceModel(
BatteryEMS,
EnergyReservoirStorage,
StorageDispatchWithReserves;
attributes = Dict{String, Any}(
"reservation" => true,
Expand Down
8 changes: 4 additions & 4 deletions test/test_model_emulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ end
check_duration_off_initial_conditions_values(model, ThermalMultiStart)
@test run!(model) == PSI.RunStatus.SUCCESSFULLY_FINALIZED

######## Test with ThermalCompactUnitCommitment ########
######## Test with ThermalStandardUnitCommitment ########
template = get_thermal_standard_uc_template()
c_sys5_uc = PSB.build_system(
PSITestSystems,
"c_sys5_pglib";
add_single_time_series = true,
force_build = true,
)
set_device_model!(template, ThermalMultiStart, ThermalCompactUnitCommitment)
set_device_model!(template, ThermalMultiStart, ThermalStandardUnitCommitment)
model = EmulationModel(template, c_sys5_uc; optimizer = HiGHS_optimizer)
@test build!(model; executions = 1, output_dir = mktempdir(; cleanup = true)) ==
PSI.ModelBuildStatus.BUILT
Expand All @@ -82,15 +82,15 @@ end
check_duration_off_initial_conditions_values(model, ThermalMultiStart)
@test run!(model) == PSI.RunStatus.SUCCESSFULLY_FINALIZED

######## Test with ThermalCompactDispatch ########
######## Test with ThermalStandardDispatch ########
template = get_thermal_standard_uc_template()
c_sys5_uc = PSB.build_system(
PSITestSystems,
"c_sys5_pglib";
add_single_time_series = true,
force_build = true,
)
device_model = DeviceModel(PSY.ThermalStandard, PSI.ThermalCompactDispatch)
device_model = DeviceModel(PSY.ThermalStandard, PSI.ThermalStandardDispatch)
set_device_model!(template, device_model)
model = EmulationModel(template, c_sys5_uc; optimizer = HiGHS_optimizer)
@test build!(model; executions = 10, output_dir = mktempdir(; cleanup = true)) ==
Expand Down

0 comments on commit c5e62b2

Please sign in to comment.