示例#1
0
        public static List <IDFFile.BuildingConstruction> GenerateRandomConstruction(IDFFile.ProbabilisticBuildingConstruction pConstruction, int numsamples, Random r)
        {
            List <IDFFile.BuildingConstruction> constructions = new List <IDFFile.BuildingConstruction>();

            for (int i = 0; i < numsamples; i++)
            {
                constructions.Add(new IDFFile.BuildingConstruction()
                {
                    uWall        = GetRandom(pConstruction.uWall, r),
                    uGFloor      = GetRandom(pConstruction.uGFloor, r),
                    uRoof        = GetRandom(pConstruction.uRoof, r),
                    uWindow      = GetRandom(pConstruction.uWindow, r),
                    gWindow      = GetRandom(pConstruction.gWindow, r),
                    uIWall       = GetRandom(pConstruction.uIWall, r),
                    uIFloor      = GetRandom(pConstruction.uIFloor, r),
                    hcSlab       = GetRandom(pConstruction.hcSlab, r),
                    infiltration = GetRandom(pConstruction.infiltration, r),
                });
            }
            return(constructions);
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            epLoc      = EPLoc.Text;
            weatherLoc = weLoc.Text;

            numFloors           = (int)number.Value;
            numSamples          = (int)sampleCount.Value;
            pWindowConstruction = new IDFFile.ProbabilisticWWR()
            {
                north = GetMinMax(wWR1_mean, wWR1_var),
                east  = GetMinMax(wWR2_mean, wWR2_var),
                south = GetMinMax(wWR3_mean, wWR3_var),
                west  = GetMinMax(wWR4_mean, wWR4_var)
            };

            pBuildingConstruction = new IDFFile.ProbabilisticBuildingConstruction
            {
                uWall        = GetMinMax(uWall_mean, uWall_var),
                uGFloor      = GetMinMax(uGFloor_mean, uGFloor_var),
                uRoof        = GetMinMax(uRoof_mean, uRoof_var),
                uIFloor      = GetMinMax(uIFloor_Mean, uIFloor_var),
                uIWall       = GetMinMax(uWall_mean, uWall_var),
                uWindow      = GetMinMax(uWindow_mean, uWindow_var),
                gWindow      = GetMinMax(gWindow_mean, gWindow_var),
                hcSlab       = GetMinMax(HCFloor_mean, HCFloor_var),
                infiltration = GetMinMax(vent_mean, vent_var)
            };

            pBuildingOperation = new IDFFile.ProbabilisticBuildingOperation()
            {
                boilerEfficiency = GetMinMax(bEffMean, bEffVar),
                chillerCOP       = GetMinMax(CCOPMean, CCOPVar),

                operatingHours   = GetMinMax(oPH_mean, oPH_var),
                internalHeatGain = GetMinMax(iHG_mean, iHG_var)
            };
            this.Close();
        }