Skip to content

Conversation

jd-lara
Copy link
Member

@jd-lara jd-lara commented Jul 22, 2025

The tests need QA/QC for the new Interface for Interchanges. It requires NREL-Sienna/PowerSystems.jl#1485

@jd-lara jd-lara requested a review from rodrigomha July 22, 2025 07:09
@jd-lara jd-lara self-assigned this Jul 22, 2025
@jd-lara jd-lara marked this pull request as ready for review August 1, 2025 23:21
@jd-lara jd-lara requested review from m-bossart and removed request for rodrigomha August 4, 2025 19:40
@@ -553,52 +553,46 @@ function construct_service!(
return
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dispatch on PSY.TransmissionInterface and not T in line 531?

@@ -676,7 +671,7 @@ function construct_service!(
add_parameters!(container, MaxInterfaceFlowLimitParameter, device, model)
end
end
interface = PSY.get_component(T, sys, get_service_name(model))
interface = PSY.get_component(PSY.TransmissionInterface, sys, get_service_name(model))
add_feedforward_arguments!(container, model, interface)
return
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dispatch on PSY.TransmissionInterface and not T in line 688?

@@ -438,7 +438,7 @@ end
PSI.ModelBuildStatus.BUILT
moi_tests(model, 312, 0, 288, 288, 168, false)

#= TODO: Fix this test
#= TODO: Fix this tes6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

@@ -586,3 +586,164 @@ end
)
@test_throws ArgumentError build!(sim; console_level = Logging.AboveMaxLevel)
end

@testset "2 Areas AreaBalance With Transmission Interface" begin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test name seems misleading, because it only models the interchanges not the interfaces?

@test size(interchange_constraints_ub) == (1, 24)
@test size(interchange_constraints_lb) == (1, 24)

interchange_constraints_ub["interface1_2_3", 1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is unused. Delete?

Comment on lines +687 to +695
interface = TransmissionInterface(;
name = "interface1_2_3",
available = true,
active_power_flow_limits = (min = 0.0, max = 1.0),
violation_penalty = 1000.0,
direction_mapping = Dict("interchange1_2" => 1,
"interchange1_3" => -1,
),
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interchange1_2 and interchange1_3 are both defined as the flows out of area 1, so wouldn't the direction be -1 for both of them when defining the interface if we want to limit all the flows into 1?

@jd-lara jd-lara merged commit 42fffcd into psy5 Aug 6, 2025
1 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants