Another question regarding the loops and saving the variable values into Parameters:
The model runs in several loops (lo) , I have created a parameter value for each variable to store the different values from each run into it but for some reason only the objective function value (z) is stored while all the other variables just repeat the same results into the parameter for all loops . Below is what i have included into my model in the body of the main execution:
I have introduced 2 equations for the integer cuts to get different values for each run:
Start_Stop_watch;
ITER := 0;
while( ITER < card(lo)) do
for lo do
w(i) := bi_choice(i,lo) ;
TBU:= To_used(lo);
z := ob_value(lo) ;
x(i) := XX(i,lo) ;
y(i) := YY(i,lo) ;
a(i) := aa(i,lo) ;
b(i) := bb(i,lo) ;
upp(i,lo)$((ord(lo) = ITER) AND (w.level(i) = 1)) := yes;
low(i,lo)$((ord(lo) = ITER) AND (w.level(i) = 0)) := yes;
SOLVE Model;
ITER := ITER + 1;
endfor ;
endwhile;
Stop_Stop_watch;
put Results;
Regards,
Deema