Exemplo n.º 1
0
  private void moveVehicleFromInlinkToAbort(
      final QVehicle veh, final QInternalI fromLane, final double now) {
    fromLane.popFirstVehicle();

    // first treat the passengers:
    for (PassengerAgent pp : veh.getPassengers()) {
      if (pp instanceof MobsimAgent) {
        ((MobsimAgent) pp).setStateToAbort(now);
        network.simEngine.internalInterface.arrangeNextAgentState((MobsimAgent) pp);
      } else if (wrnCnt < 1) {
        wrnCnt++;
        log.warn(
            "encountering PassengerAgent that cannot be cast into a MobsimAgent; cannot say if this is a problem");
        log.warn(Gbl.ONLYONCE);
      }
    }

    // now treat the driver:
    veh.getDriver().setStateToAbort(now);
    network.simEngine.internalInterface.arrangeNextAgentState(veh.getDriver());
  }
Exemplo n.º 2
0
 private static void moveVehicleFromInlinkToOutlink(
     final QVehicle veh, final QInternalI fromLane, QLinkInternalI nextQueueLink) {
   fromLane.popFirstVehicle();
   veh.getDriver().notifyMoveOverNode(nextQueueLink.getLink().getId());
   nextQueueLink.addFromUpstream(veh);
 }