Skip to content

Commit

Permalink
Merge pull request #13 from NREL-Sienna/jd/psy3
Browse files Browse the repository at this point in the history
Jd/psy3
  • Loading branch information
jd-lara authored Sep 15, 2023
2 parents 802ab15 + d04fc05 commit 5dd42b3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PowerAnalytics"
uuid = "56ce1300-00bc-47e4-ba8c-b166ccc19f51"
authors = ["cbarrows <[email protected]>"]
version = "0.4.0"
version = "0.5.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand All @@ -18,8 +18,8 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
DataFrames = "1"
DataStructures = "0.18"
InfrastructureSystems = "1"
PowerSimulations = "^0.21"
PowerSystems = "2"
PowerSimulations = "^0.23"
PowerSystems = "3"
TimeSeries = "0.23"
YAML = "0.4"
julia = "1.6"
4 changes: 2 additions & 2 deletions src/fuel_results.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function make_fuel_dictionary(
else
fuel = hasmethod(PSY.get_fuel, Tuple{typeof(gen)}) ? PSY.get_fuel(gen) : nothing
pm =
hasmethod(PSY.get_prime_mover, Tuple{typeof(gen)}) ?
PSY.get_prime_mover(gen) : nothing
hasmethod(PSY.get_prime_mover_type, Tuple{typeof(gen)}) ?
PSY.get_prime_mover_type(gen) : nothing
ext = get(PSY.get_ext(gen), "ext_category", nothing)
category = get_generator_category(typeof(gen), fuel, pm, ext, mapping)
end
Expand Down
6 changes: 3 additions & 3 deletions src/get_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function get_generation_data(
results::R;
# aggregation::Union{
# Type{PSY.StaticInjection},
# Type{PSY.Bus},
# Type{PSY.ACBus},
# Type{PSY.System},
# Type{<:PSY.AggregationTopology},
# } = PSY.StaticInjection,
Expand Down Expand Up @@ -402,7 +402,7 @@ end

################################### INPUT DEMAND #################################

function _get_loads(system::PSY.System, bus::PSY.Bus)
function _get_loads(system::PSY.System, bus::PSY.ACBus)
return [
load for load in PSY.get_components(PSY.get_available, PSY.StaticLoad, system) if
PSY.get_bus(load) == bus
Expand All @@ -426,7 +426,7 @@ function get_load_data(
system::PSY.System;
aggregation::Union{
Type{PSY.StaticLoad},
Type{PSY.Bus},
Type{PSY.ACBus},
Type{PSY.System},
Type{<:PSY.AggregationTopology},
} = PSY.StandardLoad,
Expand Down
10 changes: 5 additions & 5 deletions test/test_data/results_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function add_re!(sys)
re = RenewableDispatch(
"WindBusA",
true,
get_component(Bus, sys, "bus5"),
get_component(ACBus, sys, "bus5"),
0.0,
0.0,
1.200,
Expand All @@ -18,7 +18,7 @@ function add_re!(sys)
fx = RenewableFix(
"RoofTopSolar",
true,
get_component(Bus, sys, "bus5"),
get_component(ACBus, sys, "bus5"),
0.0,
0.0,
1.100,
Expand All @@ -45,7 +45,7 @@ function add_re!(sys)
batt = GenericBattery(
"test_batt",
true,
get_component(Bus, sys, "bus4"),
get_component(ACBus, sys, "bus4"),
PrimeMovers.BA,
0.0,
(min = 0.0, max = 1.0),
Expand Down Expand Up @@ -100,7 +100,7 @@ function _execute_simulation(base_path, sim_name)
set_device_model!(template_hydro_st_uc, RenewableFix, FixedOutput)
set_device_model!(template_hydro_st_uc, RenewableDispatch, RenewableFullDispatch)
set_device_model!(template_hydro_st_uc, HydroDispatch, FixedOutput)
set_device_model!(template_hydro_st_uc, GenericBattery, BookKeeping)
set_device_model!(template_hydro_st_uc, GenericBattery, StorageDispatchWithReserves)
set_device_model!(
template_hydro_st_uc,
HydroEnergyReservoir,
Expand All @@ -120,7 +120,7 @@ function _execute_simulation(base_path, sim_name)
set_device_model!(template_hydro_st_ed, RenewableFix, FixedOutput)
set_device_model!(template_hydro_st_ed, RenewableDispatch, RenewableFullDispatch)
set_device_model!(template_hydro_st_ed, HydroDispatch, FixedOutput)
set_device_model!(template_hydro_st_ed, GenericBattery, BookKeeping)
set_device_model!(template_hydro_st_ed, GenericBattery, StorageDispatchWithReserves)
set_device_model!(
template_hydro_st_ed,
HydroEnergyReservoir,
Expand Down
2 changes: 1 addition & 1 deletion test/test_result_sorting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end

@testset "Test system data getters" begin
sys = PSI.get_system(results_uc)
load_data1 = PA.get_load_data(sys; aggregation = Bus)
load_data1 = PA.get_load_data(sys; aggregation = ACBus)
@test length(load_data1.data) == 3
@test length(load_data1.time) == 24

Expand Down

2 comments on commit 5dd42b3

@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/91518

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 v0.5.0 -m "<description of version>" 5dd42b37b1ebb116d62ffbe8aedd03db0c3ab2bb
git push origin v0.5.0

Please sign in to comment.