[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33305 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33305 - gnunet/src/ats |
Date: |
Fri, 16 May 2014 09:40:49 +0200 |
Author: wachs
Date: 2014-05-16 09:40:49 +0200 (Fri, 16 May 2014)
New Revision: 33305
Modified:
gnunet/src/ats/gnunet-service-ats_normalization.c
gnunet/src/ats/perf_ats_solver.c
gnunet/src/ats/perf_ats_solver.conf
Log:
fixing division by zero in normalization
Modified: gnunet/src/ats/gnunet-service-ats_normalization.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_normalization.c 2014-05-15 20:22:23 UTC
(rev 33304)
+++ gnunet/src/ats/gnunet-service-ats_normalization.c 2014-05-16 07:40:49 UTC
(rev 33305)
@@ -733,7 +733,10 @@
avg_value = address->atsin[p->prop_type].avg;
delta = p->max - p->min;
/* max - 2 * min + avg_value / max - min */
- address->atsin[p->prop_type].norm = (delta + (avg_value - p->min)) / (delta);
+ if (0 != delta)
+ address->atsin[p->prop_type].norm = (delta + (avg_value - p->min)) /
(delta);
+ else
+ address->atsin[p->prop_type].norm = DEFAULT_REL_QUALITY;
if (backup == address->atsin[p->prop_type].norm)
return GNUNET_OK;
Modified: gnunet/src/ats/perf_ats_solver.c
===================================================================
--- gnunet/src/ats/perf_ats_solver.c 2014-05-15 20:22:23 UTC (rev 33304)
+++ gnunet/src/ats/perf_ats_solver.c 2014-05-16 07:40:49 UTC (rev 33305)
@@ -970,7 +970,7 @@
}
else
{
- GNUNET_asprintf (&data_str, "%s;", data_tmp);
+ GNUNET_asprintf (&data_upd_str, "%s;", data_upd_tmp);
}
GNUNET_free (data_upd_tmp);
@@ -1010,7 +1010,7 @@
GNUNET_asprintf (&data_upd_str, "%s\n", data_upd_tmp);
GNUNET_free (data_upd_tmp);
- fprintf (stderr, "Result updated solution: %s\n", data_upd_str);
+ fprintf (stderr, "Result updated solution: `%s'\n", data_upd_str);
if (GNUNET_SYSERR == GNUNET_DISK_file_write (f_update, data_upd_str,
strlen(data_upd_str)))
GNUNET_break (0);
GNUNET_free (data_upd_str);
Modified: gnunet/src/ats/perf_ats_solver.conf
===================================================================
--- gnunet/src/ats/perf_ats_solver.conf 2014-05-15 20:22:23 UTC (rev 33304)
+++ gnunet/src/ats/perf_ats_solver.conf 2014-05-16 07:40:49 UTC (rev 33305)
@@ -3,20 +3,20 @@
UNSPECIFIED_QUOTA_IN = 1000000
UNSPECIFIED_QUOTA_OUT = 1000000
# LOOPBACK
-LOOPBACK_QUOTA_IN = 1000000
-LOOPBACK_QUOTA_OUT = 1000000
+LOOPBACK_QUOTA_IN = 10000000
+LOOPBACK_QUOTA_OUT = 10000000
# LAN
-LAN_QUOTA_IN = 1000000
-LAN_QUOTA_OUT = 1000000
+LAN_QUOTA_IN = 10000000
+LAN_QUOTA_OUT = 10000000
# WAN
-WAN_QUOTA_IN = 1000000
-WAN_QUOTA_OUT = 1000000
+WAN_QUOTA_IN = 10000000
+WAN_QUOTA_OUT = 10000000
# WLAN
-WLAN_QUOTA_IN = 1000000
-WLAN_QUOTA_OUT = 1000000
+WLAN_QUOTA_IN = 10000000
+WLAN_QUOTA_OUT = 10000000
# BLUETOOTH
-BLUETOOTH_QUOTA_IN = 1000000
-BLUETOOTH_QUOTA_OUT = 1000000
+BLUETOOTH_QUOTA_IN = 10000000
+BLUETOOTH_QUOTA_OUT = 10000000
# Proportional specific settings
# How proportional to preferences is bandwidth distribution in a network
@@ -31,7 +31,7 @@
# MLP defaults
# Maximum duration for a solution process
-# MLP_MAX_DURATION = 3 s
+# MLP_MAX_DURATION = 30 s
# Maximum number of iterations for a solution process
# MLP_MAX_ITERATIONS = 1024
@@ -49,7 +49,7 @@
MLP_DBG_AUTOSCALE_PROBLEM = YES
# MLP_DBG_INTOPT_PRESOLVE = YES
# Print GLPK output
-#MLP_DBG_GLPK_VERBOSE = YES
+MLP_DBG_GLPK_VERBOSE = YES
#MLP_DBG_OPTIMIZE_UTILITY = NO
#MLP_DBG_OPTIMIZE_QUALITY = NO
@@ -64,3 +64,14 @@
# Dump all solution to disk
# MLP_DUMP_SOLUTION_ALL = YES
+# RIL specifc settings
+RIL_STEP_TIME_MIN = 1 ms
+RIL_STEP_TIME_MAX = 10 ms
+
+RIL_ALGORITHM = Q
+RIL_DISCOUNT_BETA = 0.7
+RIL_GRADIENT_STEP_SIZE = 0.3
+RIL_TRACE_DECAY = 0.2
+RIL_EXPLORE_RATIO = 0.1
+RIL_GLOBAL_REWARD_SHARE = 1
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33305 - gnunet/src/ats,
gnunet <=