本文整理汇总了C#中Landis.Landscape.ActiveSite类的典型用法代码示例。如果您正苦于以下问题:C# ActiveSite类的具体用法?C# ActiveSite怎么用?C# ActiveSite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActiveSite类属于Landis.Landscape命名空间,在下文中一共展示了ActiveSite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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]);
}
示例2: Do
//---------------------------------------------------------------------
public void Do(ActiveSite site)
{
foreach (ISpecies species in Model.Species) {
if (seedingAlgorithm.Seeds(species, site))
cohorts[site].AddNewCohort(species);
}
}
示例3: DurationBasedSize
public static List<Location> DurationBasedSize(ActiveSite site, double ROS)
{
List<Location> newFireList = new List<Location>(0);
newFireList.Add(site.Location); //Add ignition site first.
return newFireList;
}
示例4: AddNewCohort
//---------------------------------------------------------------------
public void AddNewCohort(ISpecies species,
ActiveSite site)
{
cohorts[site].AddNewCohort(species,
CohortBiomass.InitialBiomass(cohorts[site],
site, species));
}
示例5: Algorithm
public static bool Algorithm(ISpecies species,
ActiveSite site)
{
return Reproduction.SufficientLight(species, site) &&
Reproduction.Establish(species, site) &&
Reproduction.MaturePresent(species, site);
}
示例6: CheckForResprouting
//---------------------------------------------------------------------
/// <summary>
/// Records a species that should be checked for resprouting during
/// reproduction.
/// </summary>
/// <param name="cohort">
/// The cohort whose death triggered the current call to this method.
/// </param>
/// <param name="site">
/// The site where the cohort died.
/// </param>
/// <remarks>
/// If the cohort's age is within the species' age range for
/// resprouting, then the species will be have additional resprouting
/// criteria (light, probability) checked during reproduction.
/// </remarks>
public static void CheckForResprouting(AgeCohort.ICohort cohort,
ActiveSite site)
{
ISpecies species = cohort.Species;
if (species.MinSproutAge <= cohort.Age && cohort.Age <= species.MaxSproutAge)
resprout[site].Set(species.Index, true);
}
示例7: AddYearDeadFineRoots
//---------------------------------------------------------------------
/// <summary>
/// Adds yearly biomass addition to dead fine roots at a site.
/// Sums all species-cohort additions and adds as a single cohort.
/// </summary>
public static void AddYearDeadFineRoots(ActiveSite site)
{
double addMass = 0.0;
double addC = 0.0;
double addN = 0.0;
double addP = 0.0;
double addDecay = 0.0;
double addLimit = 0.0;
foreach (PoolD litter in SiteVars.DeadFineRootsAdd[site])
{
addMass += litter.Mass;
addC += litter.ContentC;
addN += litter.ContentN;
addP += litter.ContentP;
addDecay += (litter.DecayValue * litter.Mass); //weighted avg
addLimit += (litter.LimitValue * litter.Mass); //weighted avg
}
PoolD LitterAddition = new PoolD();
LitterAddition.Mass = addMass;
LitterAddition.ContentC = addC;
LitterAddition.ContentN = addN;
LitterAddition.ContentP = addP;
LitterAddition.DecayValue = addDecay / addMass;
LitterAddition.LimitValue = addLimit / addMass;
LitterAddition.InitialMass = addMass;
SiteVars.DeadFineRoots[site].Add(LitterAddition);
SiteVars.DeadFineRootsAdd[site].Clear();
SiteVars.DeadFineRootsAdd[site].TrimExcess();
}
示例8: AddNewCohort
//---------------------------------------------------------------------
public void AddNewCohort(ISpecies species,
ActiveSite site)
{
SiteVars.Cohorts[site].AddNewCohort(species,
CohortBiomass.InitialBiomass(species, SiteVars.Cohorts[site],
site));
}
示例9: GrowCohorts
//---------------------------------------------------------------------
/// <summary>
/// Grows all cohorts at a site for a specified number of years. The
/// dead pools at the site also decompose for the given time period.
/// </summary>
public static void GrowCohorts(SiteCohorts cohorts,
ActiveSite site,
int years,
bool isSuccessionTimestep)
{
if (SiteVars.Cohorts[site] == null)
return;
for (int y = 1; y <= years; ++y)
{
SpeciesData.ChangeDynamicParameters(Model.Core.CurrentTime + y - 1);
SiteVars.ResetAnnualValues(site);
CohortBiomass.SubYear = y - 1;
CohortBiomass.CanopyLightExtinction = 0.0;
// SiteVars.LAI[site] = 0.0;
SiteVars.PercentShade[site] = 0.0;
SiteVars.LightTrans[site] = 1.0;
SiteVars.Cohorts[site].Grow(site, (y == years && isSuccessionTimestep));
SiteVars.WoodyDebris[site].Decompose();
SiteVars.Litter[site].Decompose();
}
}
示例10: Algorithm
public static void Algorithm(//ISpecies species,
ActiveSite site)
{
return;//Reproduction.SufficientLight(species, site) &&
//Reproduction.Establish(species, site) &&
//Reproduction.MaturePresent(species, site);
}
示例11: 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;
}
示例12: SufficientLight
//---------------------------------------------------------------------
/// <summary>
/// Determines if there is sufficient light at a site for a species to
/// germinate/resprout.
/// </summary>
public static bool SufficientLight(ISpecies species,
ActiveSite site)
{
byte siteShade = SiteVars.Shade[site];
return (species.ShadeTolerance <= 4 && species.ShadeTolerance > siteShade) ||
(species.ShadeTolerance == 5 && siteShade > 1);
// pg 14, Model description, this ----------------^ may be 2?
}
示例13: Died
//---------------------------------------------------------------------
/// <summary>
/// Raises a Cohort.DeathEvent.
/// </summary>
public static void Died(object sender,
ICohort cohort,
ActiveSite site,
PlugInType disturbanceType)
{
if (DeathEvent != null)
DeathEvent(sender, new DeathEventArgs(cohort, site, disturbanceType));
}
示例14: Decompose
/// <summary>
/// Decomposes Sturctural Litter
/// </summary>
public static void Decompose(ActiveSite site)
{
SiteVars.SurfaceStructural[site].DecomposeStructural(site);
SiteVars.SurfaceMetabolic[site].DecomposeMetabolic(site);
SiteVars.SoilStructural[site].DecomposeStructural(site);
SiteVars.SoilMetabolic[site].DecomposeMetabolic(site);
}
示例15: Do
//---------------------------------------------------------------------
public void Do(ActiveSite site)
{
for (int i = 0; i < Model.Species.Count; i++) {
ISpecies species = Model.Species[i];
if (seedingAlgorithm(species, site))
Reproduction.AddNewCohort(species, site);
}
}