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

Add PSY base methods #6

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
79d8928
bug fix in struct defination
sourabhdalvi Mar 25, 2024
a6c9880
adding some examples
sourabhdalvi Mar 26, 2024
b21e855
fixed UUID
Mar 26, 2024
2d553ed
Merge branch 'main' into sd/dev
sourabhdalvi Mar 27, 2024
fc74eb2
removing function redefination
sourabhdalvi Mar 27, 2024
825c74c
add setter methods
rodrigomha Apr 4, 2024
f6eb445
add more base.jl methods for portfolios
rodrigomha Apr 4, 2024
ba277d7
update removal of components
rodrigomha Apr 5, 2024
3c9283c
add script example to add technology
rodrigomha Apr 5, 2024
b03645b
remove technology script
rodrigomha Apr 5, 2024
2456312
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi Apr 9, 2024
ee45ef4
add pretty print
rodrigomha Apr 9, 2024
86458f8
add pretty tables
rodrigomha Apr 9, 2024
74d43f0
add portfolio constructors
rodrigomha Apr 9, 2024
7e64882
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi Apr 10, 2024
b7deead
adding auto generated structs
sourabhdalvi Apr 10, 2024
2582284
adding serialization
sourabhdalvi Apr 10, 2024
60193d2
updating test script
sourabhdalvi Apr 10, 2024
e43614e
adding to_json function
sourabhdalvi Apr 10, 2024
5e5efc7
removing old files
sourabhdalvi Apr 11, 2024
d22568c
remove subportfolios
rodrigomha Apr 11, 2024
d40072b
update printing
rodrigomha Apr 11, 2024
3ad9147
update tomls
rodrigomha Apr 12, 2024
afac1ab
update exports
rodrigomha Apr 12, 2024
e8cd006
update typo get techs
rodrigomha Apr 12, 2024
5aa51d2
update tests
rodrigomha Apr 12, 2024
eefce02
updating structs
sourabhdalvi Apr 12, 2024
7abe741
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi Apr 12, 2024
3bfde43
merging test script
sourabhdalvi Apr 12, 2024
ae2d652
adding formatter changes
sourabhdalvi Apr 12, 2024
525f4dd
Merge pull request #8 from NREL-Sienna/sd/dev
rodrigomha Apr 15, 2024
5d18b60
update structs
rodrigomha Apr 15, 2024
dbf8652
remove general accesors to avoid ambiguities
rodrigomha Apr 15, 2024
67d5acb
remove extra IS
rodrigomha Apr 15, 2024
af1c5d9
update compats
rodrigomha Apr 15, 2024
d056ef5
update test using structs
rodrigomha Apr 15, 2024
09e5b69
remove container stuff
rodrigomha May 29, 2024
f3c391e
add ext stuff
rodrigomha May 29, 2024
487c847
remove container in portfolio
rodrigomha May 29, 2024
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
45 changes: 45 additions & 0 deletions scripts/portfolio_test.jl
Copy link
Member

Choose a reason for hiding this comment

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

Instead of making scripts. Write these as tests right away. We don't want to accumulate scripts in the main branch of the repo.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Pkg
Pkg.activate("")
Pkg.instantiate()
using Revise
using PowerSystems
using InfrastructureSystems
using PowerSystemsInvestmentsPortfolios
const IS = InfrastructureSystems
const PSY = PowerSystems
const PSIP = PowerSystemsInvestmentsPortfolios

data = PSY._create_system_data_from_kwargs()

bus = ACBus(nothing)
discount_rate = 0.07
investment_schedule = Dict()
port_metadata = PSIP.PortfolioMetadata("portfolio_test", nothing, nothing)

p = Portfolio(
ACBus,
discount_rate,
data,
investment_schedule,
port_metadata,
nothing,
IS.TimeSeriesContainer(),
IS.InfrastructureSystemsInternal(),
)

t = SupplyTechnology{ThermalStandard}(
"thermal_tech",
true,
ThermalStandard,
PSY.ThermalFuels.COAL,
PSY.PrimeMovers.ST,
0.98, # cap factor
nothing,
nothing,
IS.SupplementalAttributesContainer(),
IS.TimeSeriesContainer(),
IS.InfrastructureSystemsInternal(),
)

PSIP.add_technology!(p, t)
PSIP.remove_technology!(SupplyTechnology{ThermalStandard}, p, "thermal_tech")
Loading
Loading