@renger: thanks a lot budddyyy, I was stuck in this problem for more than two days, thanksss again…!!
On Monday, 14 January 2013 14:36:36 UTC+5:30, Renger van Nieuwkoop wrote:
Hi Shyam
How can the gdx utility know which value belongs to which set element? You only give the values.
If you change your excel sheet with in the A-Column the set elements and in the B-Column the values and adjust the code as below, your program runs fine.
Rdim tells gdx that the set t is found in the first column (you could also transpose the data in your excel file and then write Cdim=1, meaning that the index t is found in the first row).
Cheers
Renger
set
t period /T1*T29/
alias(t,tt);
Sets
i nameinput / name for input /
Parameter p_wind(t);
$call gdxxrw.exe ploadwind.xls par=p_wind rng=sheet1!a2:b29 rdim=1
*=== Now import data from GDX
$GDXIN ploadwind.gdx
$LOAD p_wind
$GDXIN
display p_wind;
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Shyam
Sent: Sonntag, 13. Januar 2013 15:46
To: gams...@googlegroups.com
Subject: Error while transporting data
I am getting this error while transferring a data from excel to GAMS,
My GAMS code is,
set
t period /T1*T29/
alias(t,tt);
Sets
i nameinput / name for input /
$call gdxxrw.exe ploadwind.xls par=p_wind rng=sheet1!a1:a29
*=== Now import data from GDX
Parameter p_wind(t);
$GDXIN ploadwind.gdx
$LOAD p_wind
$GDXIN
the error log is,
— Job Untitled_1.gms Start 01/13/13 20:11:38 WIN-VS8 24.0.1 x86/MS Windows
GAMS Rev 240 Copyright (C) 1987-2012 GAMS Development. All rights reserved
Licensee: GAMS Development Corporation, Washington, DC G871201/0000CA-ANY
Free Demo, 202-342-0180, sa...@gams.com, www.gams.com DC0000
— Starting compilation
— Untitled_1.gms(16) 3 Mb
— call gdxxrw.exe ploadwind.xls par=p_wind rng=sheet1!a1:a29
GDXXRW Dec 18, 2012 24.0.1 WIN 37366.37409 VS8 x86/MS Windows
Input file : D:\DDP\Optimization softwares and Results\GAMS\xls to gms\ploadwind.xls
Output file: D:\DDP\Optimization softwares and Results\GAMS\xls to gms\ploadwind.gdx
Total time = 764 Ms
— Untitled_1.gms(19) 3 Mb
— GDXin=D:\DDP\Optimization softwares and Results\GAMS\xls to gms\ploadwind.gdx
— Untitled_1.gms(20) 3 Mb 1 Error
*** Error 495 in D:\DDP\Optimization softwares and Results\GAMS\xls to gms\Untitled_1.gms
Load dimension are different
— Untitled_1.gms(21) 3 Mb 1 Error
*** Status: Compilation error(s)
I am attaching the excel file used in the operation.
Thanks in advance…!!!
\
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/pkZ1BVV5PiUJ.
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.
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/BvfP9sxnEBEJ.
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.