Hi Peiyu
You could try defining a dynamic set:
arclink(arc, initailnode, terminalnode)=yes; if arc links initialnode with terminalnode,
arclink(arc, initailnode, terminalnode)=no; if arc does not link initialnode with terminalnode,
and you can use this dynamic set in conditional expressions (e.g. dollar condition) if needed.
Or, preferably, if you have a data set with, say, column 1 is arc index, column 2 is initial node index and column 3 terminal node index, you would want to import this data as a set: arclinkset(arc, inode, tnode).
And you could define a useful Boolean parameter: arclinkpar(arc, inode, tnode)=1$(arclinkset(arc, inode, tnode)); This second way is better when you are dealing with large networks.
Good luck,
Huibin
On Fri, Nov 22, 2013 at 11:24 AM, Peiyu Luo wrote:
Anybody know how to define subgraph in GAMS? Suppose I have a network insisted with three different network and these three individual network share some nodes and arcs( parallel arcs, which means there are more than one arc link two nodes), anybody has suggestion? Thanks!!!
Huibin Chang
Department of Economics
State University of New York at Buffalo
Phone: (716)867 0292
–
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.