diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-06 23:00:22 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-06 23:00:22 +0000 |
commit | c0268d576ff44b5edc1e792ad2ef79f9c830b7d8 (patch) | |
tree | 930c862af67410f0c29e6e3f8ab983cc43acc48a /src/ats | |
parent | e04092fe792529e892a6ca2beb51a96235f0886a (diff) | |
download | gnunet-c0268d576ff44b5edc1e792ad2ef79f9c830b7d8.tar.gz gnunet-c0268d576ff44b5edc1e792ad2ef79f9c830b7d8.zip |
randomized network selection
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/libgnunet_plugin_ats_mlp.c | 2 | ||||
-rw-r--r-- | src/ats/perf_ats_solver.c | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/ats/libgnunet_plugin_ats_mlp.c b/src/ats/libgnunet_plugin_ats_mlp.c index 939e3aa83..0a4c84262 100644 --- a/src/ats/libgnunet_plugin_ats_mlp.c +++ b/src/ats/libgnunet_plugin_ats_mlp.c | |||
@@ -1154,7 +1154,7 @@ GAS_mlp_solve_problem (void *solver) | |||
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | dur_setup = GNUNET_TIME_absolute_get_duration (start); | 1156 | dur_setup = GNUNET_TIME_absolute_get_duration (start); |
1157 | 1157 | mlp->control_param_lp.presolve = GLP_YES; | |
1158 | /* Run LP solver */ | 1158 | /* Run LP solver */ |
1159 | 1159 | ||
1160 | notify(mlp, GAS_OP_SOLVE_LP_START, GAS_STAT_SUCCESS, | 1160 | notify(mlp, GAS_OP_SOLVE_LP_START, GAS_STAT_SUCCESS, |
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index 6bfce89c2..5f819623d 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -267,7 +267,7 @@ perf_update_address (struct ATS_Address *cur) | |||
267 | { | 267 | { |
268 | case 0: | 268 | case 0: |
269 | r_val = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100); | 269 | r_val = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100); |
270 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 270 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
271 | "Updating peer `%s' address %p type %s val %u\n", | 271 | "Updating peer `%s' address %p type %s val %u\n", |
272 | GNUNET_i2s (&cur->peer), cur, "GNUNET_ATS_QUALITY_NET_DELAY", r_val); | 272 | GNUNET_i2s (&cur->peer), cur, "GNUNET_ATS_QUALITY_NET_DELAY", r_val); |
273 | ph.env.sf.s_address_update_property (ph.solver, cur, | 273 | ph.env.sf.s_address_update_property (ph.solver, cur, |
@@ -277,7 +277,7 @@ perf_update_address (struct ATS_Address *cur) | |||
277 | case 1: | 277 | case 1: |
278 | r_val = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 10); | 278 | r_val = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 10); |
279 | 279 | ||
280 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 280 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
281 | "Updating peer `%s' address %p type %s val %u\n", | 281 | "Updating peer `%s' address %p type %s val %u\n", |
282 | GNUNET_i2s (&cur->peer), cur, "GNUNET_ATS_QUALITY_NET_DISTANCE", r_val); | 282 | GNUNET_i2s (&cur->peer), cur, "GNUNET_ATS_QUALITY_NET_DISTANCE", r_val); |
283 | ph.env.sf.s_address_update_property (ph.solver, cur, | 283 | ph.env.sf.s_address_update_property (ph.solver, cur, |
@@ -442,7 +442,7 @@ solver_info_cb (void *cls, | |||
442 | switch (op) | 442 | switch (op) |
443 | { | 443 | { |
444 | case GAS_OP_SOLVE_START: | 444 | case GAS_OP_SOLVE_START: |
445 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 445 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
446 | "Solver notifies `%s' with result `%s' `%s'\n", "GAS_OP_SOLVE_START", | 446 | "Solver notifies `%s' with result `%s' `%s'\n", "GAS_OP_SOLVE_START", |
447 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info); | 447 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info); |
448 | if (GNUNET_NO == ph.expecting_solution) | 448 | if (GNUNET_NO == ph.expecting_solution) |
@@ -473,7 +473,7 @@ solver_info_cb (void *cls, | |||
473 | } | 473 | } |
474 | return; | 474 | return; |
475 | case GAS_OP_SOLVE_STOP: | 475 | case GAS_OP_SOLVE_STOP: |
476 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 476 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
477 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_STOP", | 477 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_STOP", |
478 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info); | 478 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL", add_info); |
479 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 479 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -493,7 +493,7 @@ solver_info_cb (void *cls, | |||
493 | return; | 493 | return; |
494 | 494 | ||
495 | case GAS_OP_SOLVE_SETUP_START: | 495 | case GAS_OP_SOLVE_SETUP_START: |
496 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 496 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
497 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_SETUP_START", | 497 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_SETUP_START", |
498 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 498 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
499 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 499 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -505,7 +505,7 @@ solver_info_cb (void *cls, | |||
505 | return; | 505 | return; |
506 | 506 | ||
507 | case GAS_OP_SOLVE_SETUP_STOP: | 507 | case GAS_OP_SOLVE_SETUP_STOP: |
508 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 508 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
509 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_SETUP_STOP", | 509 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_SETUP_STOP", |
510 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 510 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
511 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 511 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -519,7 +519,7 @@ solver_info_cb (void *cls, | |||
519 | return; | 519 | return; |
520 | 520 | ||
521 | case GAS_OP_SOLVE_LP_START: | 521 | case GAS_OP_SOLVE_LP_START: |
522 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 522 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
523 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_LP_START", | 523 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_LP_START", |
524 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 524 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
525 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 525 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -530,7 +530,7 @@ solver_info_cb (void *cls, | |||
530 | ph.current_result->s_lp = GNUNET_TIME_absolute_get (); | 530 | ph.current_result->s_lp = GNUNET_TIME_absolute_get (); |
531 | return; | 531 | return; |
532 | case GAS_OP_SOLVE_LP_STOP: | 532 | case GAS_OP_SOLVE_LP_STOP: |
533 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 533 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
534 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_LP_STOP", | 534 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_LP_STOP", |
535 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 535 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
536 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 536 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -544,7 +544,7 @@ solver_info_cb (void *cls, | |||
544 | return; | 544 | return; |
545 | 545 | ||
546 | case GAS_OP_SOLVE_MLP_START: | 546 | case GAS_OP_SOLVE_MLP_START: |
547 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 547 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
548 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_MLP_START", | 548 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_MLP_START", |
549 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 549 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
550 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 550 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -555,7 +555,7 @@ solver_info_cb (void *cls, | |||
555 | ph.current_result->s_mlp = GNUNET_TIME_absolute_get (); | 555 | ph.current_result->s_mlp = GNUNET_TIME_absolute_get (); |
556 | return; | 556 | return; |
557 | case GAS_OP_SOLVE_MLP_STOP: | 557 | case GAS_OP_SOLVE_MLP_STOP: |
558 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 558 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
559 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_MLP_STOP", | 559 | "Solver notifies `%s' with result `%s'\n", "GAS_OP_SOLVE_MLP_STOP", |
560 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); | 560 | (GAS_STAT_SUCCESS == stat) ? "SUCCESS" : "FAIL"); |
561 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) | 561 | if ((GNUNET_NO == ph.expecting_solution) || (NULL == ph.current_result)) |
@@ -830,7 +830,7 @@ perf_run () | |||
830 | { | 830 | { |
831 | cur_addr = perf_create_address (cp, ca); | 831 | cur_addr = perf_create_address (cp, ca); |
832 | /* Add address */ | 832 | /* Add address */ |
833 | ph.env.sf.s_add (ph.solver, cur_addr, GNUNET_ATS_NET_LOOPBACK); | 833 | ph.env.sf.s_add (ph.solver, cur_addr, GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_ATS_NetworkTypeCount + 1)); |
834 | ph.current_a = ca + 1; | 834 | ph.current_a = ca + 1; |
835 | perf_address_initial_update (ph.solver, ph.addresses, cur_addr); | 835 | perf_address_initial_update (ph.solver, ph.addresses, cur_addr); |
836 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 836 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |