当前位置: 首页>>代码示例>>C#>>正文


C# ISpecies类代码示例

本文整理汇总了C#中ISpecies的典型用法代码示例。如果您正苦于以下问题:C# ISpecies类的具体用法?C# ISpecies怎么用?C# ISpecies使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISpecies类属于命名空间,在下文中一共展示了ISpecies类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddFoliageLitter

        //---------------------------------------------------------------------
        /// <summary>
        /// Adds some biomass for a species to the foliar LITTER pools at a site.
        /// </summary>
        public static void AddFoliageLitter(double foliarBiomass, 
                                      ISpecies   species,
                                      ActiveSite site)
        {

            double inputDecayValue = 1.0;   // Decay value is calculated for surface/soil layers (leaf/fine root), 
                                            // therefore, this is just a dummy value.
                                            
            if(foliarBiomass > 0)
            {
                SiteVars.LitterfallC[site] += foliarBiomass * 0.47;
                
                LitterLayer.PartitionResidue(
                            foliarBiomass,
                            inputDecayValue,
                            SpeciesData.LeafCN[species],
                            SpeciesData.LeafLignin[species],
                            OtherData.StructuralCN,
                            LayerName.Leaf,
                            LayerType.Surface,
                            site);
            }


        }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-Century-Succession,代码行数:29,代码来源:ForestFloor.cs

示例2: Default

		//---------------------------------------------------------------------

		/// <summary>
		/// Default seed dispersal method.
		/// </summary>
		public static float Default(ISpecies   species,
		                            ActiveSite sourceSite,
		                            ActiveSite destinationSite)
		{
			// TODO - Based on Brendan Ward's thesis
			return 0.0f;
		}
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:12,代码来源:SeedDispersal.cs

示例3: ProbabilityComputer

			public ProbabilityComputer(ISpecies species)
			{
				effDist = species.EffectiveSeedDist;
				maxDist = species.MaxSeedDist;
				lambda1 = Math.Log((1-ratio)/effDist);
				lambda2 = Math.Log(0.01)/maxDist;
			}
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:7,代码来源:WardSeedDispersal.cs

示例4: AddNewCohort

 //---------------------------------------------------------------------
 public void AddNewCohort(ISpecies   species,
     ActiveSite site)
 {
     cohorts[site].AddNewCohort(species,
                                CohortBiomass.InitialBiomass(cohorts[site],
                                                             site, species));
 }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:8,代码来源:PlugIn.cs

示例5: Algorithm

 public static bool Algorithm(ISpecies   species,
     ActiveSite site)
 {
     return Reproduction.SufficientLight(species, site) &&
            Reproduction.Establish(species, site) &&
            Reproduction.MaturePresent(species, site);
 }
开发者ID:LANDIS-II-Foundation,项目名称:Library-Succession,代码行数:7,代码来源:NoDispersal.cs

示例6: GetFWater

 public static float GetFWater(ISpecies species, float pressurehead)
 {
     if (pressurehead < 0 || pressurehead > species.H4()) return 0;
     else if (pressurehead > species.H3()) return 1 - ((pressurehead - species.H3()) / (species.H4() - species.H3()));
     else if (pressurehead < species.H2()) return pressurehead / species.H2();
     else return 1;
 }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:7,代码来源:SubCanopyLayer.cs

示例7: SpeciesCohorts

        //---------------------------------------------------------------------

        /// <summary>
        /// Initializes a new instance with one young cohort (age = 1).
        /// </summary>
        public SpeciesCohorts(ISpecies species)
        {
            this.species = species;
            this.ages = new List<ushort>();
            this.isMaturePresent = false;
            AddNewCohort();
        }
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:12,代码来源:SpeciesCohorts.cs

