Reading info from gdx in java

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Reading info from gdx in java

Post by Archiver »


Hi all! From what I get of the high-level java API manual (I'm reading this), there is no way to read from a gdx and populate a GAMSDatabase. I also get that there isn't a way to read from a .gms file to do the same thing.

Are these impressions correct ?

Thanks In Advance!
Claudio

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Reading info from gdx in java

Post by Archiver »


Hi Claudio,

There is a way to read a GAMSDatabase from gdxfile; using GAMSWorkspace.addDataBaseFromGDX(gdxFileName)
..
GAMSDatabase db = ws.addDatabaseFromGDX(yourdata); // from 'yourdata.gdx'

To do the similar thing from .gms file, you can use GAMSWorkspace.addJobFromFile(filename) , run a job, and use GAMSDatabase.OutDB() to access the database:
..
// Create and run a job from 'yourfile.gms' and get output database
GAMSJob job = ws.addJobFromFile(yourfile);
job.run();
GAMSDatabase db = job.OutDB();
..
You may also want to look at Java tutorial on how to run a job using data from GDX.

Best,
Jeed


On Mon, Mar 7, 2016 at 12:51 AM, Claudio Delpino wrote:

Hi all! From what I get of the high-level java API manual (I'm reading this), there is no way to read from a gdx and populate a GAMSDatabase. I also get that there isn't a way to read from a .gms file to do the same thing.

Are these impressions correct ?

Thanks In Advance!
Claudio

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Post Reply