Skip to content

Commit

Permalink
Merge pull request #1011 from NREL-Sienna/jd/hvdc_test_fix
Browse files Browse the repository at this point in the history
relax test
  • Loading branch information
jd-lara authored Sep 21, 2023
2 parents 3cfd046 + 39eb722 commit 523fc9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_device_branch_constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ end
add_component!(sys_5, hvdc)

template_uc = ProblemTemplate(
NetworkModel(StandardPTDFModel; PTDF_matrix = PTDF(sys_5; linear_solver = "Dense")),
NetworkModel(StandardPTDFModel; PTDF_matrix = PTDF(sys_5)),
)

set_device_model!(template_uc, ThermalStandard, ThermalCompactUnitCommitment)
Expand Down Expand Up @@ -286,7 +286,8 @@ end
dcp_objective = model.internal.container.optimizer_stats.objective_value

@test isapprox(dcp_objective, ptdf_objective; atol = 0.1)
@test all(isapprox.(ptdf_values[!, "1"], dcp_values[!, "1"]; atol = 0.1))
# Resulting solution is in the 4e5 order of magnitude
@test all(isapprox.(ptdf_values[!, "1"], dcp_values[!, "1"]; atol = 10))
end

@testset "HVDCDispatch Model Tests" begin
Expand Down

0 comments on commit 523fc9f

Please sign in to comment.