for a Lot sizing model I'd like to run multiple test instances and have the solution and some parameters of the test instances saved in different excel files.
My attempt was to run a loop and let it solve the different cases like this:
In the future I want to add more test instances resulting in more loops. So I'd like the files to be created automatically for every test instance.
Code: Select all
model EOGLSP_test /All /; option savepoint=2; loop(SC_Fall, sc(k)=SCKosten(k,SC_Fall) solve EOGLSP_test minimizing ZF using MIP; execute_unload sc ) ;
I added the complete code to my post as well.
It has worked so far that two different gdx files are generated. In this case EOGLSP_test_p1 and EOGLSP_test_p2.
But I'd like to also add parameters. For example the setup costs sc(k) to the gdx file. I tried doing this with the command "execute unload".
Is this the right approach? I tried some different things and read through the Gams Data Exchange documentation. But unfortunately I'm not making much progress.
The next step after that would be to create an excel file for every test instance as well with parameters and variables that are of interest to me.
Thanks for taking the time to read my post and I'm thankful for any help in advance.
I hope I didn't forget any crucial information. If I did please let me know.