public MainModel() { //Console.Write("New Surrogate model"); Compartment.resetNumberOfCompartments(); raindata = new RainfallData(); this.output = new SmOutputCollection(); }
public MainModel() { //Console.Write("New Surrogate model"); Compartment.resetNumberOfCompartments(); FlowDivider.resetNumberOfFlowDividers(); raindata = new RainfallData(); this.output = new SmOutputCollection(); this.bIncludeWQ = false; }
public bool setIndividualRainData(string catchmentNode, double[] oneMinuteRainfallx) { //asdfasdfasfdasdf ikke tested endnu. bool success = false; if (lenghtOfRainfallData == 0) { lenghtOfRainfallData = oneMinuteRainfallx.Length; } else { if (lenghtOfRainfallData != oneMinuteRainfallx.Length) { throw new Exception("The various rainfall data do not have the same number of data points"); } } if (individualRainDatas == null) { individualRainDatas = new List <RainfallData>(); } RainfallData rainDatax = new RainfallData(); rainDatax.setRainData(oneMinuteRainfallx); individualRainDatas.Add((rainDatax)); foreach (var cat in catchments) { if (cat.node.name.Equals(catchmentNode)) { cat.setRainfallData(rainDatax); success = true; break; } } t = 0; return(success); }