-
Notifications
You must be signed in to change notification settings - Fork 16
/
CostTreeSearch.cs
84 lines (65 loc) · 3.15 KB
/
CostTreeSearch.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
namespace mapf;
///// <summary>
///// Ignore. Implementation of ID for ICTS.
///// </summary>
//class CostTreeSearch : IndependenceDetection
//{
// public static string PARENT_GROUP1_KEY = "parentGroup1";
// public static string PARENT_GROUP2_KEY = "parentGroup2";
// public CostTreeSearch(HeuristicCalculator heuristic)
// : base(, new CostTreeSearchSolver(), heuristic) { }
// public CostTreeSearch(ISolver singleSolver, ISolver groupSolver, HeuristicCalculator heuristic)
// : base(singleSolver, groupSolver, heuristic) { }
// public override string GetName() { return "CostTreeSearch+ID "; }
// public override string ToString()
// {
// return GetName();
// }
// /// <summary>
// /// Join the conflicting groups into a single group
// /// </summary>
// /// <param name="conflict">An object that describes the conflict</param>
// /// <returns>The composite group of agents</returns>
// protected override AgentsGroup JoinGroups(Conflict conflict)
// {
// AgentsGroup answer = conflict.group1.Join(conflict.group2);
// // TODO: Currently storing the previous groups - this might lead to a memory problem when there are many agents
// // (if this happens then store only the costs)
// answer.instance.parameters[PARENT_GROUP1_KEY] = conflict.group1;
// answer.instance.parameters[PARENT_GROUP2_KEY] = conflict.group2;
// // Free memory of grandparents
// conflict.group1.instance.parameters.Remove(PARENT_GROUP1_KEY);
// conflict.group1.instance.parameters.Remove(PARENT_GROUP2_KEY);
// conflict.group2.instance.parameters.Remove(PARENT_GROUP1_KEY);
// conflict.group2.instance.parameters.Remove(PARENT_GROUP2_KEY);
// return answer;
// }
//}
//class CostTreeSearchOldMatching : CostTreeSearch
//{
// int sycSize;
// public CostTreeSearchOldMatching(int sycSize, HeuristicCalculator heuristic)
// : base(new CostTreeSearchSolverOldMatching(sycSize), heuristic) { this.sycSize = sycSize; }
// public override string GetName() { return "ICTS " + sycSize + "E+ID "; }
//}
//class CostTreeSearchNoPruning : CostTreeSearch
//{
// public CostTreeSearchNoPruning(HeuristicCalculator heuristic)
// : base(new CostTreeSearchSolverNoPruning(), heuristic) { }
// public override string GetName() { return "ICTS " + "+ID "; }
//}
//class CostTreeSearchKMatch : CostTreeSearch
//{
// int maxGroupChecked;
// public CostTreeSearchKMatch(int maxGroupChecked, HeuristicCalculator heuristic)
// : base(new CostTreeSearchSolverKMatch(maxGroupChecked), heuristic) { this.maxGroupChecked = maxGroupChecked; }
// public override string GetName() { return "ICTS " + maxGroupChecked + "S+ID "; }
//}
//class CostTreeSearchRepeatedMatch : CostTreeSearch
//{
// int sycSize;
// public CostTreeSearchRepeatedMatch(int sycSize, HeuristicCalculator heuristic)
// : base(new CostTreeSearchSolverRepeatedMatch(sycSize), heuristic) { this.sycSize = sycSize; }
// public override string GetName() { return "ICTS " + sycSize + "RE+ID "; }
//}