Hello,
I want to create a multidimensional table, but get the error 142: No suffix allowed here. What can i do to solve this? I need the multidimensional table later in the programming.
SET
i /woman_u, woman_m/;
t /19431945/
a /2326/;
Table da(a.woman_u,t)
1943 1944 1945
23.woman_u 4 6 7
24.woman_u 5 2 3
25.woman_u 7 1 6
26.woman_u 1 3 4
Table da(a.woman_m,t)
1943 1944 1945
23.woman_u 2 4 1
24.woman_u 5 4 9
25.woman_u 2 3 1
26.woman_u 1 7 4
Thanks!
Hi Ragnhild
The correct syntax for a multi-dimensional table is with commas between the set names.
Your table can be written as follows (no need for separation of both women classes).
SET
i /woman_u, woman_m/,
t /1943*1945/
a /23*26/;
Table da(a,i,t)
1943 1944 1945
23.woman_u 4 6 7
24.woman_u 5 2 3
25.woman_u 7 1 6
26.woman_u 1 3 4
23.woman_u 2 4 1
24.woman_u 5 4 9
25.woman_u 2 3 1
26.woman_u 1 7 4
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Ragnhild
Sent: Friday, May 30, 2014 7:10 PM
To: gamsworld@googlegroups.com
Subject: Multidimensional table
Hello,
I want to create a multidimensional table, but get the error 142: No suffix allowed here. What can i do to solve this? I need the multidimensional table later in the programming.
SET
i /woman_u, woman_m/;
t /1943*1945/
a /23*26/;
Table da(a.woman_u,t)
1943 1944 1945
23.woman_u 4 6 7
24.woman_u 5 2 3
25.woman_u 7 1 6
26.woman_u 1 3 4
Table da(a.woman_m,t)
1943 1944 1945
23.woman_u 2 4 1
24.woman_u 5 4 9
25.woman_u 2 3 1
26.woman_u 1 7 4
Thanks!
\
–
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.
Dear Geev,
Attached please find a small example where I import such a table from excel.
Cheers,
Pedro
On Mon, Jun 2, 2014 at 2:55 PM, Geev Mokryani wrote:
Dear All,
I want to create a four-dimensional table in which I have three phases /a,b,c/ and 13 buses /1*13/ as follows:
1.a 1.b 1.c 2.a 2.b 2.c …13.a 13.b 13.c
1.a
1.b
1.c
2.a
2.b
2.c
.
.
.
13.a
13.b
13.c
Does anybody know how can I implement it?
Best Regards,
Geev
–
4D_parameter.gms (298 Bytes)
4D_parameter.xlsx (12.4 KB)
Dear Pedro,
Thank you so much.
Best Regards,
Geev
On Mon, Jun 2, 2014 at 7:30 PM, Pedro Javier RamÃrez Torrealba wrote:
Dear Geev,
Attached please find a small example where I import such a table from excel.
Cheers,
Pedro
On Mon, Jun 2, 2014 at 2:55 PM, Geev Mokryani wrote:
Dear All,
I want to create a four-dimensional table in which I have three phases /a,b,c/ and 13 buses /1*13/ as follows:
1.a 1.b 1.c 2.a 2.b 2.c …13.a 13.b 13.c
1.a
1.b
1.c
2.a
2.b
2.c
.
.
.
13.a
13.b
13.c
Does anybody know how can I implement it?
Best Regards,
Geev
PEDRO JAVIER RAMÃREZ TORREALBA
Ingeniero Civil Eléctrico PUC
MSc en IngenierÃa Eléctrica PUC
Londres, REINO UNIDO
Celular: +44-(0)75-8069-3119
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.