Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jd/hvdc model #1003

Merged
merged 76 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
13996a3
many renames
jd-lara Feb 5, 2023
d819b96
more rename
jd-lara Feb 5, 2023
77a0f7b
add new formulations
jd-lara Feb 5, 2023
aa31db8
WIP add test
jd-lara Feb 5, 2023
148b606
add methods and renames
jd-lara Feb 5, 2023
cead4c3
implement additional expressions
jd-lara Feb 5, 2023
1b122df
methods converter dc balance
jd-lara Feb 5, 2023
ca151fd
add line argument stage
jd-lara Feb 5, 2023
1311675
setup model construct stage
jd-lara Feb 5, 2023
f438eae
add hint
jd-lara Feb 5, 2023
1d60fdc
many renames
jd-lara Feb 5, 2023
cc3347b
more rename
jd-lara Feb 5, 2023
e35133c
add new formulations
jd-lara Feb 5, 2023
0fd9d5a
WIP add test
jd-lara Feb 5, 2023
0516fe6
add methods and renames
jd-lara Feb 5, 2023
8765fc3
implement additional expressions
jd-lara Feb 5, 2023
aa747e6
methods converter dc balance
jd-lara Feb 5, 2023
5f27c2a
add line argument stage
jd-lara Feb 5, 2023
6053b26
setup model construct stage
jd-lara Feb 5, 2023
64bce1c
add hint
jd-lara Feb 5, 2023
85a03be
Merge branch 'jd/hvdc_model' of https://github.com/NREL-SIIP/PowerSim…
jd-lara Feb 5, 2023
31f836d
add model for lossless HVDC system
jd-lara Feb 14, 2023
791d9cb
updates to expression types
jd-lara Feb 23, 2023
3be8a91
remove duplicate
jd-lara Feb 23, 2023
6c21b00
fix tests
jd-lara Feb 23, 2023
a196345
add missing function calls
jd-lara Feb 23, 2023
8109c5f
remove unused arguments
jd-lara Feb 23, 2023
8b8de2c
fix expression additions
jd-lara Jun 30, 2023
ceeb00e
fix duplicate call
jd-lara Jun 30, 2023
9dbc558
many renames
jd-lara Jul 3, 2023
d31c910
more rename
jd-lara Jul 3, 2023
6f80708
add new formulations
jd-lara Feb 5, 2023
c3df064
WIP add test
jd-lara Feb 5, 2023
8eef0b3
add methods and renames
jd-lara Jul 3, 2023
6a45362
implement additional expressions
jd-lara Jul 3, 2023
aa0acac
methods converter dc balance
jd-lara Feb 5, 2023
42dc8f2
add line argument stage
jd-lara Feb 5, 2023
34b8e0d
setup model construct stage
jd-lara Feb 5, 2023
303781f
add hint
jd-lara Feb 5, 2023
90fc7f5
many renames
jd-lara Feb 5, 2023
5351802
add new formulations
jd-lara Jul 3, 2023
ef0d640
add methods and renames
jd-lara Jul 3, 2023
a9ed97e
add line argument stage
jd-lara Feb 5, 2023
af96ad1
setup model construct stage
jd-lara Feb 5, 2023
f5f0224
add model for lossless HVDC system
jd-lara Jul 3, 2023
28098bf
updates to expression types
jd-lara Jul 3, 2023
ffcc583
remove duplicate
jd-lara Feb 23, 2023
ab17ae6
fix tests
jd-lara Jul 3, 2023
349a682
add missing function calls
jd-lara Feb 23, 2023
17c5dc0
remove unused arguments
jd-lara Feb 23, 2023
257cef6
fix expression additions
jd-lara Jun 30, 2023
3d664cc
fix duplicate call
jd-lara Jun 30, 2023
d4a37b2
Merge branch 'jd/hvdc_model' of https://github.com/NREL-SIIP/PowerSim…
jd-lara Jul 3, 2023
c7226a8
update code
jd-lara Jul 3, 2023
aa2c8d2
update bustypes
jd-lara Jul 3, 2023
a096566
fix some types
jd-lara Jul 5, 2023
01bad33
correct PTDF model
jd-lara Jul 7, 2023
0f7539d
bump project toml
jd-lara Jul 7, 2023
728dcb6
Merge branch 'main' into jd/hvdc_model
jd-lara Sep 6, 2023
38930dc
bump deps
jd-lara Sep 6, 2023
a7527bf
remove bad reference file
jd-lara Sep 6, 2023
698d0d5
add HPS to tests
jd-lara Sep 6, 2023
39aa50a
many fixes
jd-lara Sep 7, 2023
9ac586c
fix test
jd-lara Sep 7, 2023
5c944b1
fix some tests
jd-lara Sep 7, 2023
07c6294
fixes to reserves
jd-lara Sep 8, 2023
f4ebc64
address Dan's comment
jd-lara Sep 11, 2023
3e4ef49
use getters
jd-lara Sep 11, 2023
35ae6c7
bump hdf5
jd-lara Sep 13, 2023
e18c78b
fix bad merge
jd-lara Sep 13, 2023
cbf552f
add additional test
jd-lara Sep 13, 2023
40fed26
formatter
jd-lara Sep 13, 2023
894238f
fix undefined variable
jd-lara Sep 13, 2023
59a22a4
fix feedforwards
jd-lara Sep 13, 2023
81a6652
fix call to update parameter values
jd-lara Sep 13, 2023
370cdbc
formatter
jd-lara Sep 13, 2023
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
Prev Previous commit
Next Next commit
updates to expression types
  • Loading branch information
