Skip to content

Commit

Permalink
Commit a bug of decreasing F on EPEA* + ID
Browse files Browse the repository at this point in the history
  • Loading branch information
OmriKaduri committed Jan 14, 2020
1 parent 4203f91 commit a6a2459
Show file tree
Hide file tree
Showing 1,329 changed files with 17,319 additions and 4,340 deletions.
Binary file modified .vs/mapf/v15/.suo
Binary file not shown.
Binary file modified .vs/mapf/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file modified .vs/mapf/v15/Server/sqlite3/storage.ide-wal
Binary file not shown.
81 changes: 40 additions & 41 deletions IndependenceDetection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,52 +560,53 @@ public IndependenceDetectionAgentsGroup(ProblemInstance instance, AgentState[] a
var model_path = Path.Combine(Environment.CurrentDirectory, "testing-clf.xgb");

//selectionModel = new ClassificationXGBoostLearner();
this.selectionModel = ClassificationXGBoostModel.Load(model_path);

this.simple = new SumIndividualCosts();
this.epea = new EPEA_Star(this.simple);
this.astar = new A_Star(this.simple);
this.macbs = new CBS(this.astar, this.epea, 10);
this.icts = new CostTreeSearchSolverOldMatching(3);
this.cbs = new CBS(this.astar, this.epea);
this.mvc_for_cbs = new MvcHeuristicForCbs();

//for (int i = 0; i < astar_heuristics.Count; i++)
// astar_heuristics[i].Init(instance, agentList);

this.cbsh = new CBS(astar, epea,
mergeThreshold: -1,
CBS.BypassStrategy.FIRST_FIT_LOOKAHEAD,
doMalte: false,
CBS.ConflictChoice.CARDINAL_MDD,
this.mvc_for_cbs,
disableTieBreakingByMinOpsEstimate: true,
lookaheadMaxExpansions: 1,
mergeCausesRestart: true,
replanSameCostWithMdd: false,
cacheMdds: false,
useOldCost: false,
useCAT: true);

this.runner = runner;
this.subproblem_id = subproblem_id;
this.timeToSolver = 0;
//this.selectionModel = ClassificationXGBoostModel.Load(model_path);

//this.simple = new SumIndividualCosts();
//this.epea = new EPEA_Star(this.simple);
//this.astar = new A_Star(this.simple);
//this.macbs = new CBS(this.astar, this.epea, 10);
//this.icts = new CostTreeSearchSolverOldMatching(3);
//this.cbs = new CBS(this.astar, this.epea);
//this.mvc_for_cbs = new MvcHeuristicForCbs();

////for (int i = 0; i < astar_heuristics.Count; i++)
//// astar_heuristics[i].Init(instance, agentList);

//this.cbsh = new CBS(astar, epea,
// mergeThreshold: -1,
// CBS.BypassStrategy.FIRST_FIT_LOOKAHEAD,
// doMalte: false,
// CBS.ConflictChoice.CARDINAL_MDD,
// this.mvc_for_cbs,
// disableTieBreakingByMinOpsEstimate: true,
// lookaheadMaxExpansions: 1,
// mergeCausesRestart: true,
// replanSameCostWithMdd: false,
// cacheMdds: false,
// useOldCost: false,
// useCAT: true);

////this.runner = runner;
//this.subproblem_id = subproblem_id;
//this.timeToSolver = 0;
}

