Skip to content

Port performance updates for parameter broadcasting#110

Closed
acostarelli wants to merge 1 commit intomainfrom
ac/fix-parameter-broadcasting
Closed

Port performance updates for parameter broadcasting#110
acostarelli wants to merge 1 commit intomainfrom
ac/fix-parameter-broadcasting

Conversation

@acostarelli
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates parameter population logic to use index-based “fast-path” setters for improved performance and fixes a multiplier-row misalignment bug affecting parallel branches that share the same time-series UUID.

Changes:

  • Replaced per-(name,time) parameter/multiplier setters with array-data + _set_*_at! index-based setters across several parameter build paths.
  • Fixed PTDF/network-aware time-series parameter handling by using separate row lookups for the UUID-keyed parameter array vs the name-keyed multiplier array (prevents NaN multiplier rows for parallel branches).
  • Added a regression test ensuring multiplier rows for parallel branches are fully populated (no NaNs).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/common_models/add_parameters.jl Switches to direct array writes for parameters/multipliers and corrects UUID-vs-name row addressing for parallel-branch cases.
src/static_injector_models/hydro_generation.jl Uses direct array writes when building hydro-related parameters to reduce setter overhead.
test/test_parallel_branch_parameter_multipliers.jl Adds regression coverage to ensure parallel-branch multiplier rows aren’t left as NaN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +553 to +554
for (i, (ts_name, device_name, device)) in
enumerate(zip(ts_names, device_names, active_devices))
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