Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Dec 5, 2023
1 parent 3a0d9b8 commit 5fa7545
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/stateEstimation/badData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@ system30 = powerSystem(string(pathData, "case30test.m"))
addPmu!(system14, device; bus = key, magnitude = 1.0, angle = analysis.voltage.angle[value], noise = false)
end

####### First Pass #######
####### WLS: One Outlier #######
updateWattmeter!(system14, device; label = "Wattmeter 2", active = 100, noise = false)
analysisSE = dcStateEstimation(system14, device)
solve!(system14, analysisSE)

badData!(system14, device, analysisSE; threshold = 3.0)
@test analysisSE.bad.label == "Wattmeter 2"
@test analysisSE.bad.maxNormalizedResidual == 829.9386701319687
@test analysisSE.bad.maxNormalizedResidual 829.9 atol = 1e-1

solve!(system14, analysisSE)
@test analysis.voltage.angle analysisSE.voltage.angle

####### Second Pass #######
####### WLS: Two Outliers #######
updatePmu!(system14, device; label = "PMU 10", angle = 10pi, noise = false)
analysisSE = dcStateEstimation(system14, device)
solve!(system14, analysisSE)

badData!(system14, device, analysisSE; threshold = 3.0)
@test analysisSE.bad.label == "PMU 10"
@test analysisSE.bad.maxNormalizedResidual == 5186.377783410225
@test analysisSE.bad.maxNormalizedResidual 5186.3 atol = 1e-1

solve!(system14, analysisSE)
badData!(system14, device, analysisSE; threshold = 3.0)
@test analysisSE.bad.label == "Wattmeter 2"
@test analysisSE.bad.maxNormalizedResidual == 829.9362046685274
@test analysisSE.bad.maxNormalizedResidual 829.9 atol = 1e-1

solve!(system14, analysisSE)
@test analysis.voltage.angle analysisSE.voltage.angle
Expand Down

0 comments on commit 5fa7545

Please sign in to comment.