/// <summary>
/// Solve the group of agents together.
/// </summary>
/// <param name="runner"></param>
/// <param name="myRunner"></param>
/// <returns>true if optimal solution for the group of agents were found, false otherwise</returns>
public bool Solve(Run runner)
public bool Solve(Run myRunner)
{
ISolver relevantSolver = this.groupSolver;

if (this.allAgentsState.Length == 1)
relevantSolver = this.singleAgentSolver; // TODO: Consider using CBS's root trick to really get single agent paths fast. Though it won't respect illegal moves and such.

var watch = System.Diagnostics.Stopwatch.StartNew();

relevantSolver.Setup(this.instance, runner);
relevantSolver.Setup(this.instance, myRunner);
bool solved = relevantSolver.Solve();
watch.Stop();
this.timeToSolver = watch.ElapsedMilliseconds;
Expand All @@ -622,12 +623,12 @@ public bool Solve(Run runner)

//TODO: Add print stastistics to different writer - writer of ID metadata

this.runner.OpenMetaIDResultsFile();
this.runner.PrintMetaIDProblemStatistics(this.instance);
OutputIDMetaStatistics(this.runner.metaIDResultsWriter);
this.runner.metaIDResultsWriter.WriteLine();
this.runner.metaIDResultsWriter.Flush();
this.runner.CloseMetaIDResultsFile();
myRunner.OpenMetaIDResultsFile();
myRunner.PrintMetaIDProblemStatistics(this.instance);
OutputIDMetaStatistics(myRunner.metaIDResultsWriter);
myRunner.metaIDResultsWriter.WriteLine();
myRunner.metaIDResultsWriter.Flush();
myRunner.CloseMetaIDResultsFile();
// Clear memory
relevantSolver.Clear();
return true;
Expand Down Expand Up @@ -678,8 +679,6 @@ public ISolver solverByIndex(double solverIndex, ProblemInstance instance)
default:
return null;
}


}

/// <summary>
Expand Down
30 changes: 15 additions & 15 deletions Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -628,25 +628,25 @@ public Run()
//solvers.Add(new IndependenceDetection(astar, epea,true));

//// ICTS + ID
//solvers.Add(new IndependenceDetection(astar, new CostTreeSearchSolverOldMatching(3)));
solvers.Add(new IndependenceDetection(astar, new CostTreeSearchSolverOldMatching(3)));

//// EPEA* + ID
//solvers.Add(new IndependenceDetection(astar, epea));
solvers.Add(new IndependenceDetection(astar, epea));

//Adding CBS-H + ID:
solvers.Add(new IndependenceDetection(astar, new CBS(astar, astar_with_od,
mergeThreshold: -1,
CBS.BypassStrategy.FIRST_FIT_LOOKAHEAD,
doMalte: false,
CBS.ConflictChoice.CARDINAL_MDD,
mvc_for_cbs,
disableTieBreakingByMinOpsEstimate: true,
lookaheadMaxExpansions: 1,
mergeCausesRestart: true,
replanSameCostWithMdd: false,
cacheMdds: false,
useOldCost: false,
useCAT: true)));
//solvers.Add(new IndependenceDetection(astar, new CBS(astar, astar_with_od,
// mergeThreshold: -1,
// CBS.BypassStrategy.FIRST_FIT_LOOKAHEAD,
// doMalte: false,
// CBS.ConflictChoice.CARDINAL_MDD,
// mvc_for_cbs,
// disableTieBreakingByMinOpsEstimate: true,
// lookaheadMaxExpansions: 1,
// mergeCausesRestart: true,
// replanSameCostWithMdd: false,
// cacheMdds: false,
// useOldCost: false,
// useCAT: true)));

