Пример #1
0
        /// <summary>
        /// Set values for:
        ///     water level at outlet
        ///     discharges
        ///     property concentrations
        /// </summary>
        public void SetValues(string QuantityID, string ElementSetID, global::OpenMI.Standard.IValueSet values)
        {
            setValuesWatch.Start();

            if (QuantityID == qtdOutletLevel.ID)
            {
                double waterLevel = ((ScalarSet)values).data[0];
                mohidLandEngine.SetDownstreamWaterLevel(drainageNetworkInstanceID, waterLevel);
            }
            else if (QuantityID == qtdDischarges.ID)
            {
                ScalarSet flow       = (ScalarSet)values;
                double[]  flowValues = flow.data;
                mohidLandEngine.SetStormWaterModelFlow(runoffInstanceID, flow.Count, ref flowValues);
            }
            else if (QuantityID == qtdFlowFromStrom.ID)
            {
                ScalarSet flow       = (ScalarSet)values;
                double[]  flowvalues = flow.data;
                mohidLandEngine.SetStormWaterInflow(drainageNetworkInstanceID, flow.Count, ref flowvalues);
            }
            else //Concentration of properties
            {
                double concentration = ((ScalarSet)values).data[0];
                int    propertyID    = Convert.ToInt32(QuantityID);
                mohidLandEngine.SetDownStreamConcentration(drainageNetworkInstanceID, propertyID, concentration);
            }

            setValuesWatch.Stop();
        }