fscanf gams

13 views
Skip to first unread message

Federico Perea

unread,
Apr 18, 2016, 11:09:48 PM4/18/16
to gams...@googlegroups.com
hello all!

Do you know if gams can read data from, for example, a text file, like other languages read using something like "fscanf"?

Thanks in advance!

Fede

Michael Bussieck

unread,
Apr 18, 2016, 11:32:25 PM4/18/16
to gamsworld
Fede,

GAMS has strict requirements about the data format it processes. The only variant is using $ondelim (http://www.gams.com/help/topic/gams.doc/userguides/userguide/_u_g__dollar_control_options.html#DOLLARonoffdelim). The Windows version of GAMS ships with a couple of Unix utilities (http://www.gams.com/help/topic/gams.doc/tools/posix/index.html) that help to write platform independent code. You find a few examples of AWK usage to process standard problem formats (that are not conform with GAMS input data format) in the model library: https://www.gams.com/modlib/libhtml/awkqap.htm, https://www.gams.com/modlib/libhtml/awktsp.htm.

Hope this helps,
Michael Bussieck - GAMSWorld Coordinator
Reply all
Reply to author
Forward
0 new messages