Examples of PathFinder


Examples of org.openbel.framework.api.PathFinder

    @Override
    public List<SimplePath> scan(final Kam kam,
            List<KamNode> sources,
            final int maxSearchDepth)
            throws PathFindServiceException {
        final PathFinder pathFinder = new BasicPathFinder(kam);

        final Kam.KamNode[] sourceKamNodes =
                convert(kam, sources);

        final org.openbel.framework.api.SimplePath[] paths = pathFinder
                .scan(sourceKamNodes);

        final List<SimplePath> wsSimplePaths = new ArrayList<SimplePath>(
                paths.length);
View Full Code Here

Examples of org.openbel.framework.api.PathFinder

    @Override
    public List<SimplePath> interconnect(final Kam kam,
            List<KamNode> sources,
            final int maxSearchDepth)
            throws PathFindServiceException {
        final PathFinder pathFinder = new BasicPathFinder(kam, maxSearchDepth);

        final Kam.KamNode[] sourceKamNodes =
                convert(kam, sources);

        final org.openbel.framework.api.SimplePath[] paths = pathFinder
                .interconnect(sourceKamNodes);

        final List<SimplePath> wsSimplePaths = new ArrayList<SimplePath>(
                paths.length);
View Full Code Here

Examples of pathfinder.Pathfinder

  static int[][] h6 = {{ 0, 9, 9},
              { 9, 1, 9},
              { 9, 9, 2}};
  public void setUp()
  {
    finder = new Pathfinder();   
  }
View Full Code Here

Examples of transientlibs.maps.utils.pathfinding.PathFinder

        HP.setup(creatures.maxHP, creatures.maxHP);
        HP.min = -10000;

        Log.info("now hp: " + HP.now.value);

        pathfinder = new PathFinder(mapCoords, setMap);

        maxActionPoints.value = creatures.movementSpeed;
        actionPoints.value = maxActionPoints.value;

        pathfinder.currentMovementReach = actionPoints;
View Full Code Here

Examples of transientlibs.maps.utils.pathfinding.PathFinder

    if (progressPoints.value >= progressPointsNeeded.value) {finishTask();}
}

public void calculateMovementCoords (Coords fromCoords, TilelessMap fromMap) {

        PathFinder pathfinder = new PathFinder(fromCoords, fromMap);

        Coords adjustedCoords;

        int counter;
        int setX;
        int setY;
        int bestResult = 999999999;
        int bestDirection = -1;

        BasicMap onMap = Maps.currentMap;

        for (counter = 1; counter < 10; counter++) {

        adjustedCoords = targetCoords.returnAdjustedCoords(counter);
        setX = adjustedCoords.getIntX();
        setY = adjustedCoords.getIntY();

        onMap.pathfindingGoalX = setX;
        onMap.pathfindingGoalY = setY;

        pathfinder.goalX = setX;
        pathfinder.goalY = setY;

        pathfinder.updatePath();

        if (pathfinder.path != null) {
            if (pathfinder.path.getLength() < bestResult) {
                bestResult = pathfinder.path.getLength();
                bestDirection = counter;
View Full Code Here

Examples of transientlibs.maps.utils.pathfinding.PathFinder

        HP.setup(creature.maxHP, creature.maxHP);
        HP.min = -10000;

        Log.info("now hp: " + HP.now.value);

        pathfinder = new PathFinder(mapCoords, setMap);

        maxActionPoints.value = creature.movementSpeed;
        actionPoints.value = maxActionPoints.value;

        pathfinder.currentMovementReach = actionPoints;
View Full Code Here

Examples of transientlibs.maps.utils.pathfinding.PathFinder

    public Landmark returnClosestLandmark(Coords fromCoords, int landmarkType, Landmark fromLandmark) {

        boolean skipFlag = false;

        PathFinder pathfinder = new PathFinder(fromCoords, this);

        Landmark bestLandmark = null;

        int bestResult = 999999999;


        if (fromLandmark != null) {
            skipFlag = true;
        }

        for (Landmark l : landmarks) {

            Log.info("Found: " + l.ofType + "; Looking for: " + landmarkType);

            if ((skipFlag == false) && (l.ofType == landmarkType)) {


                pathfindingGoalX = l.mapCoords.getIntX();
                pathfindingGoalY = l.mapCoords.getIntY();

                pathfinder.goalX = l.mapCoords.getIntX();
                pathfinder.goalY = l.mapCoords.getIntY();

                pathfinder.updatePath();

                if (pathfinder.path != null) {
                    //Log.info("Path exists");
                    if (pathfinder.path.getLength() < bestResult) {
                        //Log.info("Path is optimal");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.