public new void SetValuesFromCatchment(Catchment c) { this.RetentionArea = c.BMPArea; // acres this.ContributingArea = c.PostArea - c.BMPArea; base.SetValuesFromCatchment(c); }
public void CloneWithNoGeometry() { var catchment = new Catchment(); var clone = (Catchment)catchment.Clone(); Assert.IsNotNull(clone); }
public new void SetValuesFromProject(BMPTrainsProject p, Catchment c) { this.HarvestEfficiency = c.RequiredNTreatmentEfficiency; this.ContributingArea = c.PostArea; // acres this.WatershedArea = c.PostArea - c.BMPArea; base.SetValuesFromProject(p, c); }
private bool Calculate() { TD = Common.getDouble(tbTD); Rate = Common.getDouble(tbRate); SelectedCatchment = GetSelectedCatchmentNumber(); if (SelectedCatchment != 0) { Catchment c = Globals.Project.getCatchment(SelectedCatchment); Mix = Common.getString(cbMixes); DCIA = c.PostDCIAPercent / 100 * (c.PostArea - c.BMPArea); PondArea = c.BMPArea; CN = c.PostNonDCIACurveNumber; PerviousArea = (100 - c.PostDCIAPercent) / 100 * (c.PostArea - PondArea); tbEIA.Enabled = false; CalculateEIA(); } else { EIA = Common.getDouble(tbEIA); } if (Rate == 0) { return(false); } //Filter = EIA * TD * 18.85 / Rate; Filter = EIA * TD * 9.425 / Rate; //if ((Mix == MediaMix.BnG_CTS12) || (Mix == MediaMix.BnG_CTS24) || (Mix == MediaMix.SAT)) Filter = EIA * TD * 181.185 / Rate; //if ((Mix == MediaMix.BnG_ECT) || (Mix == MediaMix.BnG_ECT3) || (Mix == MediaMix.BnG_OTE)) Filter = EIA * TD * 9.429 / Rate; return(true); }
public new void SetValuesFromCatchment(Catchment c) { PermanentPoolArea = c.BMPArea; WatershedArea = c.PostArea - c.BMPArea; ContributingArea = WatershedArea; base.SetValuesFromCatchment(c); }
public void SetValuesFromCatchment(Catchment c) { // Contribuing Area is calculated in classes that inherit from Storage this.CatchmentID = c.id; this.CatchmentName = c.CatchmentName; this.ContributingArea = c.PostArea - c.BMPArea; this.Rainfall = c.Rainfall; this.RainfallZone = c.RainfallZone; this.RationalCoefficient = c.PostRationalCoefficient; this.WatershedArea = c.PostArea; this.WatershedNDCIACurveNumber = c.PostNonDCIACurveNumber; this.WatershedDCIAPercent = c.PostDCIAPercent; this.RationalCoefficient = c.PostRationalCoefficient; this.RequiredNTreatmentEfficiency = c.RequiredNTreatmentEfficiency; this.RequiredPTreatmentEfficiency = c.RequiredPTreatmentEfficiency; this.DoGroundwaterAnalysis = c.DoGroundwaterAnalysis; this.BMPNMassLoadIn = c.PostNLoading; this.BMPPMassLoadIn = c.PostPLoading; this.RunoffVolume = c.PostRunoffVolume; this.BMPVolumeIn = c.PostRunoffVolume; this.AnalysisType = c.AnalysisType; this.TNEMC = c.PostNConcentration; this.TPEMC = c.PostPConcentration; }
public void CloneHydroNetworkWithLinkSources() { var network = HydroNetworkHelper.GetSnakeHydroNetwork(1); var catchment = new Catchment(); network.Catchments.Add(catchment); var wasteWaterTreatmentPlant = new WasteWaterTreatmentPlant(); network.WasteWaterTreatmentPlants.Add(wasteWaterTreatmentPlant); var lateral = new LateralSource(); network.Branches.First().BranchFeatures.Add(lateral); catchment.OutgoingLinks.Add(wasteWaterTreatmentPlant); catchment.OutgoingLinks.Add(lateral); wasteWaterTreatmentPlant.IncomingLinks.Add(catchment); lateral.IncomingLinks.Add(catchment); var clone = (HydroNetwork)network.Clone(); var links = TestReferenceHelper.SearchObjectInObjectGraph(catchment, clone); links.ForEach(Console.WriteLine); Assert.AreEqual(0, links.Count); Assert.AreEqual(2, clone.Catchments.First().OutgoingLinks.Count); Assert.AreEqual(1, clone.WasteWaterTreatmentPlants.First().IncomingLinks.Count); Assert.AreEqual(1, clone.LateralSources.First().IncomingLinks.Count); }
public new void SetValuesFromCatchment(Catchment c) { this.WatershedArea = c.PostArea; this.ContributingArea = c.PostArea; base.SetValuesFromCatchment(c); }
public new void SetValuesFromProject(BMPTrainsProject p, Catchment c) { this.WatershedArea = c.PostArea; this.ContributingArea = c.PostArea; base.SetValuesFromProject(p, c); }
public static DataTable FunctionalUnits(RiverSystemScenario scenario) { var result = new DataTable(); result.Columns.Add("Catchment", typeof(string)); scenario.Network.FunctionalUnitConfiguration.fuDefinitions.ForEachItem(fud => result.Columns.Add(fud.Name, typeof(double))); foreach (ICatchment ic in scenario.Network.Catchments) { Catchment c = ic as Catchment; if (c == null) { continue; } var row = result.NewRow(); row["Catchment"] = c.Name; c.FunctionalUnits.ForEachItem(fu => { row[fu.definition.Name] = fu.areaInSquareMeters; }); result.Rows.Add(row); } return(result); }
public void CopyFrom() { var catchment1 = new Catchment(); var catchment2 = new Catchment { Name = "Aapje", Geometry = new Polygon( new LinearRing(new ICoordinate[] { new Coordinate(10d, 10d), new Coordinate(20d, 10d), new Coordinate(15d, 15d), new Coordinate(10d, 10d) })), Description = "Komt uit de mouw", Network = new HydroNetwork() }; catchment2.Attributes.Add("gras", 15); catchment1.CopyFrom(catchment2); Assert.AreNotEqual(catchment1.Geometry, catchment2.Geometry); Assert.AreNotEqual(catchment1.Name, catchment2.Name); Assert.AreEqual(catchment1.Attributes, catchment2.Attributes); Assert.AreEqual(catchment1.Description, catchment2.Description); Assert.AreSame(catchment1.Network, catchment2.Network); Assert.AreNotSame(catchment1.Attributes, catchment2.Attributes); }
public async Task Add(Catchment catchment) { var geographyFactory = await this.GeometryFactoryProvider.GetGeometryFactoryAsync(); var catchmentEntity = catchment.ToEntityType(geographyFactory); await this.AddCatchmentEntity(catchmentEntity, catchment.Identity); }
public GeoJSONFeature(Catchment c, GEORegion region) { id = UriTemplates.Catchment.Replace("{catchmentId}", c.id.ToString()); properties.Add("name", c.Name); properties.Add(FeatureTypeProperty, "catchment"); properties.Add("link", c.DownstreamLink != null ? LinkURL(c.DownstreamLink) : null); properties.Add("areaInSquareMeters", c.characteristics.areaInSquareMeters); geometry = new GeoJSONGeometry(region); }
public new void SetValuesFromProject(BMPTrainsProject p, Catchment c) { // Do not update Contributing Area (use temp as done in base) double ca = ContributingArea; this.HarvestEfficiency = c.RequiredNTreatmentEfficiency; base.SetValuesFromProject(p, c); ContributingArea = ca; }
public void SetValuesFromProject(BMPTrainsProject p, Catchment c) { // Watershed Area is calculated in classes that inherit from Storage SetValuesFromCatchment(c); this.RequiredNTreatmentEfficiency = p.RequiredNTreatmentEfficiency; this.RequiredPTreatmentEfficiency = p.RequiredPTreatmentEfficiency; this.AnalysisType = p.AnalysisType; }
public PerviousPavement(Catchment c) : base(c) { BMPType = BMPTrainsProject.sPerviousPavement; PerviousPavements = new AvailablePerviousPavements(); for (int i = 0; i < PerviousPavements.NumberOfRows(); i++) { Thickness += "0.00\t"; } }
// Used as retention or detention public TreeWell(Catchment c) : base(c) { NumWells = 1; // Why do we set this to 1? //WellDepth = 0; //WellStorage = 0; //WellLength = 0; //WellWidth = 0; //RetentionDepth = 0; BMPType = BMPTrainsProject.sTreeWell; }
private Catchment GetCatchment() { SelectedCatchment = GetSelectedCatchmentNumber(); if (SelectedCatchment != 0) { Catchment c = Globals.Project.getCatchment(SelectedCatchment); return(c); } return(new Catchment()); }
public MultipleBMP(Catchment c) : base(c) { RetentionCount = 0; RunoffVolume = c.PostRunoffVolume; BMPType = BMPTrainsProject.sMultipleBMP; bmp1 = new BMP(c); bmp1.BMPType = c.BMP1; bmp2 = new BMP(c); bmp2.BMPType = c.BMP2; bmp3 = new BMP(c); bmp3.BMPType = c.BMP3; bmp4 = new BMP(c); bmp4.BMPType = c.BMP4; }
public void Clone() { var catchment = new Catchment(); catchment.Geometry = new Point(15d, 15d); var clone = (Catchment)catchment.Clone(); Assert.AreEqual(catchment.Geometry, clone.Geometry); Assert.AreNotSame(catchment.Geometry, clone.Geometry); Assert.AreEqual(catchment.Name, clone.Name); }
public void DefaultGeometryForLargeArea() { var catchment = new Catchment { IsGeometryDerivedFromAreaSize = true }; var expected = 9000; catchment.SetAreaSize(expected); Assert.AreEqual(expected, catchment.Geometry.Area, 0.01); Assert.AreEqual(expected, catchment.AreaSize, 0.01); }
private void cbTo_SelectedIndexChanged(object sender, EventArgs e) { try { SelectedCatchment = Convert.ToInt32(cbTo.SelectedValue); Catchment c = Globals.Project.getCatchment(SelectedCatchment); lblName.Text = c.CatchmentName; SetBMPs(); } catch { } }
public void DefaultGeometryForEmptyArea() { var catchment = new Catchment { IsGeometryDerivedFromAreaSize = true }; var expected = 0; catchment.SetAreaSize(expected); Assert.AreEqual(expected, catchment.Geometry.Area, 1.0); Assert.AreEqual(expected, catchment.AreaSize); }
public static void SetButtonColor(Catchment catchment, BMP bmp, System.Windows.Forms.Button btn) { System.Drawing.Color dColor = System.Drawing.Color.LightGreen; System.Drawing.Color bColor = System.Drawing.Color.LightGray; System.Drawing.Color sColor = System.Drawing.Color.LightCyan; setButtonColor(bmp.isDefined(), btn); if ((catchment.getSelectedBMP() == bmp) && bmp.isDefined()) { btn.BackColor = sColor; } }
public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, GeoJsonMultiPolygonJsonString geoJsonMultiPolygonJsonString) { var catchmentIdentity = CatchmentIdentity.New(); var catchment = new Catchment() { Identity = catchmentIdentity, Name = name, }; await repository.Add(geoJsonMultiPolygonJsonString, catchment); return(catchmentIdentity); }
public frmCompositeEMC(Catchment _c, bool pre = true, bool Nitrogen = true) { InitializeComponent(); EMCs = new double[maxRows]; CCNs = new double[maxRows]; areas = new double[maxRows]; Cs = new double[maxRows]; wC = new double[maxRows]; c = _c; preflag = pre; NitrogenFlag = Nitrogen; if (pre) { preString = "Pre-Development"; CCNs = XmlPropertyObject.AsDoubleArray(c.PreCompositeCN, maxRows); if (Nitrogen) { EMCs = XmlPropertyObject.AsDoubleArray(c.PreNCompositeEMC, maxRows); NString = "Total Nitrogen"; } else { EMCs = XmlPropertyObject.AsDoubleArray(c.PrePCompositeEMC, maxRows); NString = "Total Phosphorus"; } areas = XmlPropertyObject.AsDoubleArray(c.PreCompositeArea, maxRows); DCIA = c.PreDCIAPercent; } else { preString = "Post-Development"; CCNs = XmlPropertyObject.AsDoubleArray(c.PostCompositeCN, maxRows); if (Nitrogen) { EMCs = XmlPropertyObject.AsDoubleArray(c.PostNCompositeEMC, maxRows); NString = "Total Nitrogen"; } else { EMCs = XmlPropertyObject.AsDoubleArray(c.PostPCompositeEMC, maxRows); NString = "Total Phosphorus"; } areas = XmlPropertyObject.AsDoubleArray(c.PostCompositeArea, maxRows); DCIA = c.PostDCIAPercent; } }
public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, IEnumerable <LngLat> vertices) { var catchmentIdentity = CatchmentIdentity.New(); var catchment = new Catchment() { Identity = catchmentIdentity, Name = name, }; catchment.Boundary.AddRange(vertices); await repository.Add(catchment); return(catchmentIdentity); }
public BMP(Catchment c) { SetValuesFromCatchment(c); ReportType = sAllProperties; DoGroundwaterAnalysis = "Yes"; MediaMixType = MediaMix.NotSpecified; AnalysisType = c.AnalysisType; CatchmentID = c.id; CatchmentName = c.CatchmentName; if ((HelpURL == "") || (HelpURL == null)) { HelpURL = "http://stormwater.ucf.edu/"; } GroundwaterNTreatmentEfficiency = 0; GroundwaterPTreatmentEfficiency = 0; TNEMC = c.PostNConcentration; TPEMC = c.PostPConcentration; }
public void DisableLidReporting(Mike1DData mike1DData) { foreach (ICatchment icatchment in mike1DData.RainfallRunoffData.Catchments) { if (icatchment is Catchment) { Catchment catchment = icatchment as Catchment; foreach (IStormwaterLID lid in catchment.StormWaterLIDs) { LIDBase lidBase = lid as LIDBase; if (lidBase != null) { lidBase.ReportPath = null; } } } } }
private void DisplayCurrentRouting() { dataGridView1.Rows.Clear(); for (int i = 1; i <= Globals.Project.numCatchments; i++) { Catchment c = Globals.Project.getCatchment(i); dataGridView1.Rows.Add(new string[] { i.ToString(), c.routing.ToID.ToString(), Common.getString(c.PostArea, 2), c.getSelectedBMP().BMPType }); //dataGridView1.Rows.Add(new string[] { i.ToString(), // Globals.Project.getCatchment(i).routing.ToID.ToString(), // Common.getString(Globals.Project.Catchments[i].PostArea, 2), // Globals.Project.Catchments[i].SelectedBMPType }); } DataGridViewCellStyle sDisabled = new DataGridViewCellStyle(dataGridView1.DefaultCellStyle); sDisabled.BackColor = Color.Gray; DataGridViewCellStyle sEnabled = new DataGridViewCellStyle(dataGridView1.DefaultCellStyle); for (int i = 1; i <= Globals.Project.numCatchments; i++) { if (Globals.Project.getCatchment(i).Disabled) { dataGridView1.Rows[i - 1].Cells[0].Style = sDisabled; dataGridView1.Rows[i - 1].Cells[1].Style = sDisabled; dataGridView1.Rows[i - 1].Cells[2].Style = sDisabled; dataGridView1.Rows[i - 1].Cells[3].Style = sDisabled; } else { dataGridView1.Rows[i - 1].Cells[0].Style = sEnabled; dataGridView1.Rows[i - 1].Cells[1].Style = sEnabled; dataGridView1.Rows[i - 1].Cells[2].Style = sEnabled; dataGridView1.Rows[i - 1].Cells[3].Style = sEnabled; } } }
private static void InitialiseConstituentSources(RiverSystemScenario scenario, Catchment catchment, StandardFunctionalUnit fu, Constituent constituent) { ConstituentsManagement cm = scenario.Network.ConstituentsManagement; FunctionalUnitConstituentData model = cm.GetConstituentData<CatchmentElementConstituentData>(catchment).GetFunctionalUnitData(fu); ConstituentContainer constituentModel = model.ConstituentModels.SingleOrDefault(f => f.Constituent.Equals(constituent)); if (constituentModel == null) { constituentModel = new ConstituentContainer(constituent); model.ConstituentModels.Add(constituentModel); } if (constituentModel.ConstituentSources.Count > 0) return; var defaultConstituentSource = scenario.SystemConfiguration.ConstituentSources.First(cs => cs.IsDefault); constituentModel.ConstituentSources.Add(new ConstituentSourceContainer(defaultConstituentSource, new NilConstituent(), new PassThroughFilter())); }
public GeoJSONFeature(Catchment c,GEORegion region) { id = UriTemplates.Catchment.Replace("{catchmentId}", c.id.ToString()); properties.Add("name", c.Name); properties.Add(FeatureTypeProperty,"catchment"); properties.Add("link",LinkURL(c.DownstreamLink)); geometry = new GeoJSONGeometry(region); }