Hello,
I am writing a transmission system expansion code in GAMS.
I have the following data:
set N ‘NODES’ /1,2,3,4/;
set s(N) ‘GENERATION NODES’ /1,4/;
set r(N) ‘NON-GENERATION NODES’ /2,3/;
set K(N,N) ‘POSSIBLE TRANSSMISION CABLES’ /(1.2),(1.3),(1.4),(4.2),(4.3)/;
I use a binary variable Y(N,N) to choose which lines to be buildt or not.
My problem:
Is there a way i can variables and Equations to only consider the elements in K(N,N) ?
An axample:
In my objective function the binary variable Y(N,N) is multiplied With a cost.
Some times I get a cost for transmission lines that are not beeing buildt.
I have solved it, for now, like this:
Y.fx(‘1’,‘1’)=0;
Y.fx(‘2’,‘2’)=0;
Y.fx(‘3’,‘3’)=0;
Y.fx(‘4’,‘4’)=0;
Y.fx(‘2’,‘1’)=0;
Y.fx(‘2’,‘2’)=0;
Y.fx(‘2’,‘3’)=0;
Y.fx(‘2’,‘4’)=0;
Y.fx(‘3’,‘1’)=0;
Y.fx(‘3’,‘2’)=0;
Y.fx(‘3’,‘4’)=0;
Y.fx(‘4’,‘1’)=0;
Is there a more elegant way to solve this using the GAMS notation??
Thanx for Your help
–
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.