Esempio n. 1
0
 /**
  * Ensures that the capacities of the lanes are correctly calculated by the fixture, i.e. the
  * lanes1.1 to lanes2.0 conversion works as expected.
  *
  * @author dgrether
  */
 @Test
 public void testFixture() {
   LaneDefinitions20 lanes = this.fixture.sc.getLanes();
   Assert.assertNotNull(lanes);
   Assert.assertNotNull(lanes.getLanesToLinkAssignments());
   LanesToLinkAssignment20 lanesLink1 = lanes.getLanesToLinkAssignments().get(fixture.id1);
   Assert.assertNotNull(lanesLink1);
   Assert.assertEquals(2, lanesLink1.getLanes().size());
   Lane lane1ol = lanesLink1.getLanes().get(fixture.link1FirstLaneId);
   Assert.assertNotNull(lane1ol);
   Assert.assertEquals(100.1, lane1ol.getStartsAtMeterFromLinkEnd(), testUtils.EPSILON);
   Assert.assertEquals(7200.0, lane1ol.getCapacityVehiclesPerHour(), testUtils.EPSILON);
   Assert.assertEquals(2.0, lane1ol.getNumberOfRepresentedLanes(), testUtils.EPSILON);
   Assert.assertEquals(fixture.laneId1, lane1ol.getToLaneIds().get(0));
   Assert.assertNull(lane1ol.getToLinkIds());
   Lane lane1 = lanesLink1.getLanes().get(fixture.laneId1);
   Assert.assertNotNull(lane1);
   Assert.assertEquals(50.0, lane1.getStartsAtMeterFromLinkEnd(), testUtils.EPSILON);
   Assert.assertEquals(7200.0, lane1.getCapacityVehiclesPerHour(), testUtils.EPSILON);
   Assert.assertEquals(2.0, lane1.getNumberOfRepresentedLanes(), testUtils.EPSILON);
   Assert.assertEquals(2, lane1.getToLinkIds().size());
   Assert.assertNull(lane1.getToLaneIds());
 }