I didn't try yet 4.6 but I am pretty sure that
print("...\n");
print{i in I, j in J, k in L: x[i,j,k]} ("%d to %d via %d", i, j, k);
is closer to your wish.
On Thu, 5 Aug 2004, Marcos Roberto Silva wrote:
Hello list,
I am learning and testing the new statements of the 4.6 version, and
in my test I was not able to print i , j and k _only_ if x[i,j,k] =1.
The code used was:
printf("\nFlow Assignment: ");
for {i in I}
{
for {j in J}
{
for {k in K} printf "\nThe flow from %d to %d is via
hub %d.", if x[i,j,k] then i,j,k;
}
}
With this code, the output print all the cases.
What's wrong?
Thanks.
Regards,
Marcos Roberto Silva
--------------------------------------------------------------------------
1024D/BEF5DD36 Richard Prescott <address@hidden>
Key fingerprint = E11B E939 8A1D 2FA8 A672 555F ABA8 DE5A BEF5 DD36