GAMS/GDXMRX -- Sparse Matrix

Dear All

I have some problem with the GDXMRX interface between GAMS and MATLAB environment.

The problem occurs when the variable generated in GAMS is a sparse matrix (viz. the matrix contains some zero column). The GDXMRX transfers this variable in the most compact form, and thus its dimension/set is reduced (i.e. the zero column is completely removed as when this variable is transferred to the MATLAB environment).

This problem is well handled by the previous MATLAB and GAMS interface developed by Professor Ferris where the actual dimension of GAMS variable is pre-defined (prior to sent to the MATLAB). However, such interface software was ceased for further updates in the recent GAMS versions.

I searched in the GAM manual, and found GDX interface with MS excel handles this problem by deactivating the SQUEEZE option. However, this option does not seem to be valid with GDXMRX.

Any suggestion as how to solve this problem is much appreciated.

Kind regards,

Sawekchai


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.

Sawekchai,

Have a look at the invert2 example from the GAMS datalib. It reads a matrix from a GDX file without any zero rows or columns being removed, using the latest release.

-Steve

On Mon, Aug 24, 2015 at 10:06 PM, Sawekchai Tangaramvong wrote:

Dear All

I have some problem with the GDXMRX interface between GAMS and MATLAB environment.

The problem occurs when the variable generated in GAMS is a sparse matrix (viz. the matrix contains some zero column). The GDXMRX transfers this variable in the most compact form, and thus its dimension/set is reduced (i.e. the zero column is completely removed as when this variable is transferred to the MATLAB environment).

This problem is well handled by the previous MATLAB and GAMS interface developed by Professor Ferris where the actual dimension of GAMS variable is pre-defined (prior to sent to the MATLAB). However, such interface software was ceased for further updates in the recent GAMS versions.

I searched in the GAM manual, and found GDX interface with MS excel handles this problem by deactivating the SQUEEZE option. However, this option does not seem to be valid with GDXMRX.

Any suggestion as how to solve this problem is much appreciated.

Kind regards,

Sawekchai


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

Dear Steve

Sorry for my late reply. Thank you very much for your help.

It does answer my query.

Regards,

Sawekchai

On Wednesday, August 26, 2015 at 4:14:32 AM UTC+10, Steven Dirkse wrote:

Sawekchai,

Have a look at the invert2 example from the GAMS datalib. It reads a matrix from a GDX file without any zero rows or columns being removed, using the latest release.

-Steve

On Mon, Aug 24, 2015 at 10:06 PM, Sawekchai Tangaramvong wrote:

Dear All

I have some problem with the GDXMRX interface between GAMS and MATLAB environment.

The problem occurs when the variable generated in GAMS is a sparse matrix (viz. the matrix contains some zero column). The GDXMRX transfers this variable in the most compact form, and thus its dimension/set is reduced (i.e. the zero column is completely removed as when this variable is transferred to the MATLAB environment).

This problem is well handled by the previous MATLAB and GAMS interface developed by Professor Ferris where the actual dimension of GAMS variable is pre-defined (prior to sent to the MATLAB). However, such interface software was ceased for further updates in the recent GAMS versions.

I searched in the GAM manual, and found GDX interface with MS excel handles this problem by deactivating the SQUEEZE option. However, this option does not seem to be valid with GDXMRX.

Any suggestion as how to solve this problem is much appreciated.

Kind regards,

Sawekchai


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.