Esempio n. 1
0
        public static Dictionary <string, object> GetPeakZoneGroupGains(BuildingData BuildingData, TSDZoneArray TSDZoneArray, List <ZoneDataGroup> ZoneDataGroups)
        {
            List <string> aValues = new List <string>();

            foreach (ZoneDataGroup aZoneDataGroup in ZoneDataGroups)
            {
                string aValue = ZoneDataGroup.Name(aZoneDataGroup);
                foreach (ZoneData aZoneData in ZoneDataGroup.GetZonesData(aZoneDataGroup))
                {
                    aValue += ":" + ZoneData.GUID(aZoneData);
                }

                aValues.Add(aValue);
            }

            object[,] aResults = BuildingData.pBuildingData.GetPeakZoneGroupGains(aValues.ToArray(), new TSDZoneArray[] { TSDZoneArray }) as object[, ];
            List <List <object> > aListList = new List <List <object> >();

            for (int i = 0; i < aResults.GetLength(0); i++)
            {
                List <object> aList = new List <object>();
                for (int j = 0; j < aResults.GetLength(1); j++)
                {
                    aList.Add(aResults[i, j]);
                }
                aListList.Add(aList);
            }

            return(new Dictionary <string, object>
            {
                { "ZoneDataGroupNames", aListList[0] },
                { "Gains", aListList[1] },
                { "Indexes", aListList[2] }
            });
        }
Esempio n. 2
0
        /// <summary>
        /// Get Peak Zone Group Gain
        /// </summary>
        /// <param name="BuildingData">TSD Building Data</param>
        /// <param name="TSDZoneArray">TSD Zone Array</param>
        /// <param name="ZonesData">TSD Zones Data</param>
        /// <returns name="Values">Values</returns>
        /// <search>
        /// TAS, TSDDocument, TSDDocument, BuildingData, tas, tsddocument, tsddocument, GetPeakZoneGroupGain, Get Peak Zone Group Gain
        /// </search>
        public static float GetPeakZoneGroupGain(BuildingData BuildingData, TSDZoneArray TSDZoneArray, IEnumerable <ZoneData> ZonesData)
        {
            string[] aGuids = new string[ZonesData.Count()];
            for (int i = 0; i < aGuids.Length; i++)
            {
                aGuids[i] = ZoneData.GUID(ZonesData.ElementAt(i));
            }

            return(BuildingData.pBuildingData.GetPeakZoneGroupGain(aGuids, new TSDZoneArray[] { TSDZoneArray }));
        }
Esempio n. 3
0
        /// <summary>
        /// Get Peak Zone Group Gain
        /// </summary>
        /// <param name="BuildingData">TSD Building Data</param>
        /// <param name="TSDZoneArray">TSD Zone Array</param>
        /// <param name="ZoneDataGroup">TSD Zone Data Group</param>
        /// <returns name="Values">Values</returns>
        /// <search>
        /// TAS, TSDDocument, TSDDocument, BuildingData, tas, tsddocument, tsddocument, GetPeakZoneGroupGain, Get Peak Zone Group Gain
        /// </search>
        public static float GetPeakZoneGroupGain(BuildingData BuildingData, TSDZoneArray TSDZoneArray, ZoneDataGroup ZoneDataGroup)
        {
            List <ZoneData> aZoneDataList = ZoneDataGroup.GetZonesData(ZoneDataGroup);

            return(BuildingData.pBuildingData.GetPeakZoneGroupGain(aZoneDataList.ConvertAll(x => ZoneData.GUID(x)).ToArray(), new TSDZoneArray[] { TSDZoneArray }));
        }