예제 #1
0
        public PersonDayWrapper(IPersonDay personDay, IPersonWrapper personWrapper, IHouseholdDayWrapper householdDayWrapper)
        {
            _personDay = personDay;

            _exporter =
                Global
                .Kernel
                .Get <IPersistenceFactory <IPersonDay> >()
                .Exporter;

            // person day fields

            _personDayCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IPersonDayCreator> >()
                .Creator;

            // tour fields

            _tourReader =
                Global
                .Kernel
                .Get <IPersistenceFactory <ITour> >()
                .Reader;

            _tourCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <ITourCreator> >()
                .Creator;

            // relations properties

            Household    = personWrapper.Household;
            Person       = personWrapper;
            HouseholdDay = householdDayWrapper;

            // domain model properies

            SetExpansionFactor();

            // flags/choice model/etc. properties

            TimeWindow = new TimeWindow();
        }
예제 #2
0
        public HouseholdDayWrapper(IHouseholdDay householdDay, IHouseholdWrapper householdWrapper)
        {
            _householdDay = householdDay;

            _exporter =
                Global
                .Kernel
                .Get <IPersistenceFactory <IHouseholdDay> >()
                .Exporter;

            // household day fields

            _householdDayCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IHouseholdDayCreator> >()
                .Creator;

            // person day fields

            _personDayReader =
                Global
                .Kernel
                .Get <IPersistenceFactory <IPersonDay> >()
                .Reader;

            _personDayCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IPersonDayCreator> >()
                .Creator;

            // joint tour fields

            _jointTourReader =
                Global
                .Kernel
                .Get <IPersistenceFactory <IJointTour> >()
                .Reader;

            _jointTourCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IJointTourCreator> >()
                .Creator;

            // full half tour fields

            _fullHalfTourReader =
                Global
                .Kernel
                .Get <IPersistenceFactory <IFullHalfTour> >()
                .Reader;

            _fullHalfTourCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IFullHalfTourCreator> >()
                .Creator;

            // partial half tour fields

            _partialHalfTourReader =
                Global
                .Kernel
                .Get <IPersistenceFactory <IPartialHalfTour> >()
                .Reader;

            _partialHalfTourCreator =
                Global
                .Kernel
                .Get <IWrapperFactory <IPartialHalfTourCreator> >()
                .Creator;

            // relations properties

            Household = householdWrapper;

            SetPersonDays();

            // domain model properies

            SetExpansionFactor();

            if (!Global.Settings.UseJointTours)
            {
                return;
            }

            SetJointTours();
            SetFullHalfTours();
            SetPartialHalfTours();
        }