GAMS is not creating automatically the .log file after i run my models, the information is show only in the panel of the program (not as an independent file)
How can i get the log file ?
Thanks!
GAMS is not creating automatically the .log file after i run my models, the information is show only in the panel of the program (not as an independent file)
How can i get the log file ?
Thanks!
This depends on how you use GAMS. From the command line use “lo=4” this writes the log to stdout and a file filename.log. In (recent versions of) GAMS/Studio check the Settings dialog:
With the GAMS/IDE you can click “Open log” and then save as a file.
-Michael
Hi, dear Mbussieck
I have a model that I solved through Conopt
I want to extract the log file information (iteration number, time, and objective function value) to Excel and draw a solver performance curve.
The only way that I found was to copy all log file information, which is hard and impossible to separate all data from those for which I need it.
Can you suggest a way to save log file information to Excel in which each column represents one piece of information, such as iteration, etc.?
Thank you.
Parsing the log file is the only way for Conopt. For some MIP codes, e.g. Cplex, there is a GAMS facility called mip- or solvetrace. This allows to print the primal and dual solution over time. For details check the docs.
-Michael
thank you for your kind response
I have another question
I have a MINLP optimization model, which I tried to solve through a different solver, but only the DICOPT can solve it. The DICOPT uses the CONOPT solver for the NLP subproblem. During three minutes, it solves and reports the optimal solution, but it cannot find a discrete variable. Without going to the MIP master problem, DICOPT reports only CONOPT results. How can I relie on the CONOPT result, and how can I be sure it’s optimal or near optimal?
thank you very much
DICOPT solves a sequence of NLP and MIP problems and when luck find a (locally) optimal solution this way. You can’t just rely on the Conopt/NLP solution to get a solution for the MINLP problem. The question about optimality is tricky if your model in non-convex. DICOPT with stop=1 gurantees a global optimum for convex problems. Other stop values might be better for non-convex problems.
You might also consider posting your model here to get some help on the MINLP forumlation and some advice on using other solvers.
Good luck!
-Michael
Thank you for the insights, Michael.
I recently noticed that my optimization model falls under DNLP rather than MINLP. After testing different solvers in GAMS, I found that only CONOPT could handle the model, and its results were logical and usable, though the outcome indicated that the model is locally optimal. I have a couple of questions based on this:
Why other solvers can’t solve the model?
Can CONOPT generally solve hard DNLP problems?
Thanks again for your advice on DICOPT and convexity issues—it’s good to know that stop values can affect global optimality guarantees in convex cases.
Conopt is a great solver. It’s hard to speculate why other solver can’t solve this. I don’t know which you tried and why they failed. There can be multiple reason. Without the actual model is it useless to speculate.
The problem with the D in DNLP is that left and right gradients tell a different story at some points and hence it is difficult for local solvers to make sense out of this because they theoretically require smooth derivatives. Sometimes, it is actually better to have an MINLP with explicit binary variables than some function like max, abs, … with discontinuous derivatives. See Good NLP Formulations.
-Michael