public void LoadLocationChoiceCache() { if (LocationChoiceData == null) { LocationChoiceData = new ZoneCache <LocationChoiceInformation>(GetFullPath(LocationChoiceModelWorkCache), DataToLCI); LocationChoiceHomeData = new ZoneCache <LocationChoiceInformation>(GetFullPath(LocationChoiceModelHomeCache), DataToLCI); } }
public void LoadLocationChoiceCache() { highestZone = this.TashaRuntime.ZoneSystem.ZoneArray.GetFlatData().Last().ZoneNumber; if (LocationChoiceData == null) { LocationChoiceData = new ZoneCache <LocationChoiceInformation>(this.GetFullPath(this.LocationChoiceModelWorkCache), DataToLCI); LocationChoiceHomeData = new ZoneCache <LocationChoiceInformation>(this.GetFullPath(this.LocationChoiceModelHomeCache), DataToLCI); } }
private static void CreateActivityData(string FileName) { if (ActivityData == null) { ActivityData = new ZoneCache <ActivityInformation>(FileName, delegate(int zone, float[] data) { ActivityInformation info; info.RetailActivityLevel = data[0]; info.OtherActivityLevel = data[1]; info.WorkActivityLevel = data[2]; return(info); }); } }
/// <summary> /// Called once by the Scheduler, loads the ability to read the distributions /// </summary> internal static void LoadDistributions(string fileName, SparseArray <IZone> zoneArray) { if (ActivityData == null) { if (!File.Exists(fileName)) { GenerateActivityLevels(fileName, zoneArray); } ActivityData = new ZoneCache <ActivityInformation>(fileName, convert); //(TashaConfiguration.GetInputFile(TashaConfiguration.GetDirectory("Scheduler"),"ActivityLevels"), // convert); } }
public void LoadData() { if (!LoadOnce || !Loaded) { InitEmpDataRange(); var cacheFileName = GetFullPath(ZoneCacheFile); if (CheckIfWeNeedToRegenerateCache(cacheFileName)) { Generate(); } using (var cache = new ZoneCache <IZone>(cacheFileName, ConvertToZone)) { AllZones = cache.StoreAll(); } ComputeDistances(); LoadReagions(); } }
public void LoadLocationChoiceCache() { highestZone = this.TashaRuntime.ZoneSystem.ZoneArray.GetFlatData().Last().ZoneNumber; if ( LocationChoiceData == null ) { LocationChoiceData = new ZoneCache<LocationChoiceInformation>( this.GetFullPath( this.LocationChoiceModelWorkCache ), DataToLCI ); LocationChoiceHomeData = new ZoneCache<LocationChoiceInformation>( this.GetFullPath( this.LocationChoiceModelHomeCache ), DataToLCI ); } }
public virtual Room MoveTo(Point roomCoordinates) { CurrentRoom = ZoneCache.MoveMobileEntityTo(this, roomCoordinates); return(CurrentRoom); }