Dear experts,
I want to create a series of scenarios with loop statement, code is shown as follows, but it doesn’t work. For each iteration, the status of connection is changed to 0 and the corresponding connection is taken off. In the next iteration, the last connection/status is resumed and a new connection is taken off. The problem has baffled me for a while, thank you if you could offer some advice.
Best regards,
Linstro
set i node /15/ ;
alias (i,j),(i,k),(i,t) ;
Table statu(i,j,)
status
1.2 1
1.3 1
2.3 1
2.4 1
3.5 1 ;
set connection(i,j) /
1.2
1.3
2.3
2.4
3.5/;
parameter status(i,j);
status(i,j)=statu(i,j,“status”);
set newconnec(i,j);
loop((k,t)connection(k,t), status(k,t)=0; newconnec(i,j)(connection(i,j) and status(i,j) gt 0)=yes;
option newconnec:3:0:2;
display newconnec;
*resume the connection status
status(k,t)=1;
);
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\