Saving Time of when best solution was found & log and lst files with unique names
Posted: Fri Jun 23, 2023 6:20 pm
Hi everyone,
I created a model that is nonlinear and nonconvex through the BARON solver with optcr=0.001.
Im exploring different parameter combination instances through MATLAB which then calls my GAMS script (that contains the NLP/nonconvex model) to solve the model. Once the optimal solution or a feasible solution that meets the specified termination criteria is found, results are stored as variables and saved to my MATLAB script. So far, I've been able to store my solution (decision variables & obj val), theoretical upper bound, and total run time. The disadvantage to my method is that the lst and log files are not saved since these files are overwritten every time MATLAB calls the GAMS file to solve a specified instance.
The few times I've directly ran my model in GAMS, I've been able to look at the iteration log and noticed that the best solution is found relatively quickly (e.g., the best solution was found in 5 min, but the solver for ran for several hours more because it hasn't satisfied the specified optcr or reslim). This is an important metric to record for my analysis.
I cant find anything that explains how to save time of best solution was found. Additionally, it would also be nice to save all log and lst files (possibly have GAMS specify a unique file name to prevent it from overwriting each time). Any help on this is greatly appreciated!
I created a model that is nonlinear and nonconvex through the BARON solver with optcr=0.001.
Im exploring different parameter combination instances through MATLAB which then calls my GAMS script (that contains the NLP/nonconvex model) to solve the model. Once the optimal solution or a feasible solution that meets the specified termination criteria is found, results are stored as variables and saved to my MATLAB script. So far, I've been able to store my solution (decision variables & obj val), theoretical upper bound, and total run time. The disadvantage to my method is that the lst and log files are not saved since these files are overwritten every time MATLAB calls the GAMS file to solve a specified instance.
The few times I've directly ran my model in GAMS, I've been able to look at the iteration log and noticed that the best solution is found relatively quickly (e.g., the best solution was found in 5 min, but the solver for ran for several hours more because it hasn't satisfied the specified optcr or reslim). This is an important metric to record for my analysis.
I cant find anything that explains how to save time of best solution was found. Additionally, it would also be nice to save all log and lst files (possibly have GAMS specify a unique file name to prevent it from overwriting each time). Any help on this is greatly appreciated!