Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ PowerFlows = "94fada2c-0ca5-4b90-a1fb-4bc5b59ccfc7"
[extensions]
PowerFlowsExt = "PowerFlows"

[sources]
InfrastructureSystems = {url = "https://github.com/NREL-Sienna/InfrastructureSystems.jl", rev = "IS4"}

[compat]
Dates = "1"
DocStringExtensions = "~0.8, ~0.9"
Expand Down
1 change: 1 addition & 0 deletions src/PowerOperationsModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ export HydroWaterFactorModel
export HydroWaterModelReservoir
export HydroTurbineBilinearDispatch
export HydroTurbineWaterLinearDispatch
export HydroTurbineWaterLinearCommitment
export HydroEnergyModelReservoir
export HydroTurbineEnergyDispatch
export HydroTurbineEnergyCommitment
Expand Down
162 changes: 77 additions & 85 deletions src/ac_transmission_models/AC_branches.jl

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions src/ac_transmission_models/branch_constructor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ function construct_device!(
container,
FlowActivePowerSlackUpperBound,
devices,
StaticBranch(),
StaticBranch,
)
add_variables!(
container,
FlowActivePowerSlackLowerBound,
devices,
StaticBranch(),
StaticBranch,
)
end
add_feedforward_arguments!(container, device_model, devices)
Expand Down Expand Up @@ -136,14 +136,14 @@ function construct_device!(
FlowActivePowerSlackUpperBound,
network_model,
devices,
StaticBranch(),
StaticBranch,
)
add_variables!(
container,
FlowActivePowerSlackLowerBound,
network_model,
devices,
StaticBranch(),
StaticBranch,
)
end

Expand Down Expand Up @@ -292,7 +292,7 @@ function construct_device!(
FlowActivePowerVariable,
network_model,
devices,
StaticBranchBounds(),
StaticBranchBounds,
)

if get_use_slacks(device_model)
Expand All @@ -301,14 +301,14 @@ function construct_device!(
FlowActivePowerSlackUpperBound,
network_model,
devices,
StaticBranch(),
StaticBranch,
)
add_variables!(
container,
FlowActivePowerSlackLowerBound,
network_model,
devices,
StaticBranch(),
StaticBranch,
)
end

Expand Down Expand Up @@ -391,7 +391,7 @@ function construct_device!(
container,
FlowActivePowerSlackUpperBound,
devices,
StaticBranch(),
StaticBranch,
)
end
add_feedforward_arguments!(container, device_model, devices)
Expand Down Expand Up @@ -501,7 +501,7 @@ function construct_device!(
FlowActivePowerVariable,
network_model,
devices,
HVDCTwoTerminalLossless(),
HVDCTwoTerminalLossless,
)
add_to_expression!(
container,
Expand Down Expand Up @@ -572,7 +572,7 @@ function construct_device!(
network_model::NetworkModel{CopperPlatePowerModel},
) where {T <: PSY.TwoTerminalHVDC}
devices = get_available_components(device_model, sys)
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded())
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -675,7 +675,7 @@ function construct_device!(
network_model::NetworkModel{<:AbstractPTDFModel},
) where {T <: PSY.TwoTerminalHVDC}
devices = get_available_components(device_model, sys)
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded())
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalUnbounded)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -737,7 +737,7 @@ function construct_device!(
network_model::NetworkModel{<:AbstractPTDFModel},
) where {T <: PSY.TwoTerminalHVDC}
devices = get_available_components(device_model, sys)
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalLossless())
add_variables!(container, FlowActivePowerVariable, devices, HVDCTwoTerminalLossless)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -779,16 +779,16 @@ function construct_device!(
container,
FlowActivePowerToFromVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(
container,
FlowActivePowerFromToVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(container, HVDCLosses, devices, HVDCTwoTerminalDispatch())
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch())
add_variables!(container, HVDCLosses, devices, HVDCTwoTerminalDispatch)
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -857,16 +857,16 @@ function construct_device!(
container,
FlowActivePowerToFromVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(
container,
FlowActivePowerFromToVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch())
add_variables!(container, HVDCLosses, devices, HVDCTwoTerminalDispatch())
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch)
add_variables!(container, HVDCLosses, devices, HVDCTwoTerminalDispatch)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -930,13 +930,13 @@ function construct_device!(
container,
HVDCActivePowerReceivedFromVariable,
devices,
HVDCTwoTerminalPiecewiseLoss(),
HVDCTwoTerminalPiecewiseLoss,
)
add_variables!(
container,
HVDCActivePowerReceivedToVariable,
devices,
HVDCTwoTerminalPiecewiseLoss(),
HVDCTwoTerminalPiecewiseLoss,
)
_add_sparse_pwl_loss_variables!(container, devices, device_model)
add_to_expression!(
Expand Down Expand Up @@ -1010,15 +1010,15 @@ function construct_device!(
container,
FlowActivePowerToFromVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(
container,
FlowActivePowerFromToVariable,
devices,
HVDCTwoTerminalDispatch(),
HVDCTwoTerminalDispatch,
)
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch())
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCTwoTerminalDispatch)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -1100,103 +1100,103 @@ function construct_device!(
container,
HVDCActivePowerReceivedFromVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCActivePowerReceivedToVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCReactivePowerReceivedFromVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCReactivePowerReceivedToVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierDelayAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterExtinctionAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierPowerFactorAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterPowerFactorAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierOverlapAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterOverlapAngleVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierDCVoltageVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterDCVoltageVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierACCurrentVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterACCurrentVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
DCLineCurrentFlowVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCRectifierTapSettingVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)
add_variables!(
container,
HVDCInverterTapSettingVariable,
devices,
HVDCTwoTerminalLCC(),
HVDCTwoTerminalLCC,
)

# Expressions
Expand Down Expand Up @@ -1335,8 +1335,8 @@ function construct_device!(
network_model::NetworkModel{DCPPowerModel},
)
devices = get_available_components(device_model, sys)
add_variables!(container, FlowActivePowerVariable, devices, PhaseAngleControl())
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl())
add_variables!(container, FlowActivePowerVariable, devices, PhaseAngleControl)
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl)
add_to_expression!(
container,
ActivePowerBalance,
Expand All @@ -1357,8 +1357,8 @@ function construct_device!(
network_model::NetworkModel{<:AbstractPTDFModel},
)
devices = get_available_components(device_model, sys)
add_variables!(container, FlowActivePowerVariable, devices, PhaseAngleControl())
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl())
add_variables!(container, FlowActivePowerVariable, devices, PhaseAngleControl)
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl)
add_to_expression!(
container,
ActivePowerBalance,
Expand Down Expand Up @@ -1458,14 +1458,14 @@ function construct_device!(
FlowActivePowerSlackUpperBound,
network_model,
devices,
T(),
T,
)
add_variables!(
container,
FlowActivePowerSlackLowerBound,
network_model,
devices,
T(),
T,
)
end
if any(has_ts) && !all(has_ts)
Expand All @@ -1478,7 +1478,7 @@ function construct_device!(
FlowActivePowerVariable,
network_model,
devices,
T(),
T,
)
add_to_expression!(
container,
Expand Down
Loading
Loading