Linking matlab and Gams

Dear all,
I want to run gams from Matlab.
I managed to run it. But I need to change a few parameters for each run from Matlab.
Can anybody help me?
Regards

Freshteh


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.

I suggest you use the GDXMRW utility to move data between Matlab and
GAMS. To get started, do this:

  1. Make sure you run on an architecture that supports GDXMRW: Win32,
    Win64, Linux64, MacOS 64-bit.
  2. Get the latest GAMS distribution: currently 23.6.5.
  3. Make sure your GAMS and Matlab systems can talk to each other:
    execute the steps described in the installation and testing procedure
    of the GDXMRW documentation
    http://www.gams.com/dd/docs/tools/gdxmrw.pdf
    2a. If you get stuck, look at the amplified instructions at
    http://www.gams.com/~steve/gdxmrw.html (search for “amplified”).

In your application, use rgdx/wgdx to move the data, and call gams as
you are now.

-Steve

On Wed, Jun 22, 2011 at 11:48 AM, akram avami wrote:

Dear all,
I want to run gams from Matlab.
I managed to run it. But I need to change a few parameters for each run from
Matlab.
Can anybody help me?
Regards

Freshteh


“gamsworld” group.
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.




– Steven Dirkse, Ph.D. GAMS Development Corp., Washington DC Voice: (202)342-0180 Fax: (202)342-0181 sdirkse@gams.com http://www.gams.com

This is facilitated by the Matlab/GAMS link that is now distributed as part of the GAMS system.
Information on how to use can be found at: http://www.cs.wisc.edu/math-prog/matlab.html

On Jun 22, 2011, at 10:48 AM, akram avami wrote:

Dear all,
I want to run gams from Matlab.
I managed to run it. But I need to change a few parameters for each run from Matlab.
Can anybody help me?
Regards

Freshteh


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.

\

Thank you for your links.
First of all, I have access only to one variable as output.
In the following:
$set matout1 "‘mytest.gdx’, x ";
If I add more variables, it did not show me.
Secondly, when I want to change a variable in Gams program, I can not change it through Matlab commands. Here is the command:
m = struct(‘name’,‘m’,‘val’,‘-30’);
gamso.output = ‘Std’;
= gams(‘mytest’,m);

Is it possible to fix the value of a variable through Matlab command?

Thank you in advance.
Regards
Freshteh

On Wed, Jun 22, 2011 at 11:11 PM, Michael Ferris wrote:

This is facilitated by the Matlab/GAMS link that is now distributed as part of the GAMS system.
Information on how to use can be found at: http://www.cs.wisc.edu/math-prog/matlab.html

On Jun 22, 2011, at 10:48 AM, akram avami wrote:

Dear all,
I want to run gams from Matlab.
I managed to run it. But I need to change a few parameters for each run from Matlab.
Can anybody help me?
Regards

Freshteh


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.


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.

\

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.