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

Initial support for supplemental attributes #1039

Merged
merged 4 commits into from
Jan 15, 2024
Merged

Initial support for supplemental attributes #1039

merged 4 commits into from
Jan 15, 2024

Conversation

daniel-thom
Copy link
Contributor

@daniel-thom daniel-thom commented Jan 9, 2024

This functionality is not complete. Before we can make a release, we have to handle data format changes due to serialization/de-serialization adjustments. We could do that here or in a subsequent PR.

@jd-lara
Copy link
Member

jd-lara commented Jan 9, 2024

we can create a PSY4 branch and merge the changes to that so that we can test adequately

```julia
iter = get_supplemental_attributes(ForcedOutage, sys)
iter = get_supplemental_attributes(Outage, sys)
iter = get_supplemental_attributes(x -> x.forced_outage_rate >= 0.5, ForcedOutage, sys)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a better value to put in this example?

@daniel-thom daniel-thom requested a review from jd-lara January 9, 2024 18:45
@jd-lara jd-lara changed the base branch from main to psy4 January 10, 2024 17:17
@@ -241,6 +248,7 @@ export ForecastCache
export StaticTimeSeriesCache
export NormalizationFactor
export NormalizationTypes
export TimeSeriesCounts
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to export this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We export get_time_series_counts which returns an instance of this struct. I don’t think a public function should return a private struct. We could argue whether that function should be exported.

Copy link
Member

@jd-lara jd-lara left a comment

Choose a reason for hiding this comment

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

The only details is wether we want to export time series counts

@@ -0,0 +1,63 @@
abstract type Outage <: SupplementalAttribute end
Copy link
Member

Choose a reason for hiding this comment

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

@scdhulipala please confirm with @GordStephen that this structure is adequate for the purposes of integrating PSY into PRAS.

Choose a reason for hiding this comment

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

As far as information needed, l think this looks good. Since there's multiple ways to store the same data, will there be a convention for which takes priority, or is that decision left to the consumer? E.g. FOR and MTTR won't necessarily be internally consistent with outage and recovery transition probabilities, or may be provided as time series vs static values. Also, seems like TimeSeriesContainer is pretty flexible as far as contents, will there be guidance around canonical names for the different possible time series stored within (presumably they'll be expected to match the struct property names)?

Copy link
Member

Choose a reason for hiding this comment

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

As usual in PSY the data is left to the user. We can decide to limit the fields to one or the other if the additional flexibility doesn't help. I'll proceed to merge this branch into the PSY4 release branch to make further changes in a forthcoming PR.

@jd-lara jd-lara merged commit 8a641d1 into psy4 Jan 15, 2024
1 of 8 checks passed
@jd-lara
Copy link
Member

jd-lara commented Jan 15, 2024

partially addresses

#943

@jd-lara jd-lara deleted the dt/outages branch February 5, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants