Wednesday, July 16, 2008

GAMS log cosmetics

C:\projects\test>touch r.gms

C:\projects\test>type r.gms

C:\projects\test>gamslib trnsport
Model trnsport.gms retrieved

C:\projects\test>gams trnsport a=c s=t1
--- Job trnsport Start 07/16/08 20:27:27
GAMS Rev 227 Copyright (C) 1987-2008 GAMS Development. All rights reserved
Licensee: Erwin Kalvelagen G070509/0001CE-WIN
GAMS Development Corporation DC4572
--- Starting compilation
--- trnsport.gms(69) 3 Mb
*** Status: Normal completion
--- Job trnsport.gms Stop 07/16/08 20:27:27 elapsed 0:00:00.006

C:\projects\test>gams r r=t1
--- Job r Start 07/16/08 20:27:43
GAMS Rev 227 Copyright (C) 1987-2008 GAMS Development. All rights reserved
Licensee: Erwin Kalvelagen G070509/0001CE-WIN
GAMS Development Corporation DC4572
--- Starting continued compilation
--- Starting execution: elapsed 0:00:00.004
--- r.gms(45) 3 Mb
--- Generating LP model transport
--- r.gms(66) 3 Mb
--- 6 rows 7 columns 19 non-zeroes
--- r.gms(66) 3 Mb
--- Executing CPLEX: elapsed 0:00:00.010

ILOG CPLEX May 1, 2008 22.7.2 WEX 4792.4799 WEI x86_64/MS Windows
Cplex 11.0.1, GAMS Link 34

Reading data...
Starting Cplex...
Tried aggregator 1 time.
LP Presolve eliminated 1 rows and 1 columns.
Reduced LP has 5 rows, 6 columns, and 12 nonzeros.
Presolve time = 0.00 sec.

Iteration Dual Objective In Variable Out Variable
1 73.125000 x(seattle.new-york) demand(new-york) slack
2 119.025000 x(seattle.chicago) demand(chicago) slack
3 153.675000 x(san-diego.topeka) demand(topeka) slack
4 153.675000 x(san-diego.new-york) supply(seattle) slack

Optimal solution found.
Objective : 153.675000

--- Restarting execution
--- r.gms(66) 2 Mb
--- Reading solution for model transport
--- r.gms(68) 3 Mb
*** Status: Normal completion
--- Job r.gms Stop 07/16/08 20:27:43 elapsed 0:00:00.079

C:\projects\test>

In this example we do the following:

  1. create an empty gams file r.gms
  2. compile trnsport.gms and save as t1
  3. restart empty file from t1

In this case the execution time line numbering refers to the wrong file. I.e. r.gms(45) refers to line 45 of the file r.gms, but that file has zero lines. I sent this to GAMS and they tell me execution errors have the correct file/line printed.

1 comment:

  1. This is somewhat related to providing the correct filename and "local" linenumber when a run time error occurs. This is more complicated than it sounds (think about an include in a loop).

    ReplyDelete