Skip to content

Commit

Permalink
add variable to Copperplate model
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomha committed Oct 10, 2024
1 parent 2095cf1 commit 7002474
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/devices_models/device_constructors/branch_constructor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,37 @@ function construct_device!(
return
end

function construct_device!(

Check warning on line 544 in src/devices_models/device_constructors/branch_constructor.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/device_constructors/branch_constructor.jl#L544

Added line #L544 was not covered by tests
container::OptimizationContainer,
sys::PSY.System,
::ArgumentConstructStage,
model::DeviceModel{T, HVDCTwoTerminalUnbounded},
network_model::NetworkModel{CopperPlatePowerModel},
) where {T <: TwoTerminalHVDCTypes}
devices = get_available_components(model, sys)
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded())
add_to_expression!(

Check warning on line 553 in src/devices_models/device_constructors/branch_constructor.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/device_constructors/branch_constructor.jl#L551-L553

Added lines #L551 - L553 were not covered by tests
container,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
network_model,
)
return

Check warning on line 561 in src/devices_models/device_constructors/branch_constructor.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/device_constructors/branch_constructor.jl#L561

Added line #L561 was not covered by tests
end

function construct_device!(

Check warning on line 564 in src/devices_models/device_constructors/branch_constructor.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/device_constructors/branch_constructor.jl#L564

Added line #L564 was not covered by tests
container::OptimizationContainer,
sys::PSY.System,
::ModelConstructStage,
device_model::DeviceModel{<:TwoTerminalHVDCTypes, HVDCTwoTerminalUnbounded},
::NetworkModel{CopperPlatePowerModel},
)
add_constraint_dual!(container, sys, device_model)
return

Check warning on line 572 in src/devices_models/device_constructors/branch_constructor.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/device_constructors/branch_constructor.jl#L571-L572

Added lines #L571 - L572 were not covered by tests
end

# Repeated method to avoid ambiguity between HVDCTwoTerminalUnbounded and HVDCTwoTerminalLossless
function construct_device!(
container::OptimizationContainer,
Expand Down

0 comments on commit 7002474

Please sign in to comment.