Skip to content

Commit

Permalink
Fix CBS running under ID
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-b committed Mar 11, 2020
1 parent c5a36d7 commit 4053ff6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CbsNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ public bool Solve(int depthToReplan)
subGroups[this.agentsGroupAssignment[i]].Add(problem.agents[i]);
}

bool underID = problem.parameters.ContainsKey(IndependenceDetection.ILLEGAL_MOVES_KEY) &&
(((HashSet<TimedMove>)problem.parameters[IndependenceDetection.ILLEGAL_MOVES_KEY]).Count != 0);

bool success = true;

int maxPlanSize = -1;
Expand All @@ -318,6 +321,7 @@ public bool Solve(int depthToReplan)
// Solve for a single agent:
if (agentGroupHasConstraints == false &&
agentGroupHasMustConstraints == false &&
underID == false &&
subGroup.Count == 1) // Top-most CBS with no must constraints on this agent. Shortcut available (that doesn't consider the CAT, though)
{
allSingleAgentPlans[i] = new SinglePlan(problem.agents[i]); // All moves up to starting pos, if any
Expand Down

0 comments on commit 4053ff6

Please sign in to comment.