split add_param_container! into separate functions - #148
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #147 by splitting the overloaded add_param_container! API into four explicitly named parameter-container builder functions, while keeping a compatibility layer so downstream packages can migrate incrementally.
Changes:
- Introduces and exports four dedicated builder functions:
add_time_series_parameter_container!,add_cost_function_parameter_container!,add_variable_value_parameter_container!, andadd_event_parameter_container!. - Adds
add_param_container!compatibility shims forwarding to the new builders, and includes them afteradd_param_container.jl. - Exports
add_parameterized_lower_bound_range_constraintsalongside the existing upper-bound helper.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/InfrastructureOptimizationModels.jl |
Updates exports and include order to expose the new builder APIs and include the compatibility shims. |
src/common_models/add_param_container.jl |
Replaces the multi-method add_param_container! wrappers with four clearly named builder functions plus updated docstrings. |
src/common_models/add_param_container_shims.jl |
Adds forwarder methods to preserve the legacy add_param_container! call sites during migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Performance Results This branch |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jd-lara
reviewed
Aug 15, 2026
jd-lara
left a comment
Member
There was a problem hiding this comment.
This is a great improvement probably we can specialize even more
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See issue #147. I added shims just so CI will keep passing in POM...but really we should probably just migrate over POM to the new names as soon as this is merged