Package it.polito.appeal.traci

Examples of it.polito.appeal.traci.Lane


    assertFalse(routeBefore.equals(routeAfter));
  }
 
  @Test
  public void testGetShape() throws IOException {
    Lane lane = conn.getLaneRepository().getByID("beg_0");
    PathIterator it = lane.queryReadShape().get().getPathIterator(null);
    assertFalse(it.isDone());
    double[] coords = new double[2];
    assertEquals(PathIterator.SEG_MOVETO, it.currentSegment(coords));
    assertEquals0   , coords[0], DELTA);
    assertEquals( -1.65, coords[1], DELTA);
View Full Code Here


    assertTrue(it.isDone());
  }
 
  @Test
  public void testGetBelongingEdge() throws IOException {
    Lane lane = conn.getLaneRepository().getByID("beg_0");
    Edge edge = lane.queryReadParentEdge().get();
    assertEquals("beg", edge.getID());
  }
View Full Code Here

    assertEquals(newRoute, v.queryReadCurrentRoute().get());
  }
 
  @Test
  public void testLaneLinks() throws IOException {
    Lane begLane = conn.getLaneRepository().getByID("beg_0");
    List<Link> links = begLane.queryReadLinks().get();
    Set<String> linkIDs = new HashSet<String>();
    Set<String> intLinkIDs = new HashSet<String>();
    for (Link link : links) {
      linkIDs.add(link.getNextNonInternalLane().getID());
      intLinkIDs.add(link.getNextInternalLane().getID());
View Full Code Here

   *
   * @throws IOException
   */
  @Test
  public void testGetShape() throws IOException {
    Lane lane = conn.getLaneRepository().getByID("beg_0");
    PathIterator it = lane.getShape().getPathIterator(null);
    assertFalse(it.isDone());
    double[] coords = new double[2];
    assertEquals(PathIterator.SEG_MOVETO, it.currentSegment(coords));
    assertEquals0   , coords[0], DELTA);
    assertEquals( -1.65, coords[1], DELTA);
View Full Code Here

   *
   * @throws IOException
   */
  @Test
  public void testGetBelongingEdge() throws IOException {
    Lane lane = conn.getLaneRepository().getByID("beg_0");
    Edge edge = lane.getParentEdge();
    assertEquals("beg", edge.getID());
  }
View Full Code Here

   *
   * @throws IOException
   */
  @Test
  public void testLaneLinks() throws IOException {
    Lane begLane = conn.getLaneRepository().getByID("beg_0");
    List<Link> links = begLane.getLinks();
    Set<String> linkIDs = new HashSet<String>();
    Set<String> intLinkIDs = new HashSet<String>();
    for (Link link : links) {
      linkIDs.add(link.getNextNonInternalLane().getID());
      intLinkIDs.add(link.getNextInternalLane().getID());
View Full Code Here

TOP

Related Classes of it.polito.appeal.traci.Lane

Copyright © 2018 www.massapicom. 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.