@Override public boolean doSimStep() { double now = context.getSimTimer().getTimeOfDay() ; boolean lanesActive = false; boolean movedWaitToRoad = false; if ( context.qsimConfig.isInsertingWaitingVehiclesBeforeDrivingVehicles() ) { //TODO //Because moveBufferToNextLane() (called from moveLanes()) is kind of "moveInternalNodes()", //it should be executed before moveWaitToRoad() to keep the sequence fully consistent. //The sequence is broken only if isInsertingWaitingVehiclesBeforeDrivingVehicles==true. //Currently, the buffer of the accepting lane gets emptied after moveWaitToRoad(), //which gives preference to already driving vehicles //michalm, jan'17 this.moveWaitToRoad(now); this.getTransitQLink().handleTransitVehiclesInStopQueue(now); lanesActive = this.moveLanes(); } else { this.getTransitQLink().handleTransitVehiclesInStopQueue(now); lanesActive = this.moveLanes(); movedWaitToRoad = this.moveWaitToRoad(now); } this.setActive(lanesActive || movedWaitToRoad || (!this.getWaitingList().isEmpty()) || !this.getTransitQLink().getTransitVehicleStopQueue().isEmpty()); return this.isActive(); }