Hi guys!
I solved a optimization problem for 20 different units of time by using a loop. Is it possible to create one GDX for all 20 solutions? Respectively to transfer all of them to one excel sheet?
Best Greetings
TheBebbo
Hi guys!
I solved a optimization problem for 20 different units of time by using a loop. Is it possible to create one GDX for all 20 solutions? Respectively to transfer all of them to one excel sheet?
Best Greetings
TheBebbo
If you already have a loop, copy the solution into a report parameter with an additional index (the loop index) and then export the GDX/Excel:
...
set s / s1*s10/; parameter xl(s,i,j);
loop(s,
solve mymodel min z us lp;
xl(s,i,j) = x.l(i,j);
);
execute_unload 'allsol', xl;
-Michael
Thanks for your answer!
Sets
t/18760/
Y/120/;
Parameters;
P_strom(t)
…
Variable
G Objective function
Charge(t)
Discharge(t)
Model Test Gewinnmaximierung PV-BSS System /all/;
Solve Test using LP max G;
loop(y, Solve Test using LP max G; P_Strom(t) = P_strom(t) * 1.02; Age=Age * 0.9883; PV_Erzeugung(t) = PV_Erzeugung(t) * 0.9945 )
This is only a part of my code.
I get one solution with a GDX file for every y with all values I need. How can I get all these values in one GDX file or Excel sheet.
Best greetings
TheBebbo
Why does the solution proposed in my previous answer not work for you? -Michael