Пример #1
0
        public ChoiceProbabilityCalculator.Alternative RunNested(IPersonWrapper person, IParcelWrapper originParcel, IParcelWrapper destinationParcel, int destinationArrivalTime, int destinationDepartureTime, int householdCars)
        {
            if (person == null)
            {
                throw new ArgumentNullException("person");
            }

            ITourWrapper tour = _creator.CreateWrapper(person, null, originParcel, destinationParcel, destinationArrivalTime, destinationDepartureTime, Global.Settings.Purposes.School);

            return(RunNested(tour, destinationParcel, householdCars, 0.0));
        }
Пример #2
0
        //MBADD runnested
        public ChoiceProbabilityCalculator.Alternative RunNested(PersonWrapper person, IParcelWrapper originParcel, IParcelWrapper destinationParcel, int destinationArrivalTime, int destinationDepartureTime, int householdCars, double transitDiscountFraction, int purpose)
        {
            if (person == null)
            {
                throw new ArgumentNullException("person");
            }

            TourWrapper tour = (TourWrapper)_creator.CreateWrapper(person, null, originParcel, destinationParcel, destinationArrivalTime, destinationDepartureTime, purpose);

            return(RunNested(tour, destinationParcel, householdCars, transitDiscountFraction));
        }
Пример #3
0
        //MBADD runnested
        public ChoiceProbabilityCalculator.Alternative RunNested(IPersonWrapper person, IParcelWrapper originParcel, IParcelWrapper destinationParcel, int destinationArrivalTime, int destinationDepartureTime, int householdCars, double constrainedTransitDiscountFraction)
        {
            if (person == null)
            {
                throw new ArgumentNullException("person");
            }

            var tour = _creator.CreateWrapper(person, null, originParcel, destinationParcel, destinationArrivalTime, destinationDepartureTime, Global.Settings.Purposes.Work);

            return(RunNested(tour, destinationParcel, householdCars, constrainedTransitDiscountFraction));
        }
Пример #4
0
        private ITourWrapper CreateTour(int originAddressType, int originParcelId, int originZoneKey, int purpose)
        {
            var model = _tourCreator.CreateModel();

            model.Id                       = _personDay.Id * 10 + GetNextTourSequence();
            model.PersonId                 = _personDay.PersonId;
            model.PersonDayId              = _personDay.Id;
            model.HouseholdId              = _personDay.HouseholdId;
            model.PersonSequence           = _personDay.PersonSequence;
            model.Day                      = _personDay.Day;
            model.Sequence                 = GetCurrentTourSequence();
            model.OriginAddressType        = originAddressType;
            model.OriginParcelId           = originParcelId;
            model.OriginZoneKey            = originZoneKey;
            model.OriginDepartureTime      = 180;
            model.DestinationArrivalTime   = 180;
            model.DestinationDepartureTime = 180;
            model.OriginArrivalTime        = 180;
            model.DestinationPurpose       = purpose;
            model.PathType                 = 1;
            model.ExpansionFactor          = Household.ExpansionFactor;

            return(_tourCreator.CreateWrapper(model, this, purpose, false));
        }