Anchor NetworkModel to a declared network source - #152
Open
jd-lara wants to merge 2 commits into
Open
Conversation
jd-lara
added a commit
to Sienna-Platform/PowerOperationsModels.jl
that referenced
this pull request
Aug 12, 2026
The source pinned a machine-local path that no longer exists, so the environment could not resolve. `main` is not a usable target either: the `AbstractNetworkSource` anchor this branch builds on is not on it. Pin the branch carrying that anchor (Sienna-Platform/InfrastructureOptimizationModels.jl#152) until it merges.
Contributor
|
Performance Results This branch |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
m-bossart
reviewed
Aug 13, 2026
| reduction_exceptions = Int[], | ||
| duals = Vector{DataType}(), | ||
| evaluations = EvaluationContainer(), | ||
| hvdc_network_model = nothing, |
There was a problem hiding this comment.
Passing the hvdc_network_model is domain specific and doesn't belong in IOM
Member
Author
There was a problem hiding this comment.
This is TBD to be removed
Comment on lines
+135
to
+146
| """ | ||
| The network matrix derived during instantiation. Implemented in the matrix-aware | ||
| downstream package, which owns the concrete `AbstractNetworkData`. | ||
| """ | ||
| function get_network_matrix end | ||
|
|
||
| """The contingency matrix derived during instantiation. Implemented downstream.""" | ||
| function get_contingency_matrix end | ||
|
|
||
| """The network reduction derived during instantiation. Implemented downstream.""" | ||
| function get_network_reduction end | ||
|
|
There was a problem hiding this comment.
What is the purpose of defining these in IOM and implementing them downstream in POM? I'm guessing there is a reason but want to understand.
Member
Author
There was a problem hiding this comment.
I think this is because these are methods defined for network model. I think that NetworkModel still has pending work to see how it would generalize to infrastructure networks.
`NetworkModel` previously had no way to say where its network comes from, so consumers reached for whichever matrix they had and could end up building a model whose matrices disagreed about the reduction. Add an `AbstractNetworkSource` field with a `DefaultNetworkSource` default, plus `get_network_source`, so a template declares the network once and the build resolves every matrix from it. Downstream packages supply the concrete sources: PowerOperationsModels adds `NetworkReductionSpec`, `PrebuiltMatrixSource` and `PrebuiltCoreSource` on top of this abstract.
jd-lara
force-pushed
the
jd/network-sources
branch
from
August 16, 2026 01:05
7f75ae1 to
12e0acf
Compare
IS4's own [sources] pin for this unregistered dependency is ignored once InfrastructureSystems is a dependency rather than the root project, so Pkg.instantiate fails to resolve it here without a matching pin.
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.
What
Adds an
AbstractNetworkSourcefield toNetworkModel, defaulting toDefaultNetworkSource(), plus aget_network_sourceaccessor.Why
NetworkModelhad no way to declare where its network comes from. Consumers reached for whichever matrix they happened to hold, so a build could end up with matrices that disagreed about which reduction had been applied.With the source declared on the template, the build resolves every matrix from one declaration — one Ybus per build, therefore one reduction, and derived matrices agree by construction.
Scope
This PR adds only the neutral abstract and the field. The concrete sources are domain-specific and live downstream in PowerOperationsModels (
NetworkReductionSpec,PrebuiltMatrixSource,PrebuiltCoreSource), which subtypes this abstract.