Loops within the model object
Posted: Thu Oct 09, 2014 11:26 am
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!
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!