GAMS supports the option of outputting numerous run statistics to
a data text file known as the trace file. The use of the trace file is useful,
for example, if batch runs are done using several solvers on a model
test set and performance statistics are to be obtained; GAMS appends to
the tracefile, if it already exists.
Using the GAMS trace option
The trace option
is invoked by using the command trace=(filename). If we were to
run the model
GAMS Model Library
from the command line we would specify:
>> gams trnsport trace=(filename) traceopt=(integer)
where (filename) is the name of the trace file to be created.
The trace feature supports several options, that is several different types
of trace files can be created, depending on what output information is
desired. The different trace file options are obtained by specifying
traceopt=(integer), where (integer) can take a value
For our tools in the Performance World we will make use
of traceopt=3 unless otherwise noted.
Using this option from the GAMS IDE, we would specify:
in the GAMS parameter list box.
A sample trace file is
trace1.trc where the file includes statistics of
GAMS runs over all LP models in LINLib for a single solver A. We
list the solver used as "A" in order to hide proprietary data of the
real solver used.
The tracefile option appends to any previous trace file. That is, if a
previous trace file of the same name already exists, then all new data
output will be appended. Users should be careful to make sure that all
old versions of the trace file are deleted if the same filename is used.
Trace file parameters
The column headers for traceopt=3 are as follows:
1. filename: GAMS model filename
2. modeltype: LP, MIP, NLP, etc.
4. NLP def: default NLP solver
5. MIP def: default MIP solver
6. juliantoday: start day/time of job
7. direction: 0=min, 1=max
8. equnum: total number of equations
9. varnum: total number of variables
10. dvarnum: number of discrete variables
11. nz: number of nonzeros
12. nlnz: number of nonlinear nonzeros
13. optfile: 1= optfile included
14. modelstatus: GAMS model return status - see the GAMS return codes section.
15. solvestatus: GAMS solver return status - see the GAMS return codes section.
16. obj: value of objecive function
17. objest: objective function estimate
18. res used: resource time used (sec)
19. iter used: number of solver iterations
20. dom used:
21. nodes used:
22. user1: user comment - preceded by a #
The final column (22. user1:) is obtained by specifying
on the command line or the GAMS IDE parameter list box. This will append
the text # comment to the end of each line.