示例#1
0
 /**
  * Initilize from the tour.
  *
  * @param tour The tour.
  * @param outbound Outbound direction.
  */
 public void initializeFromTour(VisitorTour tour, boolean outbound) {
   // Note: mode is unknown
   if (outbound) {
     this.originMgra = tour.getOriginMGRA();
     this.destinationMgra = tour.getDestinationMGRA();
     this.originPurpose = -1;
     this.destinationPurpose = tour.getPurpose();
     this.period = (byte) tour.getDepartTime();
     this.inbound = false;
     this.firstTrip = true;
     this.lastTrip = false;
     this.originIsTourDestination = false;
     this.destinationIsTourDestination = true;
     this.bestWtwTapPairs = tour.getBestWtwTapPairsOut();
     this.bestDtwTapPairs = tour.getBestDtwTapPairsOut();
     this.bestWtdTapPairs = tour.getBestWtdTapPairsOut();
   } else {
     this.originMgra = tour.getDestinationMGRA();
     this.destinationMgra = tour.getOriginMGRA();
     this.originPurpose = tour.getPurpose();
     this.destinationPurpose = -1;
     this.period = (byte) tour.getArriveTime();
     this.inbound = true;
     this.firstTrip = false;
     this.lastTrip = true;
     this.originIsTourDestination = true;
     this.destinationIsTourDestination = false;
     this.bestWtwTapPairs = tour.getBestWtwTapPairsIn();
     this.bestDtwTapPairs = tour.getBestDtwTapPairsIn();
     this.bestWtdTapPairs = tour.getBestWtdTapPairsIn();
   }
 }