Page 1 of 1

Loops within the model object

Posted: Thu Oct 09, 2014 11:26 am
by ecardamone
Hi,

Is it possible to run a loop in the model object? For example, when I set up a model as follows,

model m
m.merge eqGO21
m.merge eqGO22
m.merge eqGO31
m.solve

I get a model object in my workfile that contains three equations, which is what I want. But given that I have 30 equations, I would like to use a loop if possible. However, when I set it up this way,

for %k 21 22 31
model m
m.merge eqGO{%k}
m.solve
next

the model object in the workfile will contain only one equation, the last one, eqgo31.

Thanks for your help!

Re: Loops within the model object

Posted: Thu Oct 09, 2014 11:58 am
by EViews Gareth

Code: Select all

model m for %k 21 22 31 m.merge eqGO{%k} next m.solve

Re: Loops within the model object

Posted: Thu Oct 09, 2014 12:08 pm
by ecardamone
Thank you!