Skip to content

Commit

Permalink
Merge pull request #63 from NREL-Sienna/psy3
Browse files Browse the repository at this point in the history
Psy3
  • Loading branch information
jd-lara committed Sep 12, 2023
2 parents 566a22c + 22662be commit 1fbf03b
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 75 deletions.
7 changes: 4 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[CaseData]
git-tree-sha1 = "b67da2ffbab324574933c89f5da8037a8a837373"
git-tree-sha1 = "2b7013812a985ce5884696ce276ca17b2719a57a"
lazy = true

[[CaseData.download]]
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.4.tar.gz"
sha256 = "222560226fda72ee8a9ebca5c44b96c7fa92048e1088725dba1ea7f63214e83c"
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/2.0.tar.gz"
sha256 = "cb15bf019cc1a187e430d4fe0db9c000decf07dc2cdccc6c1b53b07b136fa41c"

[rts]
git-tree-sha1 = "5098f357bad765bfefcff58f080818863ca776bd"
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PowerSystemCaseBuilder"
uuid = "f00506e0-b84f-492a-93c2-c0a9afc4364e"
authors = ["Sourabh Dalvi", "Jose Daniel Lara"]
version = "1.1.0"
version = "1.2.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand All @@ -23,7 +23,7 @@ DataFrames = "1"
DataStructures = "~0.18"
HDF5 = "0.16"
InfrastructureSystems = "^1.21"
PowerSystems = "2"
PowerSystems = "3"
PrettyTables = "2"
TimeSeries = "~0.22, 0.23"
julia = "^1.6"
2 changes: 1 addition & 1 deletion src/definitions.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const PACKAGE_DIR = joinpath(dirname(dirname(pathof(PowerSystemCaseBuilder))))
const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-1.0.4")
const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-2.0")
const RTS_DIR = joinpath(LazyArtifacts.artifact"rts", "RTS-GMLC-0.2.2")

const SYSTEM_DESCRIPTORS_FILE = joinpath(PACKAGE_DIR, "src", "system_descriptor.jl")
Expand Down
48 changes: 24 additions & 24 deletions src/library/psi_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function make_modified_RTS_GMLC_sys(resolution::Dates.TimePeriod = Hour(1); kwar
spin_reserve_R2 = PSY.get_component(PSY.VariableReserve, sys, "Spin_Up_R2")
spin_reserve_R3 = PSY.get_component(PSY.VariableReserve, sys, "Spin_Up_R3")
for g in PSY.get_components(
x -> PSY.get_prime_mover(x) in [PSY.PrimeMovers.CT, PSY.PrimeMovers.CC],
x -> PSY.get_prime_mover_type(x) in [PSY.PrimeMovers.CT, PSY.PrimeMovers.CC],
PSY.ThermalStandard,
sys,
)
Expand Down Expand Up @@ -602,7 +602,7 @@ function make_modified_RTS_GMLC_sys(resolution::Dates.TimePeriod = Hour(1); kwar
end

for g in PSY.get_components(
x -> PSY.get_prime_mover(x) == PSY.PrimeMovers.PVe,
x -> PSY.get_prime_mover_type(x) == PSY.PrimeMovers.PVe,
PSY.RenewableDispatch,
sys,
)
Expand All @@ -611,7 +611,7 @@ function make_modified_RTS_GMLC_sys(resolution::Dates.TimePeriod = Hour(1); kwar
end

for g in PSY.get_components(
x -> PSY.get_prime_mover(x) == PSY.PrimeMovers.PVe,
x -> PSY.get_prime_mover_type(x) == PSY.PrimeMovers.PVe,
PSY.RenewableFix,
sys,
)
Expand Down Expand Up @@ -674,16 +674,16 @@ function build_two_zone_5_bus(; kwargs...)

# Buses
nodes10() = [
Bus(1, "nodeA", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(2, "nodeB", "PQ", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(3, "nodeC", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(4, "nodeD", "REF", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(5, "nodeE", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(6, "nodeA2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(7, "nodeB2", "PQ", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(8, "nodeC2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(9, "nodeD2", "REF", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
Bus(10, "nodeE2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(1, "nodeA", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(2, "nodeB", "PQ", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(3, "nodeC", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(4, "nodeD", "REF", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(5, "nodeE", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(6, "nodeA2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(7, "nodeB2", "PQ", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(8, "nodeC2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(9, "nodeD2", "REF", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
ACBus(10, "nodeE2", "PV", 0, 1.0, (min = 0.9, max = 1.05), 230, nothing, nothing),
]

# Lines
Expand Down Expand Up @@ -832,7 +832,7 @@ function build_two_zone_5_bus(; kwargs...)
2.00,
(min = -0.7, max = 0.7),
),
HVDCLine(
TwoTerminalHVDCLine(
"nodeC-nodeC2",
true,
0.0,
Expand All @@ -855,7 +855,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 0.40,
reactive_power = 0.010,
rating = 0.5,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 0.40),
reactive_power_limits = (min = -0.30, max = 0.30),
Expand All @@ -872,7 +872,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 1.70,
reactive_power = 0.20,
rating = 2.2125,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 1.70),
reactive_power_limits = (min = -1.275, max = 1.275),
Expand All @@ -889,7 +889,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 5.2,
reactive_power = 1.00,
rating = 5.2,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 5.20),
reactive_power_limits = (min = -3.90, max = 3.90),
Expand All @@ -906,7 +906,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 2.0,
reactive_power = 0.40,
rating = 2.5,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 2.0),
reactive_power_limits = (min = -1.5, max = 1.5),
Expand All @@ -923,7 +923,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 6.0,
reactive_power = 1.50,
rating = 0.75,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 6.0),
reactive_power_limits = (min = -4.50, max = 4.50),
Expand All @@ -940,7 +940,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 0.40,
reactive_power = 0.010,
rating = 0.5,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 0.40),
reactive_power_limits = (min = -0.30, max = 0.30),
Expand All @@ -957,7 +957,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 1.70,
reactive_power = 0.20,
rating = 2.2125,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 1.70),
reactive_power_limits = (min = -1.275, max = 1.275),
Expand All @@ -974,7 +974,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 5.2,
reactive_power = 1.00,
rating = 5.2,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 5.20),
reactive_power_limits = (min = -3.90, max = 3.90),
Expand All @@ -991,7 +991,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 2.0,
reactive_power = 0.40,
rating = 2.5,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 2.0),
reactive_power_limits = (min = -1.5, max = 1.5),
Expand All @@ -1008,7 +1008,7 @@ function build_two_zone_5_bus(; kwargs...)
active_power = 6.0,
reactive_power = 1.50,
rating = 0.75,
prime_mover = PrimeMovers.ST,
prime_mover_type = PrimeMovers.ST,
fuel = ThermalFuels.COAL,
active_power_limits = (min = 0.0, max = 6.0),
reactive_power_limits = (min = -4.50, max = 4.50),
Expand Down
Loading

2 comments on commit 1fbf03b

@jd-lara
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/91233

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.0 -m "<description of version>" 1fbf03bfad5b38304a6b51197d16cde52a3a3d84
git push origin v1.2.0

Please sign in to comment.