I have an MILP model (with both binary and non-negative variables) that I aim to solve a part of it with the CPLEX solver. In fact, I want to use a meta-heuristic algorithm to first determine the binary variables of this model. Then, I will let GAMS finds the optimal values of non-negative variables where the binary variables are fixed. If I have multiple sets of these binary variables, I need to call GAMS multiple times to find the optimal values of non-negative variables for each set of binary variables. During these multiple iterations, GAMS creates one identical model (however, the values of fixed/binary variables will change). Is there any way to prevent the generation of the model multiple times and save the CPU time? Do you have any suggestions for saving CPU time for this specific case?
Code: Select all
loop(nTimes,
#fix binary variables
#call the gams model
#store the non-negative variables
);