本文整理汇总了C#中ISiteVar类的典型用法代码示例。如果您正苦于以下问题:C# ISiteVar类的具体用法?C# ISiteVar怎么用?C# ISiteVar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISiteVar类属于命名空间,在下文中一共展示了ISiteVar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Initialize
//private static ISiteVar<Landis.Library.Biomass.Species.AuxParm<double>> defoliation; // Defoliation per site per species
//---------------------------------------------------------------------
public static void Initialize()
{
//defoliation = PlugIn.ModelCore.Landscape.NewSiteVar<Landis.Library.Biomass.Species.AuxParm<double>>();
outbreakVariables = PlugIn.ModelCore.Landscape.NewSiteVar<Outbreak>();
timeOfLastEvent = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
//biomassRemoved = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
//initialOutbreakProb = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.BiomassCohorts");
if (cohorts == null)
{
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.LeafBiomassCohorts");
}
cohortsPartiallyDamaged = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
//SiteVars.InitialOutbreakProb.ActiveSiteValues = 0.0;
//Initialize outbreaks:
foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
{
SiteVars.OutbreakVars = null;
}
if (cohorts == null)
{
string mesg = string.Format("Cohorts are empty. Please double-check that this extension is compatible with your chosen succession extension.");
throw new System.ApplicationException(mesg);
}
//PlugIn.ModelCore.RegisterSiteVar(defoliation, "Insect.Defoliation");
}
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:39,代码来源:SiteVars.cs
示例2: Initialize
//private static BaseCohortsSiteVar baseCohortsSiteVar;
//---------------------------------------------------------------------
public static void Initialize()
{
cohorts = PlugIn.ModelCore.Landscape.NewSiteVar<SiteCohorts>();
ISiteVar<Landis.Library.AgeOnlyCohorts.ISiteCohorts> baseCohorts = Landis.Library.Succession.CohortSiteVar<Landis.Library.AgeOnlyCohorts.ISiteCohorts>.Wrap(cohorts);
PlugIn.ModelCore.RegisterSiteVar(baseCohorts, "Succession.AgeCohorts");
}
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:10,代码来源:SiteVars.cs
示例3: Initialize
//private static ISiteVar<Library.AgeOnlyCohorts.SiteCohorts> baseCohorts;
//private static BaseCohortsSiteVar baseCohortsSiteVar;
//---------------------------------------------------------------------
public static void Initialize()
{
cohorts = PlugIn.ModelCore.Landscape.NewSiteVar<ISiteCohorts>();
//baseCohortsSiteVar = new BaseCohortsSiteVar(cohorts);
//PlugIn.ModelCore.RegisterSiteVar(baseCohortsSiteVar, "Succession.AgeOnlyCohorts");
PlugIn.ModelCore.RegisterSiteVar(cohorts, "Succession.AgeCohorts");
}
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:11,代码来源:SiteVars.cs
示例4: AverageSiteVar
public static float AverageSiteVar(ISiteVar<float> sitevar)
{
float total = 0;
float n = 0;
foreach (ActiveSite s in PlugIn.ModelCore.Landscape)
{
float v = sitevar[s];
total += v;
n++;
}
return total / n;
}
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:12,代码来源:OverallOutputs.cs
示例5: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
outbreakVariables = Model.Core.Landscape.NewSiteVar<Outbreak>();
timeOfLastEvent = Model.Core.Landscape.NewSiteVar<int>();
biomassRemoved = Model.Core.Landscape.NewSiteVar<int>();
neighborhoodDefoliation = Model.Core.Landscape.NewSiteVar<double>();
initialOutbreakProb = Model.Core.Landscape.NewSiteVar<double>();
//Model.Core.RegisterSiteVar(SiteVars.DefoliationByYear, "Insect.GrowthReduction");
Model.Core.GetSiteVar(SiteVars.WoodyDebris, "Succession.WoodyDebris");
SiteVars.NeighborhoodDefoliation.ActiveSiteValues = 0.0;
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
SiteVars.InitialOutbreakProb.ActiveSiteValues = 0.0;
//SiteVars.SumLastDefoliation.ActiveSiteValues = 0.0;
//SiteVars.Disturbed.ActiveSiteValues = false;
//Initialize outbreaks:
foreach (ActiveSite site in Model.Core.Landscape)
{
SiteVars.OutbreakVars = null; //new Outbreak();
//SiteVars.DefoliationByYear[site] = new Dictionary<int, double>();
}
}
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:28,代码来源:SiteVars.cs
示例6: Initialize
//---------------------------------------------------------------------
public static void Initialize(ILandscapeCohorts cohorts)
{
//eventVar = Model.Core.Landscape.NewSiteVar<Epidemic>(InactiveSiteMode.DistinctValues);
timeOfLastBDA = Model.Core.Landscape.NewSiteVar<int>();
neighborResourceDom = Model.Core.Landscape.NewSiteVar<double>();
siteResourceDomMod = Model.Core.Landscape.NewSiteVar<double>();
siteResourceDom = Model.Core.Landscape.NewSiteVar<double>();
vulnerability = Model.Core.Landscape.NewSiteVar<double>();
disturbed = Model.Core.Landscape.NewSiteVar<bool>();
//numberCFSconifersKilled = Model.Core.Landscape.NewSiteVar<int[]>();
numberCFSconifersKilled = Model.Core.Landscape.NewSiteVar<Dictionary<int,int>>();
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
SiteVars.NeighborResourceDom.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDomMod.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDom.ActiveSiteValues = 0.0;
SiteVars.Vulnerability.ActiveSiteValues = 0.0;
foreach(ActiveSite site in Model.Core.Landscape)
//SiteVars.NumberCFSconifersKilled[site] = new int[Model.Core.EndTime - Model.Core.StartTime + 1];
SiteVars.NumberCFSconifersKilled[site] = new Dictionary<int, int>();
// Added for v1.1 to enable interactions with CFS fuels extension.
Model.Core.RegisterSiteVar(SiteVars.NumberCFSconifersKilled, "BDA.NumCFSConifers");
Model.Core.RegisterSiteVar(SiteVars.TimeOfLastEvent, "BDA.TimeOfLastEvent");
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:29,代码来源:SiteVars.cs
示例7: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
eventVar = Model.Core.Landscape.NewSiteVar<Event>(InactiveSiteMode.DistinctValues);
timeOfLastEvent = Model.Core.Landscape.NewSiteVar<int>();
severity = Model.Core.Landscape.NewSiteVar<byte>();
disturbed = Model.Core.Landscape.NewSiteVar<bool>();
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:9,代码来源:SiteVars.cs
示例8: Initialize
//---------------------------------------------------------------------
public static void Initialize(ICore modelCore)
{
timeOfLastBDA = modelCore.Landscape.NewSiteVar<int>();
neighborResourceDom = modelCore.Landscape.NewSiteVar<double>();
siteResourceDomMod = modelCore.Landscape.NewSiteVar<double>();
siteResourceDom = modelCore.Landscape.NewSiteVar<double>();
vulnerability = modelCore.Landscape.NewSiteVar<double>();
disturbed = modelCore.Landscape.NewSiteVar<bool>();
numberCFSconifersKilled = modelCore.Landscape.NewSiteVar<Dictionary<int, int>>();
timeOfNext = modelCore.Landscape.NewSiteVar<int>();
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
SiteVars.NeighborResourceDom.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDomMod.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDom.ActiveSiteValues = 0.0;
SiteVars.Vulnerability.ActiveSiteValues = 0.0;
SiteVars.TimeOfNext.ActiveSiteValues = 9999;
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.AgeCohorts");
foreach (ActiveSite site in modelCore.Landscape)
SiteVars.NumberCFSconifersKilled[site] = new Dictionary<int, int>();
// Added for v1.1 to enable interactions with CFS fuels extension.
modelCore.RegisterSiteVar(SiteVars.NumberCFSconifersKilled, "BDA.NumCFSConifers");
modelCore.RegisterSiteVar(SiteVars.TimeOfLastEvent, "BDA.TimeOfLastEvent");
//foreach (IAgent activeAgent in manyAgentParameters)
//{
// string varName = activeAgent.AgentName + ".TimeToNext";
// modelCore.RegisterSiteVar(SiteVars.TimeToNext, varName);
//}
modelCore.RegisterSiteVar(SiteVars.TimeOfNext, "BDA.TimeOfNext");
}
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:37,代码来源:SiteVars.cs
示例9: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
mgmtAreas = Model.Core.Landscape.NewSiteVar<ManagementArea>();
stands = Model.Core.Landscape.NewSiteVar<Stand>();
prescriptions = Model.Core.Landscape.NewSiteVar<Prescription>();
cohortsKilled = Model.Core.Landscape.NewSiteVar<int>();
}
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:9,代码来源:SiteVars.cs
示例10: Initialize
//---------------------------------------------------------------------
public static void Initialize(ICore modelCore)
{
landUse = modelCore.Landscape.NewSiteVar<LandUse>();
allowHarvest = new AllowHarvestSiteVar();
Model.Core.RegisterSiteVar(allowHarvest, "LandUse.AllowHarvest");
Landis.Library.BiomassHarvest.SiteVars.CohortsPartiallyDamaged = modelCore.Landscape.NewSiteVar<int>();
}
开发者ID:LANDIS-II-Foundation,项目名称:Extension-Land-Use-Change,代码行数:8,代码来源:SiteVars.cs
示例11: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
outbreakVariables = PlugIn.ModelCore.Landscape.NewSiteVar<Outbreak>();
timeOfLastEvent = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
biomassRemoved = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
//neighborhoodDefoliation = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
initialOutbreakProb = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.BiomassCohorts");
cohortsPartiallyDamaged = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
insectName = PlugIn.ModelCore.Landscape.NewSiteVar<string>();
//SiteVars.NeighborhoodDefoliation.ActiveSiteValues = 0.0;
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
SiteVars.InitialOutbreakProb.ActiveSiteValues = 0.0;
SiteVars.InsectName.ActiveSiteValues = "";
//Initialize outbreaks:
foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
{
SiteVars.OutbreakVars = null; //new Outbreak();
}
if (cohorts == null)
{
string mesg = string.Format("Cohorts are empty. Please double-check that this extension is compatible with your chosen succession extension.");
throw new System.ApplicationException(mesg);
}
PlugIn.ModelCore.RegisterSiteVar(SiteVars.TimeOfLastEvent, "BiomassInsects.TimeOfLastEvent");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.InsectName, "BiomassInsects.InsectName");
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:34,代码来源:SiteVars.cs
示例12: Initialize
//---------------------------------------------------------------------
public static void Initialize(ICore modelCore)
{
timeOfLastBDA = modelCore.Landscape.NewSiteVar<int>();
neighborResourceDom = modelCore.Landscape.NewSiteVar<double>();
siteResourceDomMod = modelCore.Landscape.NewSiteVar<double>();
siteResourceDom = modelCore.Landscape.NewSiteVar<double>();
vulnerability = modelCore.Landscape.NewSiteVar<double>();
disturbed = modelCore.Landscape.NewSiteVar<bool>();
numberCFSconifersKilled = modelCore.Landscape.NewSiteVar<Dictionary<int, int>>();
timeOfNext = modelCore.Landscape.NewSiteVar<int>();
agentName = modelCore.Landscape.NewSiteVar<string>();
biomassInsectsAgent = modelCore.Landscape.NewSiteVar<string>();
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
SiteVars.NeighborResourceDom.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDomMod.ActiveSiteValues = 0.0;
SiteVars.SiteResourceDom.ActiveSiteValues = 0.0;
SiteVars.Vulnerability.ActiveSiteValues = 0.0;
SiteVars.TimeOfNext.ActiveSiteValues = 9999;
SiteVars.AgentName.ActiveSiteValues = "";
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.AgeCohorts");
foreach(ActiveSite site in modelCore.Landscape)
SiteVars.NumberCFSconifersKilled[site] = new Dictionary<int, int>();
// Added for v1.1 to enable interactions with CFS fuels extension.
modelCore.RegisterSiteVar(SiteVars.NumberCFSconifersKilled, "BDA.NumCFSConifers");
modelCore.RegisterSiteVar(SiteVars.TimeOfLastEvent, "BDA.TimeOfLastEvent");
modelCore.RegisterSiteVar(SiteVars.AgentName, "BDA.AgentName");
// Added to enable interactions with other extensions (Presalvage harvest)
modelCore.RegisterSiteVar(SiteVars.TimeOfNext, "BDA.TimeOfNext");
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:37,代码来源:SiteVars.cs
示例13: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
fuelType = Model.Core.Landscape.NewSiteVar<int>();
decidFuelType = Model.Core.Landscape.NewSiteVar<int>();
percentConifer = Model.Core.Landscape.NewSiteVar<int>();
percentHardwood = Model.Core.Landscape.NewSiteVar<int>();
percentDeadFir = Model.Core.Landscape.NewSiteVar<int>();
timeOfLastHarvest = Model.Core.GetSiteVar<int>("Harvest.TimeOfLastEvent");
harvestPrescriptionName = Model.Core.GetSiteVar<string>("Harvest.PrescriptionName");
harvestCohortsKilled = Model.Core.GetSiteVar<int>("Harvest.CohortsDamaged");
timeOfLastFire = Model.Core.GetSiteVar<int>("Fire.TimeOfLastEvent");
fireSeverity = Model.Core.GetSiteVar<byte>("Fire.Severity");
timeOfLastWind = Model.Core.GetSiteVar<int>("Wind.TimeOfLastEvent");
windSeverity = Model.Core.GetSiteVar<byte>("Wind.Severity");
numberDeadFirCohorts = Model.Core.GetSiteVar<Dictionary<int,int>>("BDA.NumCFSConifers");
Model.Core.RegisterSiteVar(SiteVars.FuelType, "Fuels.CFSFuelType");
Model.Core.RegisterSiteVar(SiteVars.DecidFuelType, "Fuels.DecidFuelType");
Model.Core.RegisterSiteVar(SiteVars.PercentConifer, "Fuels.PercentConifer");
Model.Core.RegisterSiteVar(SiteVars.PercentHardwood, "Fuels.PercentHardwood");
Model.Core.RegisterSiteVar(SiteVars.PercentDeadFir, "Fuels.PercentDeadFir");
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:29,代码来源:SiteVars.cs
示例14: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
outbreakVariables = PlugIn.ModelCore.Landscape.NewSiteVar<Outbreak>();
timeOfLastEvent = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.BiomassCohorts");
cohortsPartiallyDamaged = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
SiteVars.TimeOfLastEvent.ActiveSiteValues = -10000;
//Initialize outbreaks:
foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
{
SiteVars.OutbreakVars = null;
}
if (cohorts == null)
{
string mesg = string.Format("Cohorts are empty. Please double-check that this extension is compatible with your chosen succession extension.");
throw new System.ApplicationException(mesg);
}
}
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:28,代码来源:SiteVars.cs
示例15: Initialize
//---------------------------------------------------------------------
public static void Initialize(ICore modelCore)
{
core = modelCore;
modelCore.Log.WriteLine("Inside Initialize method !!!");
ecoregions = modelCore.Landscape.NewSiteVar<IFireRegion>();
eventVar = modelCore.Landscape.NewSiteVar<Event>(InactiveSiteMode.DistinctValues);
timeOfLastFire = modelCore.Landscape.NewSiteVar<int>();
severity = modelCore.Landscape.NewSiteVar<byte>();
disturbed = modelCore.Landscape.NewSiteVar<bool>();
cohorts = modelCore.GetSiteVar<SiteCohorts>("Succession.Cohorts");
// Enable interactions with (almost) any fire extension:
modelCore.RegisterSiteVar(SiteVars.Severity, "Fire.Severity");
//Initialize TimeSinceLastFire to the maximum cohort age:
foreach (ActiveSite site in modelCore.Landscape)
{
// Test to make sure the cohort type is correct for this extension
if (site.Location.Row == 1 && site.Location.Column == 1 && !SiteVars.Cohorts[site].HasAge())
{
throw new System.ApplicationException("Error in the Scenario file: Incompatible extensions; Cohort age data required for this extension to operate.");
}
//UI.WriteLine("Inside foreach loop. Site R/C = {0}/{1} !!!", site.Location.Row, site.Location.Column);
ushort maxAge = Library.BaseCohorts.Util.GetMaxAge(cohorts[site]);
//ushort maxAge = Library.Cohort.AgeOnly.Util.GetMaxAge(SiteVars.Cohorts[site]);
//UI.WriteLine("Assigned maxAge");
timeOfLastFire[site] = modelCore.StartTime - maxAge;
}
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:34,代码来源:SiteVars.cs
示例16: InitializeTimeOfLastDisturbances
//---------------------------------------------------------------------
public static void InitializeTimeOfLastDisturbances()
{
timeOfLastWind = Model.Core.GetSiteVar<int>("Wind.TimeOfLastEvent");
timeOfLastFire = Model.Core.GetSiteVar<int>("Fire.TimeOfLastEvent");
timeOfLastHarvest = Model.Core.GetSiteVar<int>("Harvest.TimeOfLastEvent");
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:9,代码来源:SiteVars.cs
示例17: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
cohorts = PlugIn.ModelCore.GetSiteVar<ISiteCohorts>("Succession.BiomassCohorts");
fuelType = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
decidFuelType = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
percentConifer = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
percentHardwood = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
percentDeadFir = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
timeOfLastHarvest = PlugIn.ModelCore.GetSiteVar<int>("Harvest.TimeOfLastEvent");
harvestPrescriptionName = PlugIn.ModelCore.GetSiteVar<string>("Harvest.PrescriptionName");
harvestCohortsKilled = PlugIn.ModelCore.GetSiteVar<int>("Harvest.CohortsDamaged");
timeOfLastFire = PlugIn.ModelCore.GetSiteVar<int>("Fire.TimeOfLastEvent");
fireSeverity = PlugIn.ModelCore.GetSiteVar<byte>("Fire.Severity");
timeOfLastWind = PlugIn.ModelCore.GetSiteVar<int>("Wind.TimeOfLastEvent");
windSeverity = PlugIn.ModelCore.GetSiteVar<byte>("Wind.Severity");
numberDeadFirCohorts = PlugIn.ModelCore.GetSiteVar<Dictionary<int,int>>("BDA.NumCFSConifers");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.FuelType, "Fuels.CFSFuelType");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.DecidFuelType, "Fuels.DecidFuelType");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.PercentConifer, "Fuels.PercentConifer");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.PercentHardwood, "Fuels.PercentHardwood");
PlugIn.ModelCore.RegisterSiteVar(SiteVars.PercentDeadFir, "Fuels.PercentDeadFir");
if (cohorts == null)
{
string mesg = string.Format("Cohorts are empty. Please double-check that this extension is compatible with your chosen succession extension.");
throw new System.ApplicationException(mesg);
}
}
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:37,代码来源:SiteVars.cs
示例18: Initialize
//---------------------------------------------------------------------
public static void Initialize()
{
eventVar = Model.Core.Landscape.NewSiteVar<Event>(InactiveSiteMode.DistinctValues);
ecoregions = Model.Core.Landscape.NewSiteVar<IEcoregion>();
percentDeadFir = Model.Core.Landscape.NewSiteVar<int>();
severity = Model.Core.Landscape.NewSiteVar<byte>();
disturbed = Model.Core.Landscape.NewSiteVar<bool>();
travelTime = Model.Core.Landscape.NewSiteVar<double>();
minNeighborTravelTime = Model.Core.Landscape.NewSiteVar<double>();
//simpleTravelTime = Model.Core.Landscape.NewSiteVar<double>();
rateOfSpread = Model.Core.Landscape.NewSiteVar<double>();
//-----Added by BRM-----
adjROS = Model.Core.Landscape.NewSiteVar<double>();
costTime = Model.Core.Landscape.NewSiteVar<double>();
//----------
groundSlope = Model.Core.Landscape.NewSiteVar<ushort>();
uphillSlopeAzimuth = Model.Core.Landscape.NewSiteVar<ushort>();
siteWindSpeed = Model.Core.Landscape.NewSiteVar<ushort>();
siteWindDirection = Model.Core.Landscape.NewSiteVar<ushort>();
//Also initialize topography, will be overwritten if optional parameters provided:
SiteVars.GroundSlope.ActiveSiteValues = 0;
SiteVars.UphillSlopeAzimuth.ActiveSiteValues = 0;
}
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Disturbance,代码行数:28,代码来源:SiteVars.cs
示例19: Initialize
//---------------------------------------------------------------------
public static void Initialize(IInputParameters parameters)
{
transpiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
AnnualTranspiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
infiltration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
runoff = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
waterleakage = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
evaporation = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
WHC = parameters.WHC;
EvaporationFraction = parameters.EvaporationFraction;
LeakageFraction = parameters.LeakageFraction;
SnowPack = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
Water = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
{
SnowPack[site] = 0;
Water[site] = 0;
infiltration[site] = 0;
runoff[site] = 0;
evaporation[site] = 0;
transpiration[site] = 0;
AnnualTranspiration[site] = 0;
}
PlugIn.ModelCore.RegisterSiteVar(AnnualTranspiration, "Succession.AnnualTranspiration");
PlugIn.ModelCore.RegisterSiteVar(Water, "Succession.SoilWater");
}
开发者ID:LANDIS-II-Foundation,项目名称:Extension-PnET-Succession,代码行数:29,代码来源:Hydrology.cs
示例20: FormOfReproduction
//---------------------------------------------------------------------
protected FormOfReproduction()
{
int speciesCount = speciesDataset.Count;
selectedSpecies = Model.Core.Landscape.NewSiteVar<BitArray>();
foreach (ActiveSite site in Model.Core.Landscape.ActiveSites) {
selectedSpecies[site] = new BitArray(speciesCount);
}
}
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:10,代码来源:FormOfReproduction.cs
注:本文中的ISiteVar类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论