I have a code which runs a nested loop. The inner loop keeps updating and recording data, while the outer loop needs to reset *all* values each time before starting the inner loop. I was planning to use execute_unload and execute_load for this, but am having trouble getting it to work. Some pseudocode to explain what I am trying.
Code: Select all
*set up all default data
parameter x /0/;
execute_unload 'defaultData.gdx'
loop(i,
execute_load 'defaultData.gdx' *;
loop(j,
*manipulate parameters
x=x+j
Objective=E=f(i,j)
solve model min Objective
)
)
Is there anyway to accomplish this? To reset all values (parameters, variables, equations) back to their default values, without needing to explicitly point to them? For example, is there a wildcard option (*) like shown in the example? Any help is appreciatted.