From d14a97ff4e453ad1540a02b465bb7e398303edde Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 14 Oct 2009 21:22:22 +0100 Subject: [PATCH] routesearch: debugging newbest counters split by granu too --- yarrg/rscommon.h | 6 +++--- yarrg/rssearch.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yarrg/rscommon.h b/yarrg/rscommon.h index f02ffc0..f086e57 100644 --- a/yarrg/rscommon.h +++ b/yarrg/rscommon.h @@ -21,6 +21,8 @@ extern FILE *debug_file; #define DEBUG_DEV "/dev/stdout" /* just for glpk */ +#define GRANUS 3 + #define COUNTER_LIST \ CTR(commodities_loaded) \ CTR(trades_loaded) \ @@ -33,7 +35,7 @@ extern FILE *debug_file; CTR(routes_bucketelim) \ CTR(routes_valued) \ CTR(routes_wrongfinal) \ - CTRA(newbests_granu,2) \ + CTRA(newbests_granu,GRANUS*2) \ CTR(subroute_tails_valued) \ CTR(subroutes_valued) \ CTR(subroutes_nonempty) @@ -121,8 +123,6 @@ typedef struct { int ports[AP][MAX_ROUTELEN]; } PotentialResult; -#define GRANUS 3 - void setup_search(void); void search(int start_isle, int final_isle /* -1 means any */, PotentialResult ****buckets_base_io[GRANUS] diff --git a/yarrg/rssearch.c b/yarrg/rssearch.c index 5ad6136..74a2f45 100644 --- a/yarrg/rssearch.c +++ b/yarrg/rssearch.c @@ -149,7 +149,7 @@ static double process_route(int nports, int totaldist, debugf(" "); } else { int pos; - ctr_newbests_granu[ap]++; + ctr_newbests_granu[granui*AP+ap]++; bucket->value[ap]= value[ap]; memcpy(bucket->ports[ap], ports, sizeof(*ports) * nports); if (nports < MAX_ROUTELEN-1) bucket->ports[ap][nports]= -1; -- 2.30.2