示例8: AddFrassLitter

        //---------------------------------------------------------------------
        /// <summary>
        /// Adds frass for a species to the foliar LITTER pools at a site.
        /// Assumes that some of the N has been resorbed.
        /// </summary>
        public static void AddFrassLitter(double inputFrassBiomass, ISpecies species, ActiveSite site)
        {
            double inputDecayValue = 1.0;   // Decay value is calculated for surface/soil layers (leaf/fine root),
            // therefore, this is just a dummy value.

            if (inputFrassBiomass > 0)
            {
                //SiteVars.LitterfallC[site] += defoliatedLeafBiomass * 0.47;

                //double frassBiomass = Math.Max(0.0, OtherData.frassdepk * defoliatedLeafBiomass);
                // Frass C added is a function of defoliated leaf biomass, but adjusted for the CN of litter and frass
                // Any C lost is due to insect metabolism
                double inputFrassC = inputFrassBiomass * 0.47;
                double inputFrassN = inputFrassC / (double) SpeciesData.LeafLitterCN[species];
                double actualFrassC = inputFrassN * (double) OtherData.CNratiofrass;  // the difference between input and actual is C lost to insect metabolism
                double actualFrassBiomass = actualFrassC / 0.47;

                //PlugIn.ModelCore.UI.WriteLine("AddFrass.Month={0:0}, inputfrassN={1:0.000}, inputfrassbiomass={2:0.00}, actualfrassbiomass={3:0.00} ", Century.Month, inputFrassN, inputFrassBiomass, actualFrassBiomass);

                SiteVars.FrassC[site] += actualFrassC;

                LitterLayer.PartitionResidue(
                            actualFrassBiomass,
                            inputDecayValue,
                            OtherData.CNratiofrass,
                            0.1,
                            OtherData.StructuralCN,
                            LayerName.Leaf,
                            LayerType.Surface,
                            site);
            }
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Succession,代码行数:37,代码来源:ForestFloor.cs

示例9: InitialBiomass

        //---------------------------------------------------------------------
        /// <summary>
        /// Computes the initial biomass for a cohort at a site.
        /// </summary>
        public static float[] InitialBiomass(ISpecies species, ISiteCohorts siteCohorts,
            ActiveSite  site)
        {
            IEcoregion ecoregion = PlugIn.ModelCore.Ecoregion[site];

            double leafFrac = FunctionalType.Table[SpeciesData.FuncType[species]].FCFRACleaf;

            double B_ACT = SiteVars.ActualSiteBiomass(site);
            double B_MAX = SpeciesData.B_MAX_Spp[species][ecoregion];

            //  Initial biomass exponentially declines in response to
            //  competition.
            double initialBiomass = 0.002 * B_MAX * Math.Exp(-1.6 * B_ACT / B_MAX);

            initialBiomass = Math.Max(initialBiomass, 5.0);

            double initialLeafB = initialBiomass * leafFrac;
            double initialWoodB = initialBiomass - initialLeafB;
            double[] initialB = new double[2]{initialWoodB, initialLeafB};
            float[] initialWoodLeafBiomass = new float[2] { (float)initialB[0], (float)initialB[1] };

            //PlugIn.ModelCore.UI.WriteLine("Yr={0},Mo={1}, InitialB={2:0.0}, InitBleaf={3:0.00}, InitBwood={4:0.00}. LeafFrac={5:0.0}", PlugIn.ModelCore.CurrentTime, month, initialBiomass, initialB[1], initialB[0], leafFrac);
            //PlugIn.ModelCore.UI.WriteLine("Yr={0},Mo={1}, B_MAX={2:0.0}, B_ACT={3:0.00}", PlugIn.ModelCore.CurrentTime, month, B_MAX, B_ACT);

            return initialWoodLeafBiomass;
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:30,代码来源:CohortBiomass.cs

示例10: AddFrassLitter

        //---------------------------------------------------------------------
        /// <summary>
        /// Adds frass for a species to the foliar LITTER pools at a site.
        /// Assumes that some of the N has been resorbed.
        /// </summary>
        public static void AddFrassLitter(double defoliatedLeafBiomass, ISpecies species, ActiveSite site)
        {
            double inputDecayValue = 1.0;   // Decay value is calculated for surface/soil layers (leaf/fine root),
            // therefore, this is just a dummy value.

            if (defoliatedLeafBiomass > 0)
            {
                SiteVars.LitterfallC[site] += defoliatedLeafBiomass * 0.47;

                double frassBiomass = Math.Max(0.0, OtherData.frassdepk * defoliatedLeafBiomass);
                double frassBiomassC = frassBiomass * 0.47;

                SiteVars.FrassC[site] += frassBiomassC;

                LitterLayer.PartitionResidue(
                            frassBiomass,
                            inputDecayValue,
                            OtherData.CNratiofrass,
                            1.0,
                            1.0,
                            //OtherData.CNratiofrass,
                            LayerName.Leaf,
                            LayerType.Surface,
                            site);
            }
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:31,代码来源:ForestFloor.cs

示例11: InitialBiomass

        //---------------------------------------------------------------------
        /// <summary>
        /// Computes the initial biomass for a cohort at a site.
        /// </summary>
        public static float[] InitialBiomass(ISpecies species, ISiteCohorts siteCohorts,
            ActiveSite  site)
        {
            IEcoregion ecoregion = PlugIn.ModelCore.Ecoregion[site];

            double leafFrac = FunctionalType.Table[SpeciesData.FuncType[species]].FCFRACleaf;
            double branchFraction = FunctionalType.Table[SpeciesData.FuncType[species]].FCFRACbranch;
            //double Ndemand = 0.0;

            double B_ACT = SiteVars.ActualSiteBiomass(site);
            double B_MAX = SpeciesData.B_MAX_Spp[species][ecoregion];

            //  Initial biomass exponentially declines in response to
            //  competition.
            double initialBiomass = 0.002 * B_MAX *
                                    Math.Exp(-1.6 * B_ACT / B_MAX);

            //Initial biomass is limited by nitrogen availability.
            //initialBiomass *= SpeciesData.NLimits[species];
            initialBiomass = Math.Max(initialBiomass, 5.0);

            double initialLeafB = initialBiomass * leafFrac;
            double initialBranchB = initialBiomass* branchFraction;
            double initialWoodB = initialBiomass*(1 - leafFrac - branchFraction);
            double[] initialB = new double[3] { initialWoodB, initialBranchB, initialLeafB };

            //PlugIn.ModelCore.Log.WriteLine("Yr={0},Mo={1}, InitialB={2:0.0}, InitBleaf={3:0.00}, InitBwood={4:0.00}. LeafFrac={5:0.0}", PlugIn.ModelCore.CurrentTime, month, initialBiomass, initialB[1], initialB[0], leafFrac);
            //PlugIn.ModelCore.Log.WriteLine("Yr={0},Mo={1}, B_MAX={2:0.0}, B_ACT={3:0.00}", PlugIn.ModelCore.CurrentTime, month, B_MAX, B_ACT);

               float[] initialWoodLeafBiomass = new float[3] { (float)initialB[0], (float)initialB[1], (float)initialB[2] }; //wang?

            return initialWoodLeafBiomass;
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:37,代码来源:CohortBiomass.cs

示例12: MyAddNewCohort

        //---------------------------------------------------------------------

        public static void MyAddNewCohort(ISpecies   species,
                                          ActiveSite site)
        {
            Assert.IsTrue(speciesThatReproduce.Contains(species));
            Assert.AreEqual(expectedSite, site);
            actualSpecies_AddNewCohort.Add(species);
        }
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:9,代码来源:Reproduction_Test.cs

示例13: Calculate_Establishment

        public static double Calculate_Establishment(ISpecies Species, float PAR, float PressureHead)
        {
            double frad = Math.Pow(SubCanopyLayer.CumputeFrad(PAR, Species.HalfSat()), Species.EstRad());
            double fwater = Math.Pow(SubCanopyLayer.GetFWater(Species, PressureHead), Species.EstMoist());

            return frad * fwater;
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:7,代码来源:EstablishmentProbability.cs

示例14: ReproductionEvent

 public ReproductionEvent(ILocation location, int generation, Type reproductionType, ISpecies mate, params ISpecies[] children)
     : base(location, generation)
 {
     this.Mate = mate;
     this.Offspring = new List<ISpecies>(children);
     this.ReproductionType = reproductionType;
 }
开发者ID:andrewanderson,项目名称:Web-Critters,代码行数:7,代码来源:ReproductionEvent.cs

示例15: AddWoody

 /// <summary>
 /// Adds some biomass for a species to the WOODY pools at a site.
 /// </summary>
 public static void AddWoody(double     woodyBiomass,
     ISpecies   species,
     ActiveSite site)
 {
     SiteVars.WoodyDebris[site].AddMass(woodyBiomass,
                             SpeciesData.WoodyDebrisDecay[species]);
 }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:10,代码来源:ForestFloor.cs


注:本文中的ISpecies类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。