Skip to content

fix: use correct subdimension index for delay aux vars#92

Merged
chrispcampbell merged 1 commit into
developfrom
todd/91-delay-nan
Jul 24, 2021
Merged

fix: use correct subdimension index for delay aux vars#92
chrispcampbell merged 1 commit into
developfrom
todd/91-delay-nan

Conversation

@ToddFincannon
Copy link
Copy Markdown
Collaborator

@ToddFincannon ToddFincannon commented Jul 24, 2021

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.

@chrispcampbell chrispcampbell changed the title fix: use correct subdimension index for delay aux vars (#91) fix: use correct subdimension index for delay aux vars Jul 24, 2021
Copy link
Copy Markdown
Contributor

@chrispcampbell chrispcampbell left a comment

Choose a reason for hiding this comment

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

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.

@chrispcampbell chrispcampbell merged commit 7158b0f into develop Jul 24, 2021
@chrispcampbell chrispcampbell deleted the todd/91-delay-nan branch July 24, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NaN values in output in the delay test model

2 participants