Thursday, July 17, 2014

Old Fashioned SQL scripts

The tools gdx2sqlserver has an option to generate SQL scripts to populate a SQL Server database from GAMS data. (It has many other ETL facilities including bulk operations for high performance). Sometimes old fashioned SQL scripts are useful: we can zip and email such a file and a database person can look at it and design SQL code for further processing.

image

Saturday, July 5, 2014

Ouch

From: http://wwww.gams.com/mccarl/newsletter/news35.pdf

PDF if the probability of a point is needed

 

Update: this is now fixed.

Tuesday, July 1, 2014

A little bit extra fine tuning

Sometimes it helps to revisit old code and see if we can do better:


--- Job compare.gms Start 07/01/14 23:12:51 24.2.2 r44857 WEX-WEI x86_64/MS Windows
GAMS 24.2.2   Copyright (C) 1987-2014 GAMS Development. All rights reserved
Licensee: Erwin Kalvelagen                               G130719/0001CV-GEN
          Amsterdam Optimization Modeling Group                     DC10455
--- Starting compilation
--- compare.gms(1) 2 Mb
--- call gdx2sqlite -i test4_2.gdx -o tmp1.db
GDX2SQLITE v 0.4
GDX Library      24.2.2 r44857 Released Mar  4, 2014 VS8 x86/MS Windows      
Current directory:C:\Projects\impact3\OutputFiles\PivotTables

   InputFile:test4_2.gdx
   OutputFile:tmp1.db
   Symbols:1
   Uels:339
   Loading Uels
   Processing Symbols
     results(4094828 records)
   Elapsed:23.71 seconds
   Done

--- compare.gms(2) 2 Mb
--- call gdx2sqlite -i test4_2.gdx -o tmp2.db -fast -small
GDX2SQLITE v 0.4
GDX Library      24.2.2 r44857 Released Mar  4, 2014 VS8 x86/MS Windows      
Current directory:C:\Projects\impact3\OutputFiles\PivotTables

   InputFile:test4_2.gdx
   OutputFile:tmp2.db
   Symbols:1
   Uels:339
   Loading Uels
   Processing Symbols
     results(4094828 records)
   Elapsed:10.84 seconds
   Done

--- Starting execution - empty program
*** Status: Normal completion
--- Job compare.gms Stop 07/01/14 23:13:25 elapsed 0:00:34.574