GDXXRW problem

625 views
Skip to first unread message

Fabián Mancilla

unread,
Feb 28, 2011, 2:46:45 PM2/28/11
to gams...@googlegroups.com
Hello everybody! I am having trouble with GDXXRW.

I have a data matrix in .xlsx whit 6820 rows and 2728 columns of the form:

          j1       j2       j3 

i1       9         0       0

i2       3         1       4
 
i3       5         0       7....

So, I used GDXXRW to import the data from the .xlsx file. I wrote the folowing code:

*************************************************
Sets
i matrix rows /i1*i6820/
j matrix columns /j1*j2728/;

$call GDXXRW matrix.xlsx par=A rng=A!A1 Cdim=1 Rdim=1

Parameters
A(i,j) matrix A;

$gdxin matrix.gdx
$load A
$gdxin
*************************************************
But when I run this, error comes saying: "exception not caught: not enough storage available to complete this operation"
(I don't think that memory is the problem. I'm using a computer AMD Phenom 9750 Quad-Core 2.40 GHz whit 7,50 of RAM)

Could you please help me with this?

Thank you in advance.

Fabian.


Mat

unread,
Mar 1, 2011, 10:36:45 AM3/1/11
to gamsworld
You could try an .xls file instead of an .xlsx file first and then i
would try to give a precise range on the data (like rng=A!A1:D5
instead of rng=A!A1 ), or if you don't have a precise range just add
'SE=0' to your command line. That would make gams stop getting the
data as soon as there is an empty cell.

Fabián Mancilla

unread,
Mar 8, 2011, 10:33:22 AM3/8/11
to gams...@googlegroups.com
Thanks for the help ,but the problem persists. Apparently it's a problem with Excel, because I get the same error when I use the XLSWRITE function in MATLAB.

Regards,

Fabián

2011/3/1 Mat <matthe...@googlemail.com>
--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


Paul Van der Eijk

unread,
Mar 4, 2013, 8:50:15 AM3/4/13
to gams...@googlegroups.com
Older versions of GDXXRW did not anticipate the amount of memory needed
to complete some of these read and write operations. Later versions do this.

You can try this with the current system, even without a license because the
data utilities do not require a GAMS license.

To convince myself, I did the following:

First file:


Sets
i matrix rows /i1*i6820/
j matrix columns /j1*j2728/;

parameter B(i,j);
B(i,j) = uniform(0,1);

execute_unload 'test.gdx', i, j, B;

execute 'gdxxrw test.gdx o=test.xlsx par=B rng=A1';

Second file:


Sets
i matrix rows /i1*i6820/
j matrix columns /j1*j2728/;

parameter B(i,j);

$call gdxxrw test.xlsx o=result.gdx par=B rng=A1

HTH, --Paul




On Sun, Mar 3, 2013 at 6:29 PM, Brian Moore <moo...@gmail.com> wrote:

Hi,
 
Did anyone ever find the root of this problem. I'm running into the same issue using GAMS 23.6 and gdxxrw to convert a 17Mb .xls to gdx. I've tried converting to .xlsx to reduce the size but that hasn't worked.
 
If I break the conversion into several steps it can do each individually, but it can't do the whole thing in one go.  
 
I'm running the model on a server box, so suspect that there is some user parameter that I'm running up against rather than a real limit.
 
Cheers,
Brian.
 

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
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.



--
Paul van der Eijk
GAMS Development Corporation
Tel  : (202) 342-0180  Fax  : (202) 342-0181
Email: pvand...@gams.com  
Web : http://www.gams.com
Reply all
Reply to author
Forward
0 new messages