-
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
new debug logging, fix logic #1230
Conversation
@@ -290,6 +293,7 @@ function update_decision_state!( | |||
@error "update $name to come back online after $off_time_step_count" | |||
end | |||
end | |||
@warn "AvailableStatusChangeParameter decision state after update: $state_data" |
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 🐶
@warn "AvailableStatusChangeParameter decision state after update: $state_data" | |
@warn "AvailableStatusChangeParameter decision state after update: $state_data" |
@@ -304,7 +308,8 @@ function update_decision_state!( | |||
) where {T <: PSY.Component} | |||
event_ocurrence_data = get_decision_state_data(state, AvailableStatusChangeParameter(), T) |
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 🐶
event_ocurrence_data = get_decision_state_data(state, AvailableStatusChangeParameter(), T) | |
event_ocurrence_data = | |
get_decision_state_data(state, AvailableStatusChangeParameter(), T) |
while true | ||
state_data.values[name, outage_index] = 0.0 | ||
if (event_ocurrence_data.values[name, outage_index] == 1.0) || outage_index == length(state_data.values[name, :]) #If another change is detected or you have reached the end of the state |
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 🐶
while true | |
state_data.values[name, outage_index] = 0.0 | |
if (event_ocurrence_data.values[name, outage_index] == 1.0) || outage_index == length(state_data.values[name, :]) #If another change is detected or you have reached the end of the state | |
while true | |
state_data.values[name, outage_index] = 0.0 | |
if (event_ocurrence_data.values[name, outage_index] == 1.0) || | |
outage_index == length(state_data.values[name, :]) #If another change is detected or you have reached the end of the state |
state_data.values[name, outage_index] = 0.0 | ||
if (event_ocurrence_data.values[name, outage_index] == 1.0) || outage_index == length(state_data.values[name, :]) #If another change is detected or you have reached the end of the state | ||
break | ||
end |
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 🐶
end | |
end |
set_last_recorded_row!(state_data, state_range[end]) | ||
state_data_index += resolution_ratio | ||
end | ||
=# | ||
end =# | ||
@warn "AvailableStatusParameter decision state after update: $state_data" |
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 🐶
set_last_recorded_row!(state_data, state_range[end]) | |
state_data_index += resolution_ratio | |
end | |
=# | |
end =# | |
@warn "AvailableStatusParameter decision state after update: $state_data" | |
end | |
#= offset = resolution_ratio - 1 | |
result_time_index = axes(store_data)[2] | |
set_update_timestamp!(state_data, simulation_time) | |
for t in result_time_index | |
state_range = state_data_index:(state_data_index + offset) | |
for name in column_names, i in state_range | |
state_data.values[name, i] = store_data[name, t] | |
end | |
set_last_recorded_row!(state_data, state_range[end]) | |
state_data_index += resolution_ratio | |
end =# | |
@warn "AvailableStatusParameter decision state after update: $state_data" |
@@ -525,27 +545,20 @@ function update_system_state!( | |||
simulation_time::Dates.DateTime, | |||
rng, | |||
) where T <: PSY.Device |
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 🐶
) where T <: PSY.Device | |
) where {T <: PSY.Device} |
available_status_change_parameter = get_system_state_data(state, AvailableStatusChangeParameter(), T) | ||
available_status_change_parameter_values = get_last_recorded_value(available_status_change_parameter) |
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 🐶
available_status_change_parameter = get_system_state_data(state, AvailableStatusChangeParameter(), T) | |
available_status_change_parameter_values = get_last_recorded_value(available_status_change_parameter) | |
available_status_change_parameter = | |
get_system_state_data(state, AvailableStatusChangeParameter(), T) | |
available_status_change_parameter_values = | |
get_last_recorded_value(available_status_change_parameter) |
for name in column_names_ | ||
current_status = available_status_parameter_values[name] | ||
current_status_change = available_status_change_parameter_values[name] | ||
if current_status == 1.0 && current_status_change == 1.0 |
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 🐶
if current_status == 1.0 && current_status_change == 1.0 | |
if current_status == 1.0 && current_status_change == 1.0 |
available_status_parameter.values[name, 1] = 0.0 | ||
end | ||
end |
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 🐶
available_status_parameter.values[name, 1] = 0.0 | |
end | |
end | |
available_status_parameter.values[name, 1] = 0.0 | |
end | |
end |
@error "Changed status for $name, $outage_ocurrence" | ||
else | ||
@warn "$name status $current_status, outage draw: $outage_ocurrence" | ||
available_status_change_parameter.values[name, 1] = outage_ocurrence |
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 🐶
available_status_change_parameter.values[name, 1] = outage_ocurrence | |
available_status_change_parameter.values[name, 1] = outage_ocurrence |
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 🐶
PowerSimulations.jl/src/simulation/simulation_state.jl
Lines 341 to 352 in 79571e6
end | |
end | |
end | |
#= offset = resolution_ratio - 1 | |
result_time_index = axes(store_data)[2] | |
set_update_timestamp!(state_data, simulation_time) | |
for t in result_time_index | |
state_range = state_data_index:(state_data_index + offset) | |
for name in column_names, i in state_range | |
state_data.values[name, i] = store_data[name, t] |
Performance Results
|
No description provided.