Page 1 of 1

Open and Read Files in GAMS

Posted: Wed Aug 20, 2008 1:01 pm
by Archiver


Hi,

I'm newbie in GAMS. And I need use GAMS to solve one of the
problems I'm working on.
The problem to optimize involves a 200*2000 matrix that I
calculated with a C program and the matrix is written to a .txt file.
Is it possible to open and read the .txt file, and assign the values
read in GAMS input file? I've been reading the GAMS user guide, but
somehow I didn't see any function call that might do this for me.
Many thanks.

Eunice Chen
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---



Re: Open and Read Files in GAMS

Posted: Wed Aug 20, 2008 2:41 pm
by Archiver


Eunice,

Check out the $include facilities together with $on/offdelim. If you
don't find the information in the User's Guide sufficient, you might
want to look at Bruce McCarl's Expanded User's Guide (part of the
Windows installation unbder 'Help' or from the web site as PDF:
http://www.gams.com/dd/docs/bigdocs/gam ... rguide.pdf).
You might also find the GAMS Support Wiki useful: http://support.gams-software.com/doku.php

For producing ASCII files with GAMS, read about the 'put' facilities.

Regards,
Michael Bussieck - GAMSWorld Coordinator

On Aug 20, 5:01 am, lweunice wrote:
> > Hi,
> >
> > I'm newbie in GAMS. And I need use GAMS to solve one of the
> > problems I'm working on.
> > The problem to optimize involves a 200*2000 matrix that I
> > calculated with a C program and the matrix is written to a .txt file.
> > Is it possible to open and read the .txt file, and assign the values
> > read in GAMS input file? I've been reading the GAMS user guide, but
> > somehow I didn't see any function call that might do this for me.
> > Many thanks.
> >
> > Eunice Chen
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---