I am trying to set up (and solve) multiple optimizations problems in Pyomo/AMPL
. For this I need to define the models first, for AMPL
:
model model_1.mod
model model_2.mod
model model_3.mod
...
model model_n.mod
for Pyomo
:
model_1 = ConcreteModel()
model_2 = ConcreteModel()
...
model_n = ConcreteModel()
I was wondering if there is an automatic way to do this, whether with a for loop, or some indexing so that if n=100 I don't have to write 100 model_k = ConcreteModel()
.