unable to find the reason for domain violation Error

48 views
Skip to first unread message

pandade...@gmail.com

unread,
Oct 8, 2015, 8:25:12 AM10/8/15
to gamsworld
Dear all,

Need your help!
I am unable to find the reason for following error. 


sets
   T    'trading interval in hours'   /t1*t24/
   S    'number of contracts'         /s1*s5/
;

$onecho > price.txt
i=%system.fp%price.xlsx
r=a1:x5
o=dat.inc
$offecho
$call =xls2gms @price.txt

table conts(S,T)  'contract prices'
$include dat.inc
;
display conts;
  

Its showing Error 170 domain violation for each element in the 5*24 matrix. 
 
 
--
Thanks

Renger van Nieuwkoop

unread,
Oct 8, 2015, 9:11:15 AM10/8/15
to gams...@googlegroups.com

Hi

It looks like you lie the dimension of conts is not consistent with the excel table.

Conts is defined over (S,T) and I assume that you have in your excel table T as rows, and S as columns (because this is how you defined the range).

Cheers

Renger

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

pandade...@gmail.com

unread,
Oct 9, 2015, 2:15:01 AM10/9/15
to gamsworld
Hello,

Thanks for your prompt reply. 

As I understand, in gams declaring r = a1:x5, have 5 rows and 24 columns. My excel sheet contains the same size matrix. 
In sets declaration T is the column numbering with 24 entries and S is the row numbering with 5 entries.
Calling conts(S,T),  should show error free matrix. I have also tried calling with changed rows and column. Its showing the same error. 

Then where from the error is coming ?

Please correct me if I am wrong.  

Thanks
Debasmita

Renger van Nieuwkoop

unread,
Oct 9, 2015, 2:36:21 AM10/9/15
to gams...@googlegroups.com

Hi Desbasmita

You are correct, Just send the excel file.

Debasmita Panda

unread,
Oct 9, 2015, 2:51:21 AM10/9/15
to gams...@googlegroups.com
Please find the attached .xlsx file here. 



​Thanks​

--
Debasmita


--
You received this message because you are subscribed to a topic in the Google Groups "gamsworld" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gamsworld/vmfaIDJk9-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gamsworld+...@googlegroups.com.
price.xlsx

Renger van Nieuwkoop

unread,
Oct 9, 2015, 3:22:07 AM10/9/15
to gams...@googlegroups.com
Hi
You only have the numbers in the excel sheet but no set elements: first column should contain the elements of s and the first row should contain thr


Sent from my Samsung Note 4

Renger van Nieuwkoop

unread,
Oct 9, 2015, 3:25:34 AM10/9/15
to gams...@googlegroups.com

Hi

The elements of the sets are missing in your excel sheet. Your sheet should look like this:

     T1       T2  …

S1   6.7      1.3

S2   2.3      …

 

The range would then be a1:y6

 

Cheers

Renger

Debasmita Panda

unread,
Oct 9, 2015, 3:28:25 AM10/9/15
to gamsworld
Hello Renger,

Thank you so much. It's working fine now.




--
Regards,
Debasmita Panda


​​

Reply all
Reply to author
Forward
0 new messages