GAMS Matlab Interface on MAC OSX

I am trying to call the GAMS solver from Matlab on my MAC OSX Machine.

The GAMS Solver works perfectly from Terminal after running the following command:

cd /Users/yousef/gamsdir/projdir ;export PATH=$PATH:/Applications/GAMS/gams24.4_osx_x64_64_sfx


However, when I try to call the same .gms file from Matlab I get the following in Matlab Console:


/bin/bash: gams: command not found


I have added the gamsproj directory and the GAMS Application directory to the Matlab path. Is there anything else I am missing?


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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Yousef,

Perhaps you need to set the PATH within your Matlab console. You can check if the GAMS sysdir is in the PATH with

% getenv(‘PATH’)

and if not, add it with

% setenv(‘PATH’,[ ‘/Applications/GAMS/gams24.4_osx_x64_64_sfx:’,getenv(‘PATH’) ] )

In my experience, the PATH setting in Matlab on the Mac is sensitive to how you start Matlab: by clicking an icon or by running

$ matlab &

from Terminal. Something to keep in mind.

-Steve

On Thu, Sep 10, 2015 at 12:46 PM, Yousef Rafique wrote:

I am trying to call the GAMS solver from Matlab on my MAC OSX Machine.

The GAMS Solver works perfectly from Terminal after running the following command:

cd /Users/yousef/gamsdir/projdir ;export PATH=$PATH:/Applications/GAMS/gams24.4_osx_x64_64_sfx


However, when I try to call the same .gms file from Matlab I get the following in Matlab Console:


/bin/bash: gams: command not found


I have added the gamsproj directory and the GAMS Application directory to the Matlab path. Is there anything else I am missing?


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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



\

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

Thank you very much Dr. Steven, That finally solved my problem. I appreciate it.

Yousef

On Friday, September 11, 2015 at 5:05:28 PM UTC+3, Steven Dirkse wrote:

Yousef,

Perhaps you need to set the PATH within your Matlab console. You can check if the GAMS sysdir is in the PATH with

% getenv(‘PATH’)

and if not, add it with

% setenv(‘PATH’,[ ‘/Applications/GAMS/gams24.4_osx_x64_64_sfx:’,getenv(‘PATH’) ] )

In my experience, the PATH setting in Matlab on the Mac is sensitive to how you start Matlab: by clicking an icon or by running

$ matlab &

from Terminal. Something to keep in mind.

-Steve

On Thu, Sep 10, 2015 at 12:46 PM, Yousef Rafique wrote:

I am trying to call the GAMS solver from Matlab on my MAC OSX Machine.

The GAMS Solver works perfectly from Terminal after running the following command:

cd /Users/yousef/gamsdir/projdir ;export PATH=$PATH:/Applications/GAMS/gams24.4_osx_x64_64_sfx


However, when I try to call the same .gms file from Matlab I get the following in Matlab Console:


/bin/bash: gams: command not found


I have added the gamsproj directory and the GAMS Application directory to the Matlab path. Is there anything else I am missing?


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



\

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


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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Thanks.

On Fri, Sep 11, 2015 at 3:05 PM, Steven Dirkse wrote:

Yousef,

Perhaps you need to set the PATH within your Matlab console. You can check if the GAMS sysdir is in the PATH with

% getenv(‘PATH’)

and if not, add it with

% setenv(‘PATH’,[ ‘/Applications/GAMS/gams24.4_osx_x64_64_sfx:’,getenv(‘PATH’) ] )

In my experience, the PATH setting in Matlab on the Mac is sensitive to how you start Matlab: by clicking an icon or by running

$ matlab &

from Terminal. Something to keep in mind.

-Steve

On Thu, Sep 10, 2015 at 12:46 PM, Yousef Rafique wrote:

I am trying to call the GAMS solver from Matlab on my MAC OSX Machine.

The GAMS Solver works perfectly from Terminal after running the following command:

cd /Users/yousef/gamsdir/projdir ;export PATH=$PATH:/Applications/GAMS/gams24.4_osx_x64_64_sfx


However, when I try to call the same .gms file from Matlab I get the following in Matlab Console:


/bin/bash: gams: command not found


I have added the gamsproj directory and the GAMS Application directory to the Matlab path. Is there anything else I am missing?


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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



\

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


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 http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

\