Example #1
0
 public MainModel()
 {
     //Console.Write("New Surrogate model");
     Compartment.resetNumberOfCompartments();
     raindata    = new RainfallData();
     this.output = new SmOutputCollection();
 }
Example #2
0
 public MainModel()
 {
     //Console.Write("New Surrogate model");
     Compartment.resetNumberOfCompartments();
     FlowDivider.resetNumberOfFlowDividers();
     raindata        = new RainfallData();
     this.output     = new SmOutputCollection();
     this.bIncludeWQ = false;
 }
Example #3
0
        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);
        }