multilvel optimization

Hi everyone!
i would like to to model the following thing:

-loop over a month
-for each day of the month: create a “load profile” over 24h; after that, for each hour decide the set points; use the results of h24 (and then 48, 72) to perform again the creation of a new load profile and so on…
-excel report for each day of operation.

how can i do this?

thanks a lot

You can use loop
https://www.gams.com/latest/docs/UG_FlowControl.html#INDEX_loop_22_statement

Then set/fix the values of variables between solve statements

Use execute_unload to get data into gdx or put option to write the results to a file.
You will also be able to see all the details after the run is complete in the .lst file.