Exemplo n.º 1
0
        /// <summary>
        /// Get values for:
        ///     flow at outlet
        ///     concentrations at outlet
        ///     ponded water column
        /// </summary>
        public IValueSet GetValues(string QuantityID, string ElementSetID)
        {
            getValuesWatch.Start();

            double[] returnValues;

            if (QuantityID == qtdOutflow.ID)
            {
                returnValues    = new double[1];
                returnValues[0] = mohidLandEngine.GetOutletFlow(drainageNetworkInstanceID);
            }
            else if (QuantityID == qtdWaterColumn.ID)
            {
                returnValues = new double[numberOfWaterPoints];
                mohidLandEngine.GetPondedWaterColumn(runoffInstanceID, numberOfWaterPoints, ref returnValues);
            }
            else if (QuantityID == qtdFlowToStorm.ID)
            {
                int numberOfOutflowNodes = mohidLandEngine.GetNumberOfStormWaterOutFlowNodes(drainageNetworkInstanceID);
                returnValues = new double[numberOfOutflowNodes];
                mohidLandEngine.GetStormWaterOutflow(drainageNetworkInstanceID, numberOfOutflowNodes, ref returnValues);
            }
            else //Concentration of properties
            {
                returnValues = new double[1];

                int propertyID = Convert.ToInt32(QuantityID);

                returnValues[0] = mohidLandEngine.GetOutletFlowConcentration(drainageNetworkInstanceID, propertyID);
            }

            ScalarSet values = new ScalarSet(returnValues);

            getValuesWatch.Stop();

            return(values);
        }