public void Start() { ZoneSystem.LoadData(); ActivityDistribution.LoadDistributions(ActivityLevels, ZoneSystem.ZoneArray); //G = office //M = Manufacturing //S = Retail //P = Professional char[] separators = { ',' }; string[] BGP = BGPString.Split(separators); string[] BMP = BMPString.Split(separators); string[] BSP = BSPString.Split(separators); string[] BPP = BPPString.Split(separators); string[] MAP = MAPString.Split(separators); string[] MBP = MBPString.Split(separators); string[] MOP = MOPString.Split(separators); string[] MMP = MMPString.Split(separators); string[][] workParams = { BGP, BMP, BSP, BPP }; float[,] parArray = new float[4, 7]; float[,] parArray2 = new float[4, 19]; ///////////////////////////WORK PARAMS///////////////////////// for (int i = 0; i < workParams.Length; i++) { if (i <= 1) { for (int j = 0; j <= 6; j++) { parArray[i, j] = float.Parse(workParams[i][j]); } } else { for (int j = 0; j <= 5; j++) { parArray[i, j] = float.Parse(workParams[i][j]); } } } /////////////////////////////HOMEPARAMS////////////////// for (int j = 0; j < 5; j++) { parArray2[0, j] = float.Parse(MAP[j]); parArray2[2, j] = float.Parse(MOP[j]); } for (int j = 0; j < 6; j++) { parArray2[1, j] = float.Parse(MBP[j]); } for (int j = 0; j < MMP.Length; j++) { parArray2[3, j] = float.Parse(MMP[j]); } parArray2[3, 16] = MMMaxDist1; parArray2[3, 17] = MMMaxDist2; parArray2[3, 18] = MMMaxDist3; IZone[] flatZones = ZoneSystem.ZoneArray.GetFlatData(); BuildLocationChoiceCache(parArray, flatZones); BuildLocationChoiceCacheHome(parArray2, flatZones); ZoneSystem.UnloadData(); }
/// <summary> /// Loads all of the scheduler distributions /// </summary> private void LoadDistributions() { ActivityDistribution.LoadDistributions(this.ActivityLevelsLocal, this.TashaRuntime.ZoneSystem.ZoneArray); Distribution.InitializeDistributions(); }