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

Implement missing function #1228

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

m-bossart
Copy link

Adding the update_system_state! for the AvialableStatusParameter which was previously erroring

Comment on lines 527 to +529
) where T <: PSY.Device
em_data = get_em_data(store)
ix = get_last_recorded_row(em_data, key)
@show model_name
@show res = read_result(DenseAxisArray, store, model_name, key, ix)
dataset = get_dataset(state, key)
set_update_timestamp!(dataset, simulation_time)
set_dataset_values!(state, key, 1, res)
set_last_recorded_row!(dataset, 1)

status_change_data = get_last_recorded_value(get_system_state_data(state, AvailableStatusChangeParameter(), T))
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
) where T <: PSY.Device
em_data = get_em_data(store)
ix = get_last_recorded_row(em_data, key)
@show model_name
@show res = read_result(DenseAxisArray, store, model_name, key, ix)
dataset = get_dataset(state, key)
set_update_timestamp!(dataset, simulation_time)
set_dataset_values!(state, key, 1, res)
set_last_recorded_row!(dataset, 1)
status_change_data = get_last_recorded_value(get_system_state_data(state, AvailableStatusChangeParameter(), T))
) where {T <: PSY.Device}
status_change_data = get_last_recorded_value(
get_system_state_data(state, AvailableStatusChangeParameter(), T),
)

column_names = axes(state_data.values)[1]
status_data = get_last_recorded_value(get_dataset(sym_state, key))


Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

for (ix, name) in enumerate(column_names)
status = status_data[name]
status_change = status_change_data[name]
if status == 1.0 && status_change == 1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
if status == 1.0 && status_change == 1.0
if status == 1.0 && status_change == 1.0

Comment on lines +543 to +545
updated_status_value[ix] = 0.0
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
updated_status_value[ix] = 0.0
end
end
updated_status_value[ix] = 0.0
end
end

@jd-lara jd-lara merged commit 2cfdc18 into jd/outages Jan 29, 2025
4 of 8 checks passed
@jd-lara jd-lara deleted the mb-implement_parameter_fucntion branch January 29, 2025 19:25
Copy link
Contributor

Performance Results

Version Precompile Time
Main 5.541252282
This Branch 5.936756612
Version Build Time
Main-Build Time Precompile 66.628503298
Main-Build Time Postcompile 0.85228368
This Branch-Build Time Precompile 64.768959812
This Branch-Build Time Postcompile 1.061784975
Version Solve Time
Main-Solve Time Precompile 618.087990212
Main-Solve Time Postcompile 581.072300718
This Branch-Solve Time Precompile 403.926179626
This Branch-Solve Time Postcompile 365.465845342

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