chiark / gitweb /
routesearch: show route distances
[ypp-sc-tools.db-test.git] / yarrg / rsmain.c
index f99f866d2ee0e39316403e2cd682bc5e7ef98c3a..437a13d35d837f552b229f100374bc5fd9699075 100644 (file)
@@ -7,7 +7,7 @@
 int o_quiet= 0;
 double max_mass=-1, max_volu=-1, max_capi=-1;
 double distance_loss_factor_per_league;
-int max_dist= -1;
+int max_dist=-1, min_trade_maxprofit=0;
 
 FILE *debug_file;
 FILE *output;
@@ -49,8 +49,8 @@ int main(int argc, const char **argv) {
       debug_flags= 0;
     } else if (!strcmp(arg,"-D1")) {
       debug_flags= ~(dbg_sql2|dbg_lp|dbg_value2);
-    } else {
 #endif
+    } else {
       abort();
     }
   }
@@ -90,6 +90,8 @@ int main(int argc, const char **argv) {
   double loss_per_league= atof(*argv++);
   distance_loss_factor_per_league= 1.0 - loss_per_league;
 
+  min_trade_maxprofit= atoi(*argv++);
+
   setup_sql(database);
   setup_value();
   setup_search();
@@ -187,9 +189,10 @@ int main(int argc, const char **argv) {
          int midisle= ports[nports/2];
          int midarch= route2midarch(ports,nports);
          fprintf(output,
-                 " @%2d %c#%2d | start%3d mid%d:%3d f%d:%3d | %5d %5d %4d |",
+                 " @%2d %c#%2d | start%3d mid%d:%3d f%d:%3d"
+                 " | %3dlg | %5d %5d %4d |",
                  pos, "ap"[ap], nhighscores[granui][ap] - pos,
-                 ports[0], midarch,midisle, finarch,finisle,
+                 ports[0], midarch,midisle, finarch,finisle, pr->length,
                  (int)hs->value, (int)pr->value[A], (int)pr->value[P]);
          for (i=0; i<nports; i++) fprintf(output," %d",ports[i]);
          fprintf(output,"\n");