Clear variables only to the extent necessary
Currently we clear variables fully between each solve. This has downsides:
- we don't get to use the level value of variables in the next solve
- we are using r_... to get the values for fixed variables - consequently there is unnecessary copying and we must calculate those r_...s even when we don't want to output them.
The solution would be to modify the clear commands in the 3c_periodicLoop.gms so that they are ft(f,t) dependent (and clear only the part of the history that's not needed anymore and hasn't been cleared before). Then all places where r_ is used to get pre-solve variable values should be updated to use v_.