Examples of makeState()


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

                // Final WALK check prevents infinite recursion.
                if (s0.isCarParked() && s0.isEverBoarded() && currMode == TraverseMode.WALK) {
                    editor = doTraverse(s0, options, TraverseMode.CAR);
                    if (editor != null) {
                        editor.setCarParked(false); // Also has the effect of switching to CAR
                        State forkState = editor.makeState();
                        if (forkState != null) {
                            forkState.addToExistingResultChain(state);
                            return forkState; // return both parked and unparked states
                        }
                    }
View Full Code Here

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

                // Final CAR check needed to prevent infinite recursion.
                if ( ! s0.isCarParked() && ! getPermission().allows(TraverseMode.CAR) && currMode == TraverseMode.CAR) {
                    editor = doTraverse(s0, options, TraverseMode.WALK);
                    if (editor != null) {
                        editor.setCarParked(true); // has the effect of switching to WALK and preventing further car use
                        return editor.makeState(); // return only the "parked" walking state
                    }

                }
            }
        }
View Full Code Here

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

        if (s0.getOptions().wheelchairAccessible && !wheelchairAccessible) return null;
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(time);
        s1.incrementWeight(time);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    public void setGeometry(LineString geometry) {
        this.geometry  = geometry;
    }
View Full Code Here

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

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

                : 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

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

        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

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

        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

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

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

    return edit.makeState();
  }

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

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

    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.makeState()

          toVertex);

      StateEditor edit = s0.edit(this, narrative);
      edit.setEverBoarded(true);
      edit.incrementNumBoardings();
      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.