Codota Logo
Lane.getId
Code IndexAdd Codota to your IDE (free)

How to use
getId
method
in
org.matsim.lanes.Lane

Best Java code snippets using org.matsim.lanes.Lane.getId (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

@Override
public void addLane(Lane lane) {
  this.lanes.put(lane.getId(), lane);
}
origin: matsim-org/matsim

Map<Id<Lane>, Set<Id<Link>>> laneIdToLinksMap = new HashMap<>();
for (ModelLane lane : lanes) { // lanes is sorted downstream to upstream
  Id<Lane> laneId = lane.getLaneData().getId();
        toLinkIdDownstreamQueues);
    for (ModelLane toLane : lane.getToLanes()) {
      Set<Id<Link>> toLinks = laneIdToLinksMap.get(toLane.getLaneData().getId());
      if (toLinks == null){ 
          toLinkIdDownstreamQueues.put(toLinkId, downstreamQueues);
        downstreamQueues.add(queueByIdMap.get(toLane.getLaneData().getId()));
origin: matsim-org/matsim

for (Lane l : l2l.getLanes().values()){
  if (link.getLength() < l.getStartsAtMeterFromLinkEnd()) {
    log.error("Link Id " + link.getId() + " is shorter than an assigned lane with id " + l.getId());
    return false;
    if (! l2l.getLanes().containsKey(toLaneId)){
      log.error("Error: toLane not existing:");
      log.error("  Lane Id: " + lane.getId() + " on Link Id: " + l2l.getLinkId() + 
          " leads to Lane Id: " + toLaneId + " that is not existing!");
      return false;
  for (Id<Link> toLinkId : lane.getToLinkIds()) {
    if (! this.network.getLinks().containsKey(toLinkId)){
      log.error("No link found in network for toLinkId " + toLinkId + " of laneId " + lane.getId() + " of link id " + l2l.getLinkId());
      return false;
      Link link = this.network.getLinks().get(l2l.getLinkId());
      if (! link.getToNode().getOutLinks().containsKey(toLinkId)){
        log.error("The given toLink " + toLinkId + " is not reachable from lane " + lane.getId() + " on link " + link.getId());
        return false;
origin: matsim-org/matsim

Lane firstLane = sortedLanes.remove(0);
if (firstLane.getStartsAtMeterFromLinkEnd() != link.getLength()) {
  throw new IllegalStateException("First Lane Id " + firstLane.getId() + " on Link Id " + link.getId() +
  "isn't starting at the beginning of the link!");
origin: matsim-org/matsim

/**
 * Replaces the method that converted a lane from format 11 to format 20.
 * Use this when you have not defined an original lane of the link and when you have not set lane capacities yet.
 */
public static void createOriginalLanesAndSetLaneCapacities(Network network, Lanes lanes){
  LanesFactory factory = lanes.getFactory();
  for (LanesToLinkAssignment l2l : lanes.getLanesToLinkAssignments().values()){
    Link link = network.getLinks().get(l2l.getLinkId());
    Lane olLane = factory.createLane(Id.create(l2l.getLinkId().toString() + ".ol", Lane.class));
    l2l.addLane(olLane);
    for (Lane lane : l2l.getLanes().values()) {
      olLane.addToLaneId(lane.getId());
      //set capacity of the lane depending on link capacity and number of representative lanes
      LanesUtils.calculateAndSetCapacity(lane, true, link, network);
    }
    olLane.setNumberOfRepresentedLanes(link.getNumberOfLanes());
    olLane.setStartsAtMeterFromLinkEnd(link.getLength());
  }
}

origin: matsim-org/matsim

  private VisLane createVisLane(ModelLane qlane, double linkLength, double linkScale, double linkLengthCorrectionFactor) {
    String id = qlane.getLaneData().getId().toString();
    double startPosition = (linkLength -  qlane.getLaneData().getStartsAtMeterFromLinkEnd()) * linkScale * linkLengthCorrectionFactor;
    double endPosition = startPosition + (qlane.getLength() *  linkScale * linkLengthCorrectionFactor);
//        log.error("lane " + qlane.getId() + " starts at: " + startPosition + " and ends at : " +endPosition);
    int alignment = qlane.getLaneData().getAlignment();
    VisLane lane = new VisLane(id);
    lane.setStartPosition(startPosition);
    lane.setEndPosition(endPosition);
    lane.setAlignment(alignment);
    lane.setNumberOfLanes(qlane.getLaneData().getNumberOfRepresentedLanes());
    return lane;
  }

origin: matsim-org/matsim

xmllane.setId(bl.getId().toString());
      "be set for Lane Id " + bl.getId() + " on link Id " + ltla.getLinkId() + "! Cannot write according to XML grammar.");
origin: matsim-org/matsim

VisLane otfLane = lanesLinkData.getLaneData().get(lane.getLaneData().getId().toString());
if (lane.getToLanes() == null ||  lane.getToLanes().isEmpty()){
  for (Id<Link> id : lane.getLaneData().getToLinkIds()){
    VisLane otfToLane = lanesLinkData.getLaneData().get(toLane.getLaneData().getId().toString());
    otfLane.addToLane(otfToLane);
origin: matsim-org/matsim

lanes.addAll(l2la.getLanes().values());
Lane lane = lanes.get(0);
assertEquals(laneId3, lane.getId());
assertEquals(linkId1, lane.getToLinkIds().get(0));
assertEquals(45.0, lane.getStartsAtMeterFromLinkEnd(), EPSILON);
assertEquals(0.725, lane.getCapacityVehiclesPerHour(), EPSILON);
lane = lanes.get(1);
assertEquals(laneId5, lane.getId());
assertEquals(60.0, lane.getStartsAtMeterFromLinkEnd(), EPSILON);
assertEquals(2.5, lane.getNumberOfRepresentedLanes());
lanes.addAll(l2la.getLanes().values());
lane = lanes.get(0);
assertEquals(laneId1, lane.getId());
assertEquals(linkId1, lane.getToLinkIds().get(0));
assertEquals(45.0, lane.getStartsAtMeterFromLinkEnd(), EPSILON);
org.matsim.lanesLanegetId

Popular methods of Lane

  • getCapacityVehiclesPerHour
  • getStartsAtMeterFromLinkEnd
  • getToLinkIds
  • addToLaneId
  • addToLinkId
  • getAlignment
  • getNumberOfRepresentedLanes
  • setCapacityVehiclesPerHour
  • setNumberOfRepresentedLanes
  • setStartsAtMeterFromLinkEnd
  • getAttributes
  • getToLaneIds
  • getAttributes,
  • getToLaneIds,
  • setAlignment

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • startActivity (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now