Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscript Updimensioning #70

Closed
JamesPHoughton opened this issue Jun 28, 2016 · 3 comments · Fixed by #223
Closed

Subscript Updimensioning #70

JamesPHoughton opened this issue Jun 28, 2016 · 3 comments · Fixed by #223
Labels

Comments

@JamesPHoughton
Copy link
Collaborator

When a multidimensionally subscripted variable (say with 2 dimensions) is a function of a subscripted variable with fewer (say 1) dimension, Vensim will broadcast the lower dimensional array over all values of the new dimension.
(See https://github.com/SDXorg/test-models/tree/master/tests/subscript_updimensioning for an example). Xarray does not do this by default, so we'll need to extend the functionality.

This has special relevance for subscripted stocks that are initialized with floats.

This could be a bigger task...

@JamesPHoughton
Copy link
Collaborator Author

This is also an issue when a subscripted variable takes its value from another variable returning only a float. This means we'll probably have to deal with the updimensioning at runtime, not just translate time, which is a pain. For an example, see: https://github.com/SDXorg/test-models/tree/master/tests/subscript_constant_call

@JamesPHoughton
Copy link
Collaborator Author

This is also the primary issue preventing success of: https://github.com/SDXorg/test-models/tree/master/tests/subscript_mixed_assembly

@JamesPHoughton
Copy link
Collaborator Author

This is going to require a function to be aware of the dimensions it should put out. In the past, we have had a dimension dictionary as an attribute of the subscripted function. This is probably something we shouldreturn to.

@JamesPHoughton JamesPHoughton linked a pull request Dec 17, 2020 that will close this issue
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 a pull request may close this issue.

1 participant