Examples of incrementTimeInSeconds()


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

        }

        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(options.arriveBy ? options.bikeRentalDropoffCost
                : options.bikeRentalPickupCost);
        s1.incrementTimeInSeconds(options.arriveBy ? options.bikeRentalDropoffTime
                : options.bikeRentalPickupTime);
        s1.setBikeRenting(true);
        s1.setBikeRentalNetwork(networks);
        s1.setBackMode(s0.getNonTransitMode());
        State s1b = s1.makeState();
View Full Code Here

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

        }

        StateEditor s1e = s0.edit(this);
        s1e.incrementWeight(options.arriveBy ? options.bikeRentalPickupCost
                : options.bikeRentalDropoffCost);
        s1e.incrementTimeInSeconds(options.arriveBy ? options.bikeRentalPickupTime
                : options.bikeRentalDropoffTime);
        s1e.setBikeRenting(false);
        s1e.setBackMode(TraverseMode.WALK);
        State s1 = s1e.makeState();
        return s1;
View Full Code Here

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

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

    @Override
View Full Code Here

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

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

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

    EdgeNarrative narrative = computeNarrative(s0);

    StateEditor edit = s0.edit(this, narrative);

    edit.incrementTimeInSeconds(transferTime + options.minTransferTime);

    double w = ItineraryWeightingLibrary.computeTransferWeight(transferTime,
        options);
    edit.incrementWeight(w);
View Full Code Here

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

    int transitTime = computeTransitTime();

    EdgeNarrative narrative = createNarrative(s0);
    StateEditor edit = s0.edit(this, narrative);

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

    return edit.makeState();
View Full Code Here

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

        Vertex fromVertex = new BlockDepartureVertex(_context, _from);
        Vertex toVertex = new BlockArrivalVertex(_context, nextTransferStop);
        EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);

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

        State result = edit.makeState();
        results = result.addToExistingResultChain(results);
View Full Code Here

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

      Vertex fromVertex = new BlockDepartureVertex(_context, _from);
      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);
View Full Code Here

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

    StateEditor edit = s0.edit(this, narrative);

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

    return edit.makeState();
  }
View Full Code Here

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

    TraverseOptions options = s0.getOptions();

    EdgeNarrative narrative = createNarrative(s0);
    StateEditor edit = s0.edit(this, narrative);
    edit.incrementTimeInSeconds(options.minTransferTime);
    double w = options.minTransferTime * options.waitAtBeginningFactor;
    edit.incrementWeight(w);
    return edit.makeState();
  }

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.