Пример #1
0
 public void LoadLocationChoiceCache()
 {
     if (LocationChoiceData == null)
     {
         LocationChoiceData =
             new ZoneCache <LocationChoiceInformation>(GetFullPath(LocationChoiceModelWorkCache), DataToLCI);
         LocationChoiceHomeData =
             new ZoneCache <LocationChoiceInformation>(GetFullPath(LocationChoiceModelHomeCache), DataToLCI);
     }
 }
Пример #2
0
        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);
            }
        }
Пример #3
0
 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);
         });
     }
 }
Пример #4
0
        /// <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);
            }
        }
Пример #5
0
 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();
     }
 }
Пример #6
0
        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 );
            }
        }
Пример #7
0
 public virtual Room MoveTo(Point roomCoordinates)
 {
     CurrentRoom = ZoneCache.MoveMobileEntityTo(this, roomCoordinates);
     return(CurrentRoom);
 }