How do I: get GDX dump of sets/scalars/parameters only?

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

How do I: get GDX dump of sets/scalars/parameters only?

Post by Archiver »



Hi

I would like to make a gdx dump of all the sets/paramters/scalars of
my model, but I do not want any equations or variables in there at
all.

Because our model solves iteratively some the sets/parameters/scalars
get changed as it loops around looking for a solution. I need to
capture the FINAL values after the last solve.

Currently my gdx dump at the end of the model solve contains the
equations and variables as well. I really need to get rid of these.

Is there a way to do this?

There are hundreds of sets/parameters/scalars so I cannot manually
specify each one for inclusion into the gdx file, and it would become
impossible to maintain and eventually stuff would get left out.

All help appreciated.

Thanks

AndyC
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: How do I: get GDX dump of sets/scalars/parameters only?

Post by Archiver »



Andy,

I don't know of any way doing this without listing all the
(set,parameter) symbols in an execute_unload statement. If you just do
'execute_unload "allsymbols.gdx";' as your last line, GAMS will export
everything (including vars and equs) to the GDX container
allsymbols.gdx (similar to the command line parameter 'gdx=...'). You
can empty your variable/equation symbols, by adding 'option
clear=var1, clear=var2, ..., clear=equ1,clear=equ2,...;' as the last
line(s) in your program. Hope this list is smaller and maintainable.
You can also write your own GDX utility. There are API files in the
22.7 distribtution and example programs, Such a utility could go
through an existing GDX container and only copy sets and parameter
symbols to the a new GDX container.

Michael

On May 11, 7:13 pm, AC wrote:
> > Hi
> >
> > I would like to make a gdx dump of all the sets/paramters/scalars of
> > my model, but I do not want any equations or variables in there at
> > all.
> >
> > Because our model solves iteratively some the sets/parameters/scalars
> > get changed as it loops around looking for a solution. I need to
> > capture the FINAL values after the last solve.
> >
> > Currently my gdx dump at the end of the model solve contains the
> > equations and variables as well. I really need to get rid of these.
> >
> > Is there a way to do this?
> >
> > There are hundreds of sets/parameters/scalars so I cannot manually
> > specify each one for inclusion into the gdx file, and it would become
> > impossible to maintain and eventually stuff would get left out.
> >
> > All help appreciated.
> >
> > Thanks
> >
> > AndyC
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---


Post Reply