public HouseholdWrapper(IHousehold household) { _household = household; _exporter = Global .Kernel .Get <IPersistenceFactory <IHousehold> >() .Exporter; // person fields _personReader = Global .Kernel .Get <IPersistenceFactory <IPerson> >() .Reader; _personCreator = Global .Kernel .Get <IWrapperFactory <IPersonCreator> >() .Creator; // household day fields _householdDayReader = Global .Kernel .Get <IPersistenceFactory <IHouseholdDay> >() .Reader; _householdDayCreator = Global .Kernel .Get <IWrapperFactory <IHouseholdDayCreator> >() .Creator; RandomUtility = new RandomUtility(); }
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(); }