generated from NREL-Sienna/SiennaTemplate.jl
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Closed
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 a6c9880
adding some examples
sourabhdalvi b21e855
fixed UUID
2d553ed
Merge branch 'main' into sd/dev
sourabhdalvi fc74eb2
removing function redefination
sourabhdalvi 825c74c
add setter methods
rodrigomha f6eb445
add more base.jl methods for portfolios
rodrigomha ba277d7
update removal of components
rodrigomha 3c9283c
add script example to add technology
rodrigomha b03645b
remove technology script
rodrigomha 2456312
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi ee45ef4
add pretty print
rodrigomha 86458f8
add pretty tables
rodrigomha 74d43f0
add portfolio constructors
rodrigomha 7e64882
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi b7deead
adding auto generated structs
sourabhdalvi 2582284
adding serialization
sourabhdalvi 60193d2
updating test script
sourabhdalvi e43614e
adding to_json function
sourabhdalvi 5e5efc7
removing old files
sourabhdalvi d22568c
remove subportfolios
rodrigomha d40072b
update printing
rodrigomha 3ad9147
update tomls
rodrigomha afac1ab
update exports
rodrigomha e8cd006
update typo get techs
rodrigomha 5aa51d2
update tests
rodrigomha eefce02
updating structs
sourabhdalvi 7abe741
Merge remote-tracking branch 'origin/rh/psy_methods' into sd/dev
sourabhdalvi 3bfde43
merging test script
sourabhdalvi ae2d652
adding formatter changes
sourabhdalvi 525f4dd
Merge pull request #8 from NREL-Sienna/sd/dev
rodrigomha 5d18b60
update structs
rodrigomha dbf8652
remove general accesors to avoid ambiguities
rodrigomha 67d5acb
remove extra IS
rodrigomha af1c5d9
update compats
rodrigomha d056ef5
update test using structs
rodrigomha 09e5b69
remove container stuff
rodrigomha f3c391e
add ext stuff
rodrigomha 487c847
remove container in portfolio
rodrigomha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.