forked from J-morag/MAPF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up DistanceTableAStarHeuristic and its subclasses
- Loading branch information
Showing
4 changed files
with
48 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
src/main/java/BasicCBS/Solvers/ICTS/MDDs/DistanceTableAStarHeuristicICTS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
package BasicCBS.Solvers.ICTS.MDDs; | ||
|
||
import BasicCBS.Instances.Agent; | ||
import BasicCBS.Instances.Maps.I_Location; | ||
import BasicCBS.Instances.Maps.I_Map; | ||
import BasicCBS.Solvers.AStar.DistanceTableAStarHeuristic; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class DistanceTableAStarHeuristicICTS extends DistanceTableAStarHeuristic { | ||
public DistanceTableAStarHeuristicICTS(List<? extends Agent> agents, I_Map map) { | ||
super(agents, map); | ||
} | ||
|
||
public void setH(MDDSearchNode node) { | ||
Map<I_Location, Integer> relevantDictionary = getDistanceDictionaries().get(node.getAgent()); | ||
node.setH(relevantDictionary.get(node.getLocation())); | ||
node.setH(getHForAgentAndCurrentLocation(node.getAgent(), node.getLocation())); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters