Fix a scoping issue in _get_irreducible_buses_due_to_dlrs#113
Open
odow wants to merge 1 commit into
Open
Conversation
|
Performance Results
|
Collaborator
|
This comes up in other spots too. (IS's |
Collaborator
Author
The "correct" approach is to use the actual data types as keys, rather than converting them to some sort of Symbol. The issue is that it's really hard to detect and fix these scoping issues because they depend on package imports, and the tests just bring everything into scope with |
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.
This threw me for a loop. I'm using
as a script. And I had it working. Then restarted Julia and had a cryptic error message about a missing symbol
"PowerSystems.Line".The issue is that in the guts of
set_device_model!we callnameof(D)to set the key:https://github.com/Sienna-Platform/InfrastructureOptimizationModels.jl/blob/9ccee6240f9b07ee16bf5a23b144e2a9e4fc4459/src/core/device_model.jl#L112-L116
but in POM we use
Symbol(D). These differ depending on whetherDis in the current scope:I must have had
using PowerSystemsin the first REPL and not the second.