Dear all:

I am a student in Power System and I am a new user of GAMS. I have a modeling problem in GAMS.

Suppose I have the following set, subset and table:

Set bus system buses / 1*9 /,
branch_index all the branch /1*9/,

Alias (i, bus), (k, bus);

Set branch_c /fbb from bus

tbb to bus

cktt ckt/;

Set ckt /1/;

Table br_data(branch_index, branch_c)

fbb tbb cktt

1 1 4 1

2 4 5 1

3 5 6 1

4 3 6 1

5 6 7 1

6 7 8 1

7 8 2 1

8 8 9 1

9 9 4 1

How can I get the Set branch(i,k,ckt) by coding but not by manually typing? The set is actually a subset of

Set (i,k,ckt) as shown in the following. It is the combination of corresponding (fbb,tbb,cktt). fbb is the from bus, and tbb

is the to bus. All the elements in fbb and tbb would be the element in Set bus.

Set branch(i,k,ckt) /1.4.1, 4.5.1, 5.6.1, 3.6.1, 6.7.1, 7.8.1,8.2.1, 8.9.1, 9.4 1/;

For this small power system, I can get the subset by just typing. However, when the large power system is studied, there are thousands of branch. It would be very time consuming to type each element in Set branch(i,k,ckt).

Thank you for your time!

regards,

Xiaohu Zhang

–

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/groups/opt_out.