Examples of makeState()


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

      if (arrival.getBlockSequence() != null)
        edit.appendTripSequence(arrival.getBlockSequence());
      else
        edit.appendTripSequence(arrival.getBlockTrip());

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

    return results;
  }
View Full Code Here

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

      if (departure.getBlockSequence() != null)
        edit.appendTripSequence(departure.getBlockSequence());
      else
        edit.appendTripSequence(departure.getBlockTrip());

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

    return results;
  }
View Full Code Here

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

      edit.incrementWeight(runningTime);

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

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

    return results;
  }
View Full Code Here

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

      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) {
        return getPattern().scheduledTimetable.getBestRunningTime(stopIndex);
View Full Code Here

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

        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) {
        this.geometry = geometry;
    }
View Full Code Here

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

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

                    }
                }
            }           

            s1.setBackMode(getMode());
            return s1.makeState();
        } else {
            /* We are going onto transit and must look for a suitable transit trip on this pattern. */  
           
            /* Disallow ever re-boarding the same trip pattern. */
            if (s0.getLastPattern() == this.getPattern()) {
View Full Code Here

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

               !options.reverseOptimizing &&
                s0.isEverBoarded() &&
                s0.getLastNextArrivalDelta() <= bestWait &&
                s0.getLastNextArrivalDelta() > -1) {
                // it is re-reversed by optimize, so this still yields a forward tree
                State optimized = s1.makeState().optimizeOrReverse(true, true);
                if (optimized == null) LOG.error("Null optimized state. This shouldn't happen.");
                return optimized;
            }
           
            /* If we didn't return an optimized path, return an unoptimized one. */
 
View Full Code Here

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

                if (optimized == null) LOG.error("Null optimized state. This shouldn't happen.");
                return optimized;
            }
           
            /* If we didn't return an optimized path, return an unoptimized one. */
            return s1.makeState();
        }
    }

    /** @return the stop where this board/alight edge is located. */
    private Stop getStop() {
View Full Code Here

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

    public State optimisticTraverse(State state0) {
        StateEditor s1 = state0.edit(this);
        // no cost (see patternalight)
        s1.setBackMode(getMode());
        return s1.makeState();
    }

    /* See weightLowerBound comment. */
    public double timeLowerBound(RoutingRequest options) {
        if ((options.arriveBy && boarding) || (!options.arriveBy && !boarding)) {
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.