//Adding CBS-H:
//mergeThreshold = -1, #CBS-H is with -1, MA-CBS-H is with 10
Expand Down
1 change: 1 addition & 0 deletions bin/Debug/24a88a22-3331-47ef-8a44-3fb1483b6d03.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GridName,GridRows,GridColumns,NumOfAgents,NumOfObstacles,InstanceId,BranchingFactor,ObstacleDensity,AvgDistanceToGoal,MaxDistanceToGoal,MinDistanceToGoal,AvgStartDistances,AvgGoalDistances,PointsAtSPRatio,Sparsity,ICTS 3E +ID Success,ICTS 3E +ID Runtime,ICTS 3E +ID Solution Cost,ICTS 3E +ID Expanded,ICTS 3E +ID Generated,ICTS 3E +ID Max Group Size,ICTS 3E +ID Min Group Size,ICTS 3E +ID Max Group,ICTS 3E +ID Solution Depth,EPEA*+ID Success,EPEA*+ID Runtime,EPEA*+ID Solution Cost,EPEA*+ID Expanded,EPEA*+ID Generated,EPEA*+ID Max Group Size,EPEA*+ID Min Group Size,EPEA*+ID Max Group,EPEA*+ID Solution Depth,
4 changes: 4 additions & 0 deletions bin/Debug/29200dc7-c37f-4e70-b0f2-6631a4223670.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GridName,GridRows,GridColumns,NumOfAgents,NumOfObstacles,InstanceId,BranchingFactor,ObstacleDensity,AvgDistanceToGoal,MaxDistanceToGoal,MinDistanceToGoal,AvgStartDistances,AvgGoalDistances,PointsAtSPRatio,Sparsity,ICTS 3E +ID Success,ICTS 3E +ID Runtime,ICTS 3E +ID Solution Cost,ICTS 3E +ID Expanded,ICTS 3E +ID Generated,ICTS 3E +ID Max Group Size,ICTS 3E +ID Min Group Size,ICTS 3E +ID Max Group,ICTS 3E +ID Solution Depth,EPEA*+ID Success,EPEA*+ID Runtime,EPEA*+ID Solution Cost,EPEA*+ID Expanded,EPEA*+ID Generated,EPEA*+ID Max Group Size,EPEA*+ID Min Group Size,EPEA*+ID Max Group,EPEA*+ID Solution Depth,
brc202d,481,530,2,211779,1,25,0.830734,365,441,289,145,98.33334,0.002871376,4.63488679289008E-05,1,8009.4249,730,730,1938,1,1,1,0,1,2658.2837,730,730,1938,1,1,1,0,
brc202d,481,530,3,211779,1,125,0.830734,360,441,289,256.6667,148,0.004212921,6.95233018933513E-05,1,3384.9501,1080,1080,2882,1,1,1,0,1,3870.9835,1080,1080,2882,1,1,1,0,
brc202d,481,530,4,211779,1,625,0.830734,293.5,441,94,245.8,149.4,0.00458165,9.26977358578017E-05,1,5143.7395,1174,1174,3138,1,1,1,0,1,3859.6912,1174,1174,3138,1,1,1,0,
34 changes: 34 additions & 0 deletions bin/Debug/29200dc7-c37f-4e70-b0f2-6631a4223670METAID.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
GridName,GridRows,GridColumns,NumOfAgents,NumOfObstacles,InstanceId,BranchingFactor,ObstacleDensity,AvgDistanceToGoal,MaxDistanceToGoal,MinDistanceToGoal,AvgStartDistances,AvgGoalDistances,PointsAtSPRatio,Sparsity,GroupNumber,SolverUsed,SolverRuntime,GroupSize,
brc202d,481,530,2,211779,1,25,0.830734,365,441,289,145,98.33334,0.002871376,4.63488679289008E-05,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,ICTS 3E ,40,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,ICTS 3E ,10,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,EPEA*,8,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,EPEA*,10,1,
brc202d,481,530,3,211779,1,125,0.830734,360,441,289,256.6667,148,0.004212921,6.95233018933513E-05,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,ICTS 3E ,6,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,ICTS 3E ,9,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,ICTS 3E ,13,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,EPEA*,6,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,EPEA*,13,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,EPEA*,12,1,
brc202d,481,530,4,211779,1,625,0.830734,293.5,441,94,245.8,149.4,0.00458165,9.26977358578017E-05,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,ICTS 3E ,7,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,ICTS 3E ,13,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,ICTS 3E ,11,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.0003726513,2.31744339644504E-05,0,ICTS 3E ,3,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,EPEA*,9,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,EPEA*,12,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,EPEA*,10,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.0003726513,2.31744339644504E-05,0,EPEA*,1,1,
brc202d,481,530,5,211779,1,3125,0.830734,288,441,94,251.6,171.3333,0.004856235,0.000115872169822252,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,ICTS 3E ,4,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,ICTS 3E ,7,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,ICTS 3E ,12,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.0003726513,2.31744339644504E-05,0,ICTS 3E ,2,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001047346,2.31744339644504E-05,0,ICTS 3E ,16,1,
brc202d,481,530,2,211779,0,25,0.830734,0,0,0,0,0,0.001412152,4.63488679289008E-05,1,ICTS 3E ,449,2,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001137567,2.31744339644504E-05,0,EPEA*,5,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001733809,2.31744339644504E-05,0,EPEA*,8,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001376849,2.31744339644504E-05,0,EPEA*,10,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.0003726513,2.31744339644504E-05,0,EPEA*,1,1,
brc202d,481,530,1,211779,0,5,0.830734,0,0,0,0,0,0.001047346,2.31744339644504E-05,0,EPEA*,20,1,
8 changes: 8 additions & 0 deletions bin/Debug/2a4b3c8c-a194-4b91-96f1-dc36bee34fb1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
GridName,GridRows,GridColumns,NumOfAgents,NumOfObstacles,InstanceId,BranchingFactor,ObstacleDensity,AvgDistanceToGoal,MaxDistanceToGoal,MinDistanceToGoal,AvgStartDistances,AvgGoalDistances,PointsAtSPRatio,Sparsity,ICTS 3E +ID Success,ICTS 3E +ID Runtime,ICTS 3E +ID Solution Cost,ICTS 3E +ID Expanded,ICTS 3E +ID Generated,ICTS 3E +ID Max Group Size,ICTS 3E +ID Min Group Size,ICTS 3E +ID Max Group,ICTS 3E +ID Solution Depth,EPEA*+ID Success,EPEA*+ID Runtime,EPEA*+ID Solution Cost,EPEA*+ID Expanded,EPEA*+ID Generated,EPEA*+ID Max Group Size,EPEA*+ID Min Group Size,EPEA*+ID Max Group,EPEA*+ID Solution Depth,
warehouse-10-20-10-2-1,63,161,2,4444,1,25,0.4381347,109,120,98,14.66667,11.33333,0.02168984,0.000350938761186173,1,5779.1502,218,218,356,1,1,1,0,1,2756.9011,218,218,356,1,1,1,0,
warehouse-10-20-10-2-1,63,161,3,4444,1,125,0.4381347,95.6666666666667,120,69,33,38.33333,0.02415459,0.000526408141779259,1,4736.5934,287,287,443,1,1,1,0,1,3220.58,287,287,443,1,1,1,0,
warehouse-10-20-10-2-1,63,161,4,4444,1,625,0.4381347,111.5,159,69,44,58.8,0.03973183,0.000701877522372346,1,4108.7861,446,446,719,1,1,1,0,1,3803.6693,446,446,719,1,1,1,0,
warehouse-10-20-10-2-1,63,161,5,4444,1,3125,0.4381347,91.2,159,10,45.2,57.73333,0.04081633,0.000877346902965433,1,7068.4831,456,456,750,1,1,1,0,1,9186.8889,456,456,750,1,1,1,0,
warehouse-10-20-10-2-1,63,161,6,4444,1,15625,0.4381347,80.5,159,10,55.09524,63.71429,0.04347826,0.00105281628355852,1,12053.2419,483,483,806,1,1,1,0,1,5862.49329999999,483,483,806,1,1,1,0,
warehouse-10-20-10-2-1,63,161,7,4444,1,78125,0.4381347,81.1428571428571,159,10,55.21429,65.28571,0.05195701,0.00122828566415161,1,12576.9882,568,568,945,1,1,1,0,1,6410.56,568,568,945,1,1,1,0,
warehouse-10-20-10-2-1,63,161,8,4444,1,390625,0.4381347,92.75,174,10,61.55556,66.16666,0.06881593,0.00140375504474469,1,9377.0555,742,742,1265,1,1,1,0,1,6385.16840000001,742,742,1265,1,1,1,0,
Loading

0 comments on commit a6a2459

Please sign in to comment.