Examples of incrementWeight()


Examples of org.onebusaway.transit_data_federation.impl.otp.OBAStateEditor.incrementWeight()

      int dwellTime = computeWaitTime(s0, pair);
      edit.incrementTimeInSeconds(-dwellTime);

      double w = ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);
      edit.incrementWeight(w);

      if (arrival.getBlockSequence() != null)
        edit.appendTripSequence(arrival.getBlockSequence());
      else
        edit.appendTripSequence(arrival.getBlockTrip());
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.otp.OBAStateEditor.incrementWeight()

      double w = ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);

      EdgeNarrative narrative = narrative(s0, fromV, toV);
      OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);
      edit.setTime(departure.getBestDepartureTime());
      edit.incrementWeight(w);

      /**
       * If the departure time is less than the starting state time, it must
       * mean the departure was included as determined by the lookahead
       * parameter. Thus, we indicate that we have a lookahead itinerary.
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.otp.OBAStateEditor.incrementWeight()

      Vertex toVertex = new BlockArrivalVertex(_context, nextStop);
      EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);

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

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

      State tr = edit.makeState();
View Full Code Here

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

       
      int runningTime = getPattern().scheduledTimetable.getBestRunningTime(stopIndex);
      StateEditor s1 = state0.edit(this);
      s1.incrementTimeInSeconds(runningTime);
      s1.setBackMode(getMode());
      s1.incrementWeight(runningTime);
      return s1.makeState();
    }

    @Override
    public double timeLowerBound(RoutingRequest options) {
View Full Code Here

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

        if (s0.getOptions().arriveBy)
            s1.setZone(getBeginStop().getZoneId());
        else
            s1.setZone(getEndStop().getZoneId());
        //s1.setRoute(pattern.getExemplar().route.getId());
        s1.incrementWeight(runningTime);
        s1.setBackMode(getMode());
        return s1.makeState();
    }

    public void setGeometry(LineString geometry) {
View Full Code Here

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

   
    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(seconds);
        s1.incrementWeight(weight);
        // SimpleEdges don't concern themselves with mode
        return s1.makeState();
    }

}
View Full Code Here

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

            if (arrivalTimeAtStop > 0) { // FIXME what is this arrivalTimeAtStop?
                int wait = (int) Math.abs(s0.getTimeSeconds() - arrivalTimeAtStop);
               
                s1.incrementTimeInSeconds(wait);
                // this should only occur at the beginning
                s1.incrementWeight(wait * options.waitAtBeginningFactor);

                s1.setInitialWaitTimeSeconds(wait);

                //LOG.debug("Initial wait time set to {} in PatternBoard", wait);
            }
View Full Code Here

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

            }
           
            // during reverse optimization, board costs should be applied to PatternBoards
            // so that comparable trip plans result (comparable to non-optimized plans)
            if (options.reverseOptimizing)
                s1.incrementWeight(options.getBoardCost(s0.getNonTransitMode()));

            if (options.reverseOptimizeOnTheFly) {
                TripPattern pattern = getPattern();
                int thisDeparture = s0.getTripTimes().getDepartureTime(stopIndex);
                int numTrips = getPattern().getNumScheduledTrips();
View Full Code Here

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

                s1.setInitialWaitTimeSeconds(bestWait);
            } else {
                wait_cost *= options.waitReluctance;
            }
           
            s1.incrementWeight(preferences_penalty);
            s1.incrementWeight(transferPenalty);

            // when reverse optimizing, the board cost needs to be applied on
            // alight to prevent state domination due to free alights
            if (options.reverseOptimizing) {
View Full Code Here

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

            } else {
                wait_cost *= options.waitReluctance;
            }
           
            s1.incrementWeight(preferences_penalty);
            s1.incrementWeight(transferPenalty);

            // when reverse optimizing, the board cost needs to be applied on
            // alight to prevent state domination due to free alights
            if (options.reverseOptimizing) {
                s1.incrementWeight(wait_cost);
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.