changes
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 5 Apr 2011 09:32:13 +0000 (09:32 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 5 Apr 2011 09:32:13 +0000 (09:32 +0000)
src/transport/ats_benchmark.sh
src/transport/gnunet-service-transport.c

index c91a7a86ceedc1c84ecbc2981297ea5e6af81a75..17c5ee7124e6cc765d8e81f4a01bfb1eecb2b530 100755 (executable)
@@ -1,6 +1,6 @@
 #/bin/bash
 start=1
-end=10
+end=200
 
 if [ ! $1 = "" ]; then
   start=$1
index 73a8afde629d361acdc6d4a606ef352a0eb7314a..1128c7d9448eac21bd98b94d72b0f190d75978d1 100644 (file)
@@ -940,12 +940,14 @@ static struct GNUNET_STATISTICS_Handle *stats;
  */
 static struct ATS_info *ats;
 
+#if HAVE_LIBGLPK
 static struct ATS_quality_metric qm[] =
 {
                {1, 1028, "QUALITY_NET_DISTANCE"},
                {2, 1034, "QUALITY_NET_DELAY"},
 };
 static int available_quality_metrics = 2;
+#endif
 
 /**
  * The peer specified by the given neighbour has timed-out or a plugin
@@ -6140,8 +6142,20 @@ static int ats_solve_problem (int max_it, int max_dur , double D, double U, doub
        result = glp_intopt (prob, &opt_mlp);
        solution =  glp_mip_status (prob);
 
+#if WRITE_MLP
+       if (c_peers > 1)
+       {
+               char * filename;
+
+               GNUNET_asprintf (&filename, "ats_mlp_p%i_m%i.mlp",c_peers, c_mechs);
+               if (GNUNET_NO == GNUNET_DISK_file_test(filename))
+                       glp_write_lp (prob, NULL, filename);
+               GNUNET_free (filename);
+       }
+#endif
 #if VERBOSE_ATS
-       if (VERBOSE_ATS) glp_write_lp(prob, NULL, "ats_mlp.lp");
+
+
 
        switch (result) {
        case GLP_ESTOP  :    /* search terminated by application */