Pass list for looping functionality #411
Unanswered
PatMcFarlane
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is there a way to pass a list into the model file for looping functionality?
Ideally, I'd like to do something like:
!for list
!do
X_? = Y_? / W_?;
!end
where list has multiple elements and would be defined in a separate matlab script.
e.g. list = {'cars', 'boats', 'planes', 'trains'}
The context for this is that I am working on a multi-sector multi-region model and we want to have a flexible model file where we can easily vary the aggregation level. Basically, the elements in the list would change when we adjust the aggregation, but we do not want to have to rewrite the whole model file when we change aggregations.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions