@Override public boolean isWantingToArriveOnCurrentLink() { // We need to call delegate, and not just check if next link is null // (as was done in the refactoring), because PersonDriverAgentImpl, // our usual delegate, does more than that. return delegate.isWantingToArriveOnCurrentLink(); }
private void handleMultiModalDeparture(double now, MobsimDriverAgent personAgent, Id linkId) { MultiModalQLinkExtension extension = simEngine.getMultiModalQLinkExtension(linkId); // if ((personAgent.getDestinationLinkId().equals(linkId)) && (personAgent.chooseNextLinkId() == null)) { if ((personAgent.getDestinationLinkId().equals(linkId)) && (personAgent.isWantingToArriveOnCurrentLink() )) { personAgent.endLegAndComputeNextState(now); this.simEngine.internalInterface.arrangeNextAgentState(personAgent); /* yyyy The "non-departure" should be caught in the framework. kai, dec'11 */ } else { extension.addDepartingAgent(personAgent, now); } } }
/** * Move as many waiting cars to the link as it is possible */ private void moveWaitToRoad() { while (!getWaitingList().isEmpty()) { if (!qlane.isAcceptingFromWait(this.getWaitingList().peek())) { return; } QVehicle veh = this.getWaitingList().poll(); double now = context.getSimTimer().getTimeOfDay() ; context.getEventsManager().processEvent( new VehicleEntersTrafficEvent(now, veh.getDriver().getId(), this.getLink().getId(), veh.getId(), veh.getDriver().getMode(), 1.0)); if ( this.getTransitQLink().addTransitToStopQueue(now, veh, this.getLink().getId()) ) { continue ; } if ( veh.getDriver().isWantingToArriveOnCurrentLink() ) { // If the driver wants to stop (again) on this link, give them a special treatment. // addFromWait doesn't work here, because after that, they cannot stop anymore. qlane.addTransitSlightlyUpstreamOfStop(veh) ; continue; } qlane.addFromWait(veh); } }
if ((link.getId().equals(driver.getDestinationLinkId())) && (driver.isWantingToArriveOnCurrentLink())) {
if (veh.getDriver().isWantingToArriveOnCurrentLink()) {
if ( driver.isWantingToArriveOnCurrentLink() ) { qLink.letVehicleArrive( veh );