Skip to content

Commit

Permalink
Fix failing assert when disappear-at-goal is set
Browse files Browse the repository at this point in the history
The unique cell computation was incorrect, as the first component of
State is time, not a coordinate.

Fixes issue #28
  • Loading branch information
whoenig committed Oct 11, 2021
1 parent edcef64 commit 7d33df5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/cbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class Environment {
// This is a trick to avoid changing the rest of the code significantly
// After an agent disappeared, put it at a unique but invalid position
// This will cause all calls to equalExceptTime(.) to return false.
return State(-1 * agentIdx, -1, -1);
return State(-1, -1 * (agentIdx + 1), -1);
}
return solution[agentIdx].states.back().first;
}
Expand Down
2 changes: 1 addition & 1 deletion example/ecbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class Environment {
// This is a trick to avoid changing the rest of the code significantly
// After an agent disappeared, put it at a unique but invalid position
// This will cause all calls to equalExceptTime(.) to return false.
return State(-1 * agentIdx, -1, -1);
return State(-1, -1 * (agentIdx+1), -1);
}
return solution[agentIdx].states.back().first;
}
Expand Down

0 comments on commit 7d33df5

Please sign in to comment.