-
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
update decision state for OnVariable and ActivePowerVariable #1232
Conversation
@@ -368,9 +355,11 @@ function update_decision_state!( | |||
simulation_time::Dates.DateTime, | |||
model_params::ModelStoreParams, | |||
) where {T <: VariableType, U <: PSY.Component} | |||
event_ocurrence_data = get_decision_state_data(state, AvailableStatusParameter(), U) | |||
@error "UPDATE DECISION STATE $key" | |||
event_ocurrence_data = get_decision_state_data(state, AvailableStatusChangeParameter(), U) |
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(), U) | |
event_ocurrence_data = | |
get_decision_state_data(state, AvailableStatusChangeParameter(), U) |
if event_status_data.values[name, outage_index] == 0.0 | ||
state_data.values[name, outage_index] = 0.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 event_status_data.values[name, outage_index] == 0.0 | |
state_data.values[name, outage_index] = 0.0 | |
if event_status_data.values[name, outage_index] == 0.0 | |
state_data.values[name, outage_index] = 0.0 |
if event_status_data.values[name, outage_index] == 0.0 | ||
state_data.values[name, outage_index] = 0.0 | ||
@info "forcing $key to zero at index $outage_index because status was zero for $name" | ||
else |
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 🐶
else | |
else |
end | ||
if outage_index == length(state_data.values[name, :]) |
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 | |
if outage_index == length(state_data.values[name, :]) | |
end | |
if outage_index == length(state_data.values[name, :]) |
end | ||
outage_index += 1 | ||
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 | |
outage_index += 1 | |
end | |
end | |
outage_index += 1 | |
end |
When applying the event, if the status is zero moving forward from a status change, then the OnVariable and ActivePower should be forced to zero in the decision model as well? |
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.
This PR was tested synchronously and it fixed the observed problem
No description provided.