private double GetFlowSpatialMultiplier(
            Cell cell,
            FlowSpatialMultiplierMap map,
            int flowGroupId,
            int iteration,
            int timestep)
        {
            Debug.Assert(this.m_IsSpatial);
            Debug.Assert(this.m_FlowSpatialMultipliers.Count > 0);

            FlowSpatialMultiplier m = map.GetFlowSpatialMultiplier(flowGroupId, iteration, timestep);

            if (m == null)
            {
                return(1.0);
            }

            if (!this.m_FlowSpatialMultiplierRasters.ContainsKey(m.FileName))
            {
                return(1.0);
            }

            StochasticTimeRaster raster = this.m_FlowSpatialMultiplierRasters[m.FileName];
            double v = raster.DblCells[cell.CollectionIndex];

            if (MathUtils.CompareDoublesEqual(v, raster.NoDataValue, double.Epsilon))
            {
                return(1.0);
            }
            else
            {
                return(v);
            }
        }
Ejemplo n.º 2
0
        internal void CreateSpatialFlowMultiplierMap()
        {
            if (this.m_FlowSpatialMultipliers.Count > 0)
            {
                Debug.Assert(this.m_FlowSpatialMultiplierMap == null);

                this.m_FlowSpatialMultiplierMap = new FlowSpatialMultiplierMap(
                    this.m_Scenario, this.m_FlowSpatialMultipliers);
            }
        }
Ejemplo n.º 3
0
 internal void ClearFlowSpatialMultiplierMap()
 {
     this.m_FlowSpatialMultipliers.Clear();
     this.m_FlowSpatialMultiplierMap = null;
 }