-
Notifications
You must be signed in to change notification settings - Fork 67
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
make geometric work again #1236
Conversation
@@ -248,7 +248,7 @@ function update_decision_state!( | |||
return | |||
end | |||
|
|||
function _get_time_to_recover(event::PSY.GeometricDistributionForcedOutage) | |||
function _get_time_to_recover(event::PSY.GeometricDistributionForcedOutage, simulation_time, length) |
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.
[JuliaFormatter] reported by reviewdog 🐶
function _get_time_to_recover(event::PSY.GeometricDistributionForcedOutage, simulation_time, length) | |
function _get_time_to_recover( | |
event::PSY.GeometricDistributionForcedOutage, | |
simulation_time, | |
length, | |
) |
len = state_length, | ||
) | ||
return # do the math on the vals difference | ||
next_outage_start = findfirst(isequal(1.0), vals) | ||
next_outage_length = findfirst(isequal(0.0), vals[next_outage_start:end]) - 1 |
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.
[JuliaFormatter] reported by reviewdog 🐶
next_outage_length = findfirst(isequal(0.0), vals[next_outage_start:end]) - 1 | |
next_outage_length = findfirst(isequal(0.0), vals[next_outage_start:end]) - 1 |
state_length = length(state_timestamps) - state_data_index | ||
mttr = _get_time_to_recover(event, simulation_time, state_length) |
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.
[JuliaFormatter] reported by reviewdog 🐶
state_length = length(state_timestamps) - state_data_index | |
mttr = _get_time_to_recover(event, simulation_time, state_length) | |
state_length = length(state_timestamps) - state_data_index | |
mttr = _get_time_to_recover(event, simulation_time, state_length) |
off_time_step_count = | ||
Int(mttr) * resolution_ratio + rem(state_data_index, resolution_ratio) #TODO -check if just removing (-1) is correct. | ||
Int(mttr) * resolution_ratio + rem(state_data_index, resolution_ratio) |
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.
[JuliaFormatter] reported by reviewdog 🐶
Int(mttr) * resolution_ratio + rem(state_data_index, resolution_ratio) | |
Int(mttr) * resolution_ratio + rem(state_data_index, resolution_ratio) |
@@ -567,7 +568,7 @@ | |||
return | |||
end | |||
|
|||
function _get_outage_ocurrence(event::PSY.GeometricDistributionForcedOutage, rng) | |||
function _get_outage_ocurrence(event::PSY.GeometricDistributionForcedOutage, rng, current_time) |
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.
[JuliaFormatter] reported by reviewdog 🐶
function _get_outage_ocurrence(event::PSY.GeometricDistributionForcedOutage, rng, current_time) | |
function _get_outage_ocurrence( | |
event::PSY.GeometricDistributionForcedOutage, | |
rng, | |
current_time, | |
) |
@@ -623,7 +624,7 @@ | |||
state::SimulationState, | |||
key::VariableKey{T, U}, | |||
column_names::Set{String}, | |||
::PSY.GeometricDistributionForcedOutage, | |||
::PSY.Outage, |
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.
[JuliaFormatter] reported by reviewdog 🐶
::PSY.Outage, | |
::PSY.Outage, |
For parallel testing on larger system