示例#1
0
        //
        // 10.25.17 das what is RAY doing here? Why are we adding only two of the building types?
        //
        void SetupCommunityModel()
        {
            BuildList = DWDM.BuildTypeList;

            {
                BuildingType BT = BuildList.FindByCode("LSF");
                if (BT != null)
                {
                    DenverHouseholdData  DHD  = new DenverHouseholdData("LSF2.5_50", "LSF", "Low Single Family 2.5 Persons per Household 50 gallons Indoor GPCCD", "LSF", 2.5, 350, 50, BT.GallonsPerSqFtPervious, BT.DwellinUnitsPerAcre);
                    HouseHoldWaterDemand HHWD = DHD.NewHousehold();
                    //double units = 350 / 2.5;

                    //HouseHoldWaterDemand HHWD = new HouseHoldWaterDemand(BT, 2.5, units, 50);
                    DWDM.WaterDemandAgents.Add(HHWD);

                    BT = BuildList.FindByCode("HMF");
                    //units = 350 / 2.0;
                    if (BT != null)
                    {
                        DHD  = new DenverHouseholdData("HMF2.0_50", "HMF", "High Density2.0 Persons per Household 50 gallons Indoor GPCCD", "HMF", 2.0, 350, 50, BT.GallonsPerSqFtPervious, BT.DwellinUnitsPerAcre);
                        HHWD = DHD.NewHousehold();
                        //HHWD = new HouseHoldWaterDemand(BT, 2.0, units, 50);
                        DWDM.WaterDemandAgents.Add(HHWD);
                    }
                }
            }
            DWDM.Run();
            listBox1.Items.Clear();
            listBox1.Items.Add(DWDM.WaterDemandAgents.ToFieldHeaderString("CSV"));
            listBox1.Items.Add(DWDM.WaterDemandAgents.ToString("CSV"));
        }
示例#2
0
        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string Filename = openFileDialog1.FileName;
                BTDM = new BuildingTypeWaterDemandModel(Filename);

                BuildList = new BuildingTypeList(Filename);
                SetupCommunityModel();
                displayValues();
            }
        }