Skip to content

Commit

Permalink
Whitespace and unnecessary token fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-b committed Feb 7, 2020
1 parent d8acb31 commit e7641cc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions ICBSSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ std::tuple<ICBSNode *, bool> ICBSSearch::generateChild(ICBSNode *child, Conflict
}
for (int i = 0; i < 2 && a[i] >= 0; i++)
{
if (loc2 < 0 && timestep > parent_paths[a[i]]->size()) // The agent is forced out of its goal - the cost will surely increase
if (loc2 < 0 && timestep >= parent_paths[a[i]]->size()) // The agent is forced out of its goal - the cost will surely increase
// FIXME: Assumes the cost function is sum-of-costs
{
// Partial expansion - delay path finding:
Expand Down Expand Up @@ -2815,7 +2815,7 @@ void ICBSSearch::findShortestPathFromPrevNodeToCurr(ICBSNode *curr, ICBSNode* pr
}

// RUN CBS
bool ICBSSearch::runICBSSearch()
bool ICBSSearch::runICBSSearch()
{
if (HL_heuristic)
#ifndef LPA
Expand Down Expand Up @@ -3896,7 +3896,7 @@ ICBSSearch::ICBSSearch(const MapLoader &ml, const AgentsLoader &al, double focal
#endif

// initialize single agent search solver and heuristics for the low-level search
for (int i = 0; i < num_of_agents; i++)
for (int i = 0; i < num_of_agents; i++)
{
int init_loc = ml.linearize_coordinate((al.initial_locations[i]).first, (al.initial_locations[i]).second);
int goal_loc = ml.linearize_coordinate((al.goal_locations[i]).first, (al.goal_locations[i]).second);
Expand Down
2 changes: 1 addition & 1 deletion ICBSSingleAgentLLNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct PathEntry
bool single; // it is the singleton in its MDD
int numMDDNodes; // number of MDD nodes at the given timestep
bool builtMDD; // only when builtMDD is true, single is useful.
PathEntry(){location = -1; builtMDD= false; single = false; numMDDNodes = 0;}
PathEntry() {location = -1; builtMDD = false; single = false; numMDDNodes = 0;}
};

class ICBSSingleAgentLLNode
Expand Down
4 changes: 2 additions & 2 deletions ICBSSingleAgentLLSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int ICBSSingleAgentLLSearch::extractLastGoalTimestep(int goal_location, const ve
{
auto [loc1, loc2, positive_constraint] = *it;
if (loc1 == goal_location && loc2 < 0 && !positive_constraint) {
return (t);
return t;
}
}
}
Expand Down Expand Up @@ -261,7 +261,7 @@ bool ICBSSingleAgentLLSearch::findShortestPath(vector<PathEntry> &path,
}
else
{ // update existing node's if needed (only in the open_list)
delete(next); // not needed anymore -- we already generated it before
delete next; // not needed anymore -- we already generated it before
ICBSSingleAgentLLNode* existing_next = (*it).second;
if (existing_next->in_openlist == true) // if its in the open list
{
Expand Down
2 changes: 1 addition & 1 deletion heuristic_calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using boost::heap::fibonacci_heap;
HeuristicCalculator::HeuristicCalculator(int start_location, int goal_location,
const bool* my_map, int map_rows, int map_cols, const int* moves_offset) :
my_map(my_map), map_rows(map_rows), map_cols(map_cols), moves_offset(moves_offset),
start_location(start_location), goal_location(goal_location){}
start_location(start_location), goal_location(goal_location) {}

void HeuristicCalculator::computeHVals(int* res)
{
Expand Down
2 changes: 1 addition & 1 deletion lpa_star.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ inline std::pair<bool, LPANode*> LPAStar::retrieveNode(int loc_id, int t, bool c
//temp_n->initState(); -- already done correctly in construction above.
allNodes_table.set(loc_id, t, n);
VLOG(11) << "\t\t\t\t\tallNodes_table: Added new node" << n->nodeString();
return (make_pair(false, n));
return make_pair(false, n);
}
}
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit e7641cc

Please sign in to comment.