Package org.opentripplanner.routing.core

Examples of org.opentripplanner.routing.core.StateEditor.makeState()


        s1.incrementTimeInSeconds(options.arriveBy ? options.bikeRentalDropoffTime
                : options.bikeRentalPickupTime);
        s1.setBikeRenting(true);
        s1.setBikeRentalNetwork(networks);
        s1.setBackMode(s0.getNonTransitMode());
        State s1b = s1.makeState();
        return s1b;
    }

    protected State traverseDropoff(State s0) {
        RoutingRequest options = s0.getOptions();
View Full Code Here


                : options.bikeRentalDropoffCost);
        s1e.incrementTimeInSeconds(options.arriveBy ? options.bikeRentalPickupTime
                : options.bikeRentalDropoffTime);
        s1e.setBikeRenting(false);
        s1e.setBackMode(TraverseMode.WALK);
        State s1 = s1e.makeState();
        return s1;
    }

    @Override
    public double getDistance() {
View Full Code Here

        int dwellTime = tripTimes.getDwellTime(stopIndex);
        StateEditor s1 = state0.edit(this);
        s1.setBackMode(getMode());
        s1.incrementTimeInSeconds(dwellTime);
        s1.incrementWeight(dwellTime);
        return s1.makeState();
    }

    @Override
    public State optimisticTraverse(State s0) {
        int dwellTime = getPattern().scheduledTimetable.getBestDwellTime(stopIndex);
View Full Code Here

        int dwellTime = getPattern().scheduledTimetable.getBestDwellTime(stopIndex);
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(dwellTime);
        s1.setBackMode(getMode());
        s1.incrementWeight(dwellTime);
        return s1.makeState();
    }
   
    @Override
    public double timeLowerBound(RoutingRequest options) {
        return getPattern().scheduledTimetable.getBestDwellTime(stopIndex);
View Full Code Here

    double w = ItineraryWeightingLibrary.computeTransferWeight(transferTime,
        options);
    edit.incrementWeight(w);

    return edit.makeState();
  }

  /****
   *
   ****/
 
View Full Code Here

    edit.incrementTimeInSeconds(transitTime);
    edit.incrementNumBoardings();
    edit.setEverBoarded(true);
    edit.incrementWeight(transitTime);

    return edit.makeState();
  }

  /****
   *
   ****/
 
View Full Code Here

          toVertex);

      StateEditor edit = s0.edit(this, narrative);
      edit.setEverBoarded(true);
      edit.incrementNumBoardings();
      return edit.makeState();
    }
  }
}
View Full Code Here

        StateEditor edit = s0.edit(this, narrative);
        edit.incrementTimeInSeconds(runningTime);
        edit.incrementWeight(runningTime);

        State result = edit.makeState();
        results = result.addToExistingResultChain(results);

        maxBlockSequence = nextTransferStop.getBlockStopTime().getBlockSequence();
      } else {
        maxBlockSequence = Integer.MAX_VALUE;
View Full Code Here

      edit.incrementWeight(runningTime);

      if (state.getMaxBlockSequence() < 0)
        edit.setMaxBlockSequence(maxBlockSequence);

      State tr = edit.makeState();
      results = tr.addToExistingResultChain(results);
    }

    return results;
  }
View Full Code Here

    long arrival = nextStop.getBestArrivalTime();
    int runningTime = (int) ((arrival - departure) / 1000);
    edit.incrementTimeInSeconds(runningTime);
    edit.incrementWeight(runningTime);

    return edit.makeState();
  }

  private State traverseReverse(State s0) {

    Vertex fromVertex = new BlockDepartureVertex(_context, _from);
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.