diff --git a/r2sol.cc b/r2sol.cc index 4112ea72feb12839b96ae21e888773f5476f25da..000772e1fdd54cc0f765aae063b7358593f688bf 100644 --- a/r2sol.cc +++ b/r2sol.cc @@ -31,7 +31,7 @@ using namespace std; #define NMAX 201 #define MAXNODES 3000 #define TMAX 2807//2567 -#define MAX_NUM_THREADS 2//4 +#define MAX_NUM_THREADS 1//4 #define MAX_CTURNS 5 #define INF 10000 #define ZERO 0.000001 @@ -1307,7 +1307,7 @@ void RandomPermutations(int tid, int ntries) { } else { for (int i = 0; i < N; ++i) pused_tid[i] = 0; int idx = 0; - /*if ((trial & 1) == 1) { + if (0&&(trial & 1) == 1) { for (int cturns = MAX_CTURNS - 1; cturns >= 0; --cturns) { const auto& cturns_agents_cturns = cturns_agents[cturns]; const auto& num_cturns_agents_cturns = num_cturns_agents[cturns]; @@ -1329,13 +1329,13 @@ void RandomPermutations(int tid, int ntries) { pused_tid[perm_tid[idx++]] = 1; } } - }*/ - for (int i = 0; i < N; ++i) { + } + /*for (int i = 0; i < N; ++i) { do { perm_tid[idx] = xor128_tid.rand() % N; } while (pused_tid[perm_tid[idx]]); pused_tid[perm_tid[idx++]] = 1; - } + }*/ } ++is_covered_idx_tid; for (int aid = 0; aid < N; ++aid) { @@ -2188,8 +2188,8 @@ void GetMoves(const char* testid, bool replay_mode = false) { ReinitDataStructures(); ComputeShortestPaths(); } - SCORE_EXPONENT1 = 0.3333333;//0.5; - SCORE_EXPONENT2 = 0.3333333;//0.5; + SCORE_EXPONENT1 = 1.0; + SCORE_EXPONENT2 = 1.0; DBG(2, "testid=%s TINIT=%d: resc=%d nda=%d npl=%d\n", testid, TINIT, reschedule, num_done_agents, num_planned); if (reschedule) { if (TINIT >= MIN_TINIT_FOR_SAVE_DATA_FOR_REPLAY) SaveDataForReplay(testid); @@ -2198,14 +2198,14 @@ void GetMoves(const char* testid, bool replay_mode = false) { updated_paths_ok = AdjustIPaths(); ++num_adjust_ipaths_without_full_plan_regeneration; } - const int kMaxNumAdjustIPathsWithoutFullPlanRegenartion = 3;//5; + const int kMaxNumAdjustIPathsWithoutFullPlanRegenartion = 1;//3; const bool full_regenerate_paths = !updated_paths_ok || num_adjust_ipaths_without_full_plan_regeneration > kMaxNumAdjustIPathsWithoutFullPlanRegenartion; if (full_regenerate_paths) { - RegenerateFullPlan(4, TINIT == 0 ? 20 : /*9*/10); + RegenerateFullPlan(4, TINIT == 0 ? 20 : 10); num_adjust_ipaths_without_full_plan_regeneration = 0; } else { assert(TINIT >= 1); - RegenerateFullPlan(2, /*1*/ 2); + RegenerateFullPlan(2, 2); } if (TINIT >= 1 && any_best_solution_updates) AdjustIPaths(); }