Excel to GAMS; One parameter with >=2 set (set not the dimension)

Hi All,

I am having a number of parameters with different input sets. For example

C(i,j)
C(t,v)
C(i,m)

while using GDX @…txt, You cannot import all parameters (with the same name, different input sources) and you have to re-define your parameters’ name as the following


Cij(i,j)
Cv(t,v)
Cim(i,m)

My question: Is there a way to import all parameters without changing the parameter’s name?


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.

Hi Arash
Yes there is a simple way to merge these parameters.
First you should define tow parent set and then your own sets as a subset of parent sets. and finally define your parameter over the parent sets:

Sets it /i1,i2,i3,i4,t1,t2,t3/
jvm /j1,j2,v1,v2,v3,m1,m2/
i(it) /i1,i2,i3,i4/
t(it) /t1,t2,t3/
j(jvm) /j1,j2/
v(jvm) /v1,v2,v3/
m(jvm) /m1,m/;

Parameter C(it,jvm)

On Thu, Feb 5, 2015 at 8:47 PM, Arash Beheshtian wrote:

Hi All,

I am having a number of parameters with different input sets. For example

C(i,j)
C(t,v)
C(i,m)

while using GDX @…txt, You cannot import all parameters (with the same name, different input sources) and you have to re-define your parameters’ name as the following


Cij(i,j)
Cv(t,v)
Cim(i,m)

My question: Is there a way to import all parameters without changing the parameter’s name?


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.

\

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.

Ali Reza,


I am not trying to merge the parameters [if there is a technical phrase as such].

That would be the case if you only have two sets and the rest are sub-sets of the parent sets.
More, you point is also not applicable for parent/successor case. For example, you have a single matrix [1 matrix is allowed in GDX for every single parameter] and you entered all the values corresponding to sets ‘it’ and ‘jvm’.
How do you show C(i,t) _?

Your solution could be valid when you have the following STRONG assumptions:

1- There are two parent sets and the rest are sub-sets.
2- There is no interconnections across sub-sets of each parent set.


Arash

\

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._

Hi Arash
Every where you need C(i,j) just type C(i,j)! it works.

On Sat, Feb 7, 2015 at 12:45 AM, Arash Beheshtian wrote:

Ali Reza,


I am not trying to merge the parameters [if there is a technical phrase as such].

That would be the case if you only have two sets and the rest are sub-sets of the parent sets.
More, you point is also not applicable for parent/successor case. For example, you have a single matrix [1 matrix is allowed in GDX for every single parameter] and you entered all the values corresponding to sets ‘it’ and ‘jvm’.
How do you show C(i,t) _?

Your solution could be valid when you have the following STRONG assumptions:

1- There are two parent sets and the rest are sub-sets.
2- There is no interconnections across sub-sets of each parent set.


Arash

\

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.\

\

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 Pak Ali Reza,

Mohon bantuannya… saya mengolah data input output, bagaimana menggunakan data excel di gams…

Benny

On Friday, February 6, 2015 at 5:07:59 AM UTC-8, Ali Reza Bahari wrote:


Hi Arash
Yes there is a simple way to merge these parameters.
First you should define tow parent set and then your own sets as a subset of parent sets. and finally define your parameter over the parent sets:

Sets it /i1,i2,i3,i4,t1,t2,t3/
jvm /j1,j2,v1,v2,v3,m1,m2/
i(it) /i1,i2,i3,i4/
t(it) /t1,t2,t3/
j(jvm) /j1,j2/
v(jvm) /v1,v2,v3/
m(jvm) /m1,m/;

Parameter C(it,jvm)

On Thu, Feb 5, 2015 at 8:47 PM, Arash Beheshtian wrote:

Hi All,

I am having a number of parameters with different input sets. For example

C(i,j)
C(t,v)
C(i,m)

while using GDX @…txt, You cannot import all parameters (with the same name, different input sources) and you have to re-define your parameters’ name as the following


Cij(i,j)
Cv(t,v)
Cim(i,m)

My question: Is there a way to import all parameters without changing the parameter’s name?


Thanks


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.

\

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.