//--------------------------------------------------------------------- /// <summary> /// Initializes the instance and its associated site variables. /// </summary> protected void Initialize(ICore modelCore, SeedingAlgorithms seedAlg) { Model.Core = modelCore; SiteVars.Initialize(); Seeding.InitializeMaxSeedNeighborhood(); disturbedSites = new DisturbedSiteEnumerator(Model.Core.Landscape, SiteVars.Disturbed); SeedingAlgorithm algorithm; switch (seedAlg) { case SeedingAlgorithms.NoDispersal: algorithm = NoDispersal.Algorithm; break; case SeedingAlgorithms.UniversalDispersal: algorithm = UniversalDispersal.Algorithm; break; case SeedingAlgorithms.WardSeedDispersal: algorithm = WardSeedDispersal.Algorithm; break; default: throw new ArgumentException(string.Format("Unknown seeding algorithm: {0}", seedAlg)); } Reproduction.Initialize(algorithm); }
//--------------------------------------------------------------------- /// <summary> /// Initializes the instance and its associated site variables. /// </summary> protected void Initialize(PlugIns.ICore modelCore, double[,] establishProbabilities, SeedingAlgorithms seedAlg, Reproduction.Delegates.AddNewCohort addNewCohort) { Model.Core = modelCore; SiteVars.Initialize(); Seeding.InitializeMaxSeedNeighborhood(); disturbedSites = new DisturbedSiteEnumerator(Model.Core.Landscape, SiteVars.Disturbed); SeedingAlgorithm algorithm; switch (seedAlg) { case SeedingAlgorithms.NoDispersal: algorithm = NoDispersal.Algorithm; break; case SeedingAlgorithms.UniversalDispersal: algorithm = UniversalDispersal.Algorithm; break; case SeedingAlgorithms.WardSeedDispersal: algorithm = WardSeedDispersal.Algorithm; break; default: throw new ArgumentException(string.Format("Unknown seeding algorithm: {0}", seedAlg)); } Reproduction.Initialize(establishProbabilities, algorithm, addNewCohort == null ? null : new Reproduction.Delegates.AddNewCohort(addNewCohort)); }
//--------------------------------------------------------------------- /// <summary> /// Initializes the instance and its associated site variables. /// </summary> protected void Initialize(ICore modelCore, SeedingAlgorithms seedAlg)//, //Reproduction.Delegates.AddNewCohort addNewCohort) { Model.Core = modelCore; SiteVars.Initialize(); Seeding.InitializeMaxSeedNeighborhood(); disturbedSites = new DisturbedSiteEnumerator(Model.Core.Landscape, SiteVars.Disturbed); SeedingAlgorithm algorithm = SeedingAlgorithmsUtil.GetAlgorithm(seedAlg, Timestep); Reproduction.Initialize(algorithm); }