internal void AddTransitionSpatialInitiationMultiplier(TransitionSpatialInitiationMultiplier multiplier)
        {
            if (multiplier.TransitionMultiplierTypeId != this.m_TransitionMultiplierTypeId)
            {
                throw new ArgumentException("The transition multiplier type is not correct.");
            }

            this.m_TransitionSpatialInitiationMultipliers.Add(multiplier);
        }
        private double GetTransitionSpatialInitiationMultiplier(Cell cell, int transitionGroupId, int iteration, int timestep)
        {
            if (this.m_TransitionSpatialInitiationMultipliers.Count == 0)
            {
                return(1.0);
            }

            Debug.Assert(this.m_TransitionMultiplierTypes.Count > 0);

            double Product = 1.0;

            foreach (TransitionMultiplierType tmt in this.m_TransitionMultiplierTypes)
            {
                if (tmt.TransitionSpatialInitiationMultiplierMap != null)
                {
                    TransitionSpatialInitiationMultiplier tsmr = tmt.TransitionSpatialInitiationMultiplierMap.GetMultiplier(
                        transitionGroupId, iteration, timestep);

                    if (tsmr != null)
                    {
                        //Using a single instance of each uniquely named TSIM raster

                        Debug.Assert(this.m_TransitionSpatialInitiationMultiplierRasters.ContainsKey(tsmr.FileName));

                        if (this.m_TransitionSpatialInitiationMultiplierRasters.ContainsKey(tsmr.FileName))
                        {
                            StochasticTimeRaster rastMult = this.m_TransitionSpatialInitiationMultiplierRasters[tsmr.FileName];
                            double spatialMult            = rastMult.DblCells[cell.CollectionIndex];

                            //Test for NODATA_VALUE

                            if (spatialMult < 0.0 | MathUtils.CompareDoublesEqual(spatialMult, rastMult.NoDataValue, double.Epsilon))
                            {
                                spatialMult = 1.0;
                            }

                            Product *= spatialMult;
                        }
                    }
                }
            }

            return(Product);
        }