Hello. I am new to AMPL and I want to solve the same objective function but under different constraints where the only difference is MR[r], which is a vector. I have tried different variations similar to the one below, but it will only display r = 13. How do I display objective function for all r = 1…13?

My .mod file

minimize Objective {r in 1…13}:

sum {i in 1…n,j in 1…n} Mu[i]*Mu[j]*Cov[i,j];

subject to Constraint {r in 1…13}:

sum {i in 1…n} Mu[i]*ER[i] >= MR[r];

My .run file

for {r in 1…13}{

objective Objective[r];

solve;

printf ‘%8.5f’ , sum {i in 1…n} Mu[i]*ER[i];

}