jd-lara committed Jul 3, 2023
commit 28098bf3ad81ebe38d494e95419fb5335a455079
4 changes: 2 additions & 2 deletions src/PowerSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ export SystemBalanceExpressions
export RangeConstraintLBExpressions
export RangeConstraintUBExpressions
export CostExpressions
export ActivePowerBalanceAC
export ActivePowerBalanceDC
export ActivePowerBalance
export ReactivePowerBalance
export EmergencyUp
export EmergencyDown
Expand Down Expand Up @@ -555,6 +554,7 @@ include("network_models/powermodels_interface.jl")
include("network_models/pm_translator.jl")
include("network_models/network_slack_variables.jl")
include("network_models/area_balance_model.jl")
include("network_models/hvdc_networks.jl")

include("initial_conditions/initialization.jl")

Expand Down
3 changes: 1 addition & 2 deletions src/core/expressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ abstract type SystemBalanceExpressions <: ExpressionType end
abstract type RangeConstraintLBExpressions <: ExpressionType end
abstract type RangeConstraintUBExpressions <: ExpressionType end
abstract type CostExpressions <: ExpressionType end
struct ActivePowerBalanceAC <: SystemBalanceExpressions end
struct ActivePowerBalanceDC <: SystemBalanceExpressions end
struct ActivePowerBalance <: SystemBalanceExpressions end
struct ReactivePowerBalance <: SystemBalanceExpressions end
struct EmergencyUp <: ExpressionType end
struct EmergencyDown <: ExpressionType end
Expand Down
8 changes: 4 additions & 4 deletions src/core/optimization_container.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ function _make_system_expressions!(
time_steps = get_time_steps(container)
ac_bus_numbers = collect(Iterators.flatten(values(subnetworks)))
container.expressions = Dict(
ExpressionKey(ActivePowerBalanceAC, PSY.ACBus) =>
ExpressionKey(ActivePowerBalance, PSY.ACBus) =>
_make_container_array(ac_bus_numbers, time_steps),
ExpressionKey(ActivePowerBalanceDC, PSY.DCBus) =>
ExpressionKey(ActivePowerBalance, PSY.DCBus) =>
_make_container_array(dc_bus_numbers, time_steps),
ExpressionKey(ReactivePowerBalance, PSY.ACBus) =>
_make_container_array(ac_bus_numbers, time_steps),
Expand All @@ -433,9 +433,9 @@ function _make_system_expressions!(
time_steps = get_time_steps(container)
ac_bus_numbers = collect(Iterators.flatten(values(subnetworks)))
container.expressions = Dict(
ExpressionKey(ActivePowerBalanceAC, PSY.ACBus) =>
ExpressionKey(ActivePowerBalance, PSY.ACBus) =>
_make_container_array(ac_bus_numbers, time_steps),
ExpressionKey(ActivePowerBalanceDC, PSY.DCBus) =>
ExpressionKey(ActivePowerBalance, PSY.DCBus) =>
_make_container_array(dc_bus_numbers, time_steps),
)
return
Expand Down
18 changes: 9 additions & 9 deletions src/devices_models/device_constructors/branch_constructor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function construct_device!(
add_variables!(container, FlowActivePowerVariable, devices, U())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -492,7 +492,7 @@ function construct_device!(
add_variables!(container, FlowActivePowerVariable, devices, U())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -534,23 +534,23 @@ function construct_device!(
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCP2PDispatch())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerToFromVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerFromToVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
HVDCLosses,
devices,
model,
Expand Down Expand Up @@ -589,15 +589,15 @@ function construct_device!(
add_variables!(container, HVDCFlowDirectionVariable, devices, HVDCP2PDispatch())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerToFromVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerFromToVariable,
devices,
model,
Expand Down Expand Up @@ -661,7 +661,7 @@ function construct_device!(
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
Expand All @@ -686,7 +686,7 @@ function construct_device!(
add_variables!(container, PhaseShifterAngle, devices, PhaseAngleControl())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
PhaseShifterAngle,
devices,
model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ function construct_device!(
add_variables!(container, ActivePowerVariable, devices, LossLessConverter())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
S,
)
add_to_expression!(
container,
ActivePowerBalanceDC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand All @@ -36,7 +36,6 @@ function construct_device!(
::Type{S},
) where {S <: PM.AbstractActivePowerModel}
devices = get_available_components(PSY.InterconnectingConverter, sys)
add_constraints!(container, NodalBalanceActiveConstraint, devices, model, S)
return
end

Expand All @@ -51,7 +50,7 @@ function construct_device!(
add_variables!(container, FlowActivePowerVariable, devices, LossLessLine())
add_to_expression!(
container,
ActivePowerBalanceDC,
ActivePowerBalance,
FlowActivePowerVariable,
devices,
model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function construct_device!(
# Expression
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerTimeSeriesParameter,
devices,
model,
Expand Down Expand Up @@ -61,7 +61,7 @@ function construct_device!(
# Expression
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerTimeSeriesParameter,
devices,
model,
Expand Down Expand Up @@ -92,7 +92,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -201,7 +201,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -298,7 +298,7 @@ function construct_device!(

add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -401,7 +401,7 @@ function construct_device!(

add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -513,7 +513,7 @@ function construct_device!(

add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -637,7 +637,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, HydroDispatchReservoirStorage())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -734,7 +734,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -841,7 +841,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -930,15 +930,15 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ReactivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -1038,7 +1038,7 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, D())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -1159,15 +1159,15 @@ function construct_device!(
add_variables!(container, EnergyOutput, devices, HydroCommitmentReservoirStorage())
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ReactivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -1295,7 +1295,7 @@ function construct_device!(

add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerVariable,
devices,
model,
Expand Down Expand Up @@ -1408,15 +1408,15 @@ function construct_device!(

add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerInVariable,
devices,
model,
network_model,
)
add_to_expression!(
container,
ActivePowerBalanceAC,
ActivePowerBalance,
ActivePowerOutVariable,
devices,
model,
Expand Down
Loading