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

Mb/cross horizon outages #1243

Merged
merged 11 commits into from
Feb 14, 2025
Merged

Mb/cross horizon outages #1243

merged 11 commits into from
Feb 14, 2025

Conversation

m-bossart
Copy link

This PR allows for outages that are not cleared within the span of the state horizon. This should work for both GeometricDistributionForcedOutage and TimeSeriesForcedOutage

@jd-lara In this implementation I preprocess the outage data so a one indicates a change in the status (see below). Where should this preprocessing occur in PowerSimulations? or can the API require data that represents changes and not the status?

@llavin13 if you want to test this now with your system, use the function below to preprocess the data. This will likely change in the final implementation.

function preprocess_outage_data(outage_data)
    status_change_data = zeros(length(outage_data))
    for ix in 1:length(outage_data)
        if ix > 1
            if outage_data[ix] != outage_data[ix - 1]
                status_change_data[ix - 1] = 1.0
            end
        end
    end
    return status_change_data
end
# This is ignored for now in this simulation setup
o_data = fill!(Vector{Float64}(undef, 8784), 0.0)
o_data[20:51] .= 1.0
outage_time_series1 = TimeArray(dates_ts, preprocess_outage_data(o_data))

@m-bossart m-bossart requested a review from jd-lara February 10, 2025 19:40
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Performance Results

Version Precompile Time
Main 5.687630531
This Branch 5.956408648
Version Build Time
Main-Build Time Precompile 71.606254011
Main-Build Time Postcompile 0.833422834
This Branch-Build Time Precompile 65.791295892
This Branch-Build Time Postcompile 1.074911332
Version Build Time
Main-Solve Time Precompile 580.338214358
Main-Solve Time Postcompile 544.276203605
This Branch-Solve Time Precompile 448.161977572
This Branch-Solve Time Postcompile 409.841670294

)
return PSY.get_mean_time_to_recovery(event)
timeseries_mapping = event_model.timeseries_mapping
Copy link
Member

@jd-lara jd-lara Feb 13, 2025

Choose a reason for hiding this comment

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

this is the functionality with a getter

@jd-lara jd-lara merged commit 7db8773 into jd/outages Feb 14, 2025
4 of 8 checks passed
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.

2 participants