LaemmerSignal(SignalGroup signalGroup) { this.group = signalGroup; // calculate outflow capacity once (in reality one also has to initialize this value and cannot update it every second) for (Signal signal : group.getSignals().values()) { if (signal.getLaneIds() != null && !signal.getLaneIds().isEmpty() && lanes.getLanesToLinkAssignments().get(signal.getLinkId()).getLanes().size() > 1) { for (Id<Lane> laneId : signal.getLaneIds()) { double laneOutflow = lanes.getLanesToLinkAssignments().get(signal.getLinkId()).getLanes() .get(laneId).getCapacityVehiclesPerHour() * config.qsim().getFlowCapFactor() / 3600; laneOutflowCapacitiesPerS.put(laneId, laneOutflow); signalOutflowCapacityPerS += laneOutflow; } } else { double linkOutflowPerS = network.getLinks().get(signal.getLinkId()).getCapacity() * config.qsim().getFlowCapFactor() / 3600; linkOutflowCapacitiesPerS.put(signal.getLinkId(), linkOutflowPerS); signalOutflowCapacityPerS += linkOutflowPerS; } } }
builder.setLength(lane.getLength()); builder.setEffectiveNumberOfLanes(lane.getLaneData().getNumberOfRepresentedLanes()); builder.setFlowCapacity_s(lane.getLaneData().getCapacityVehiclesPerHour() / 3600.); QLaneI queue = builder.createLane(this);
capacity.setVehiclesPerHour(bl.getCapacityVehiclesPerHour()); xmllane.setCapacity(capacity);
assertEquals(45.0, lane.getStartsAtMeterFromLinkEnd(), EPSILON); assertEquals(1.0, lane.getNumberOfRepresentedLanes()); 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()); assertEquals(2, lane.getCapacityVehiclesPerHour(), EPSILON); assertEquals(linkId1, lane.getToLinkIds().get(0)); assertEquals(45.0, lane.getStartsAtMeterFromLinkEnd(), EPSILON); assertEquals(1900.0, lane.getCapacityVehiclesPerHour(), EPSILON); assertEquals(1.0, lane.getNumberOfRepresentedLanes());