From: Matthias Wachs Date: Tue, 5 Apr 2011 09:32:13 +0000 (+0000) Subject: changes X-Git-Tag: initial-import-from-subversion-38251~18796 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf7e8f12dbfbbdf2262f7b9d666604e17023847a;p=oweals%2Fgnunet.git changes --- diff --git a/src/transport/ats_benchmark.sh b/src/transport/ats_benchmark.sh index c91a7a86c..17c5ee712 100755 --- a/src/transport/ats_benchmark.sh +++ b/src/transport/ats_benchmark.sh @@ -1,6 +1,6 @@ #/bin/bash start=1 -end=10 +end=200 if [ ! $1 = "" ]; then start=$1 diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 73a8afde6..1128c7d94 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -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 */