|
From: | Marcos Roberto Silva |
Subject: | [Help-glpk] New statements (solve; printf, if, for, etc.) |
Date: | Thu, 05 Aug 2004 11:14:11 -0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.6) Gecko/20040413 Debian/1.6-5 |
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |