示例#1
0
        public bool PlantingEstablish(ISpecies species, ActiveSite site)
        {
            IEcoregion ecoregion            = PlugIn.ModelCore.Ecoregion[site];
            double     establishProbability = Establishment_probability_Attributes.get_probability(species.Name, ecoregion.Name, PlugIn.ModelCore.TimeSinceStart);

            return(establishProbability > 0.0);
        }
示例#2
0
        //Returns the probability of reproduction of the given species on the land unit.
        //Species is referrenced by number.
        public float probRepro(int index_in)
        {
            if (index_in <= species_Attrs.NumAttrs && index_in > 0)
            {
                //return probReproduction[index_in - 1];
                return(Establishment_probability_Attributes.get_probability(species_Attrs[index_in].Name, name, PlugIn.ModelCore.TimeSinceStart));
            }
            throw new Exception("LANDUNIT::probRepro(int)-> Array bounds error.");

            // return 0.0f;
        }
示例#3
0
        //Returns the probability of reproduction of the given species on the land unit.
        //Species is referrenced by species attribute class.
        public float probRepro(speciesattr species_attr)
        {
            uint specAtNum = species_Attrs.NumAttrs;

            try
            {
                return(Establishment_probability_Attributes.get_probability(species_attr.Name, this.Name, PlugIn.ModelCore.TimeSinceStart));
            }
            //for (int i = 0; i < specAtNum; ++i)
            //{
            //    if (species_Attrs[i + 1].Name == species_attr.Name)
            //        return probReproduction[i];
            //}
            catch {
                throw new Exception("LANDUNIT::probRepro(SPECIESATTR*)-> Illegal spec. attr.");
            }
            // return 0.0f;
        }
示例#4
0
 public bool Establish(ISpecies species, ActiveSite site)
 {
     return(PlugIn.ModelCore.GenerateUniform() < Establishment_probability_Attributes.get_probability(species.Name, PlugIn.ModelCore.Ecoregion[site].Name, PlugIn.ModelCore.TimeSinceStart));
 }
示例#5
0
 public void set_probReproduction(int index, float value)
 {
     Establishment_probability_Attributes.set_probability(name, species_Attrs[index + 1].Name, PlugIn.ModelCore.TimeSinceStart, value);
     //probReproduction[index] = value;
 }
示例#6
0
 public float get_probReproduction(int index)
 {
     return(Establishment_probability_Attributes.get_probability(species_Attrs[index + 1].Name, name, PlugIn.ModelCore.TimeSinceStart));
     //return probReproduction[index];
 }