fix: use correct subdimension index for delay aux vars#92
Merged
Conversation
chrispcampbell
approved these changes
Jul 24, 2021
Contributor
chrispcampbell
left a comment
There was a problem hiding this comment.
I don't have a full understanding of how (sub)dimensions are handled in SDE, so I will trust that this is the correct fix. I do see that the tests now pass without the messages that were seen earlier (noted in the issue), so it looks like this is fixed. Will merge it shortly.
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.
Fixes #91
The delay test generated NaN values for aux vars subscripted with a subdimension. Aux vars are generated as part of internal delay equation generation. They are added in the analysis stage after the model vars have already been read. The problem was that vars on a subdimension must be separated into individually indexed vars, and this was not being done for the generated aux vars. There is a mechanism to add "non a-to-a" (separated vars in XMILE terminology) after the initial scan of model variables. This was used to add separated aux vars and get the correct refid for references. The DELAY1 and DELAY3 functions both needed this change in somewhat different variations. I regenerated the variable listing too to account for the new aux vars. The delay test now passes without the NaN error messages.