public void Init() { Species.DatasetParser speciesParser = new Species.DatasetParser(); reader = OpenFile("Species.txt"); try { speciesDataset = speciesParser.Parse(reader); } finally { reader.Close(); } parser = new ParametersParser(speciesDataset, startTime, endTime); }
//--------------------------------------------------------------------- public static void Initialize(double[,] establishProbabilities, SeedingAlgorithm seedingAlgorithm, AddNewCohortMethod addNewCohort) { Reproduction.establishProbabilities = establishProbabilities; seeding = new Seeding(seedingAlgorithm); Reproduction.addNewCohort = addNewCohort; cohorts = Model.GetSuccession<AgeCohort.ICohort>().Cohorts; speciesDataset = Model.Species; int speciesCount = speciesDataset.Count; resprout = Model.Landscape.NewSiteVar<BitArray>(); serotiny = Model.Landscape.NewSiteVar<BitArray>(); foreach (ActiveSite site in Model.Landscape.ActiveSites) { resprout[site] = new BitArray(speciesCount); serotiny[site] = new BitArray(speciesCount); } }
//--------------------------------------------------------------------- public static void Initialize(double[,] establishProbabilities, SeedingAlgorithm seedingAlgorithm, AddNewCohortMethod addNewCohort) { Reproduction.establishProbabilities = establishProbabilities; seeding = new Seeding(seedingAlgorithm); Reproduction.addNewCohort = addNewCohort; cohorts = Model.Core.SuccessionCohorts as AgeCohort.ILandscapeCohorts; if (cohorts == null) throw new ApplicationException("The succession plug-in's cohorts don't support age-cohort interface"); speciesDataset = Model.Core.Species; int speciesCount = speciesDataset.Count; resprout = Model.Core.Landscape.NewSiteVar<BitArray>(); serotiny = Model.Core.Landscape.NewSiteVar<BitArray>(); foreach (ActiveSite site in Model.Core.Landscape.ActiveSites) { resprout[site] = new BitArray(speciesCount); serotiny[site] = new BitArray(speciesCount); } }
//--------------------------------------------------------------------- static FormOfReproduction() { speciesDataset = Model.Core.Species; }
//--------------------------------------------------------------------- public static void Initialize(double[,] establishProbabilities, SeedingAlgorithm seedingAlgorithm, Delegates.AddNewCohort addNewCohort) { Reproduction.establishProbabilities = establishProbabilities; seeding = new Seeding(seedingAlgorithm); Reproduction.addNewCohort = addNewCohort; cohorts = Model.Core.SuccessionCohorts as AgeCohort.ILandscapeCohorts; if (cohorts == null) throw new ApplicationException("The succession plug-in's cohorts don't support age-cohort interface"); speciesDataset = Model.Core.Species; int speciesCount = speciesDataset.Count; resprout = Model.Core.Landscape.NewSiteVar<BitArray>(); serotiny = Model.Core.Landscape.NewSiteVar<BitArray>(); foreach (ActiveSite site in Model.Core.Landscape.ActiveSites) { resprout[site] = new BitArray(speciesCount); serotiny[site] = new BitArray(speciesCount); } planting = new Planting(); trySeeding = new BlockRowBuffer<bool>(Model.Core.Landscape); hasSeeded = new BlockRowBuffer<BitArray>(Model.Core.Landscape); for (int col = 1; col <= hasSeeded.Columns; col++) { hasSeeded[col] = new BitArray(speciesCount); } }