steelT.tab2#

Warning

The original AMPL book does not reflect many of the latest features available in AMPL. To programmatically interact with your models you should use APIs such as our popular Python API.

To explore examples showcasing these recent features, please visit:

steelT.tab2

printf "\nSALES";
printf {p in PROD}: "%14s   ", p;
printf "\n";

for {t in 1..T} {
   printf "week %d", t;

   for {p in PROD} {
      printf "%9d", Sell[p,t];
      if Sell[p,t] < market[p,t] then
         printf "%7.1f%%", 100 * Sell[p,t]/market[p,t];
      else printf "    --- ";
      }

   printf "\n";
   }

printf "\n";