chiark / gitweb /
WIP route value calculation - compiles, although doesn't run the LP
[ypp-sc-tools.main.git] / yarrg / rsmain.c
index 85f271be0d8324f9a19ec284b2316d4732d3d0dd..ed176354e902ed8a402be49eed313240abb00bc9 100644 (file)
@@ -3,12 +3,22 @@
 #include "rscommon.h"
 
 int o_quiet= 0;
+double max_mass=-1, max_volu=-1, max_capi=-1;
+double distance_loss_factor_per_league;
 
 int main(int argc, const char **argv) {
   int ia[argc], ni=0;
 
   debug_flags= ~0UL;
   setup();
+
+  max_mass= atof(*++argv);
+  max_volu= atof(*++argv);
+  max_capi= atof(*++argv);
+  double loss_per_league= atof(*++argv);
+
+  if (!loss_per_league) loss_per_league= 1e-7;
+  distance_loss_factor_per_league= 1.0 - loss_per_league;
   
   const char *arg;
   while ((arg= *++argv)) {