Skip to content

Commit

Permalink
Merge pull request #19 from LANDIS-II-Foundation/v8
Browse files Browse the repository at this point in the history
V8 including new ReproductionType to log the types of reproduction occurring over time.
  • Loading branch information
rmscheller authored Aug 27, 2019
2 parents 42aa8c3 + 7809aba commit 8c8617d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/FormOfReproduction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool IFormOfReproduction.TryAt(ActiveSite site)
if (selectedSpeciesAtSite.Get(index)) {
ISpecies species = speciesDataset[index];
if (PreconditionsSatisfied(species, site)) {
Reproduction.AddNewCohort(species, site);
Reproduction.AddNewCohort(species, site, "plant");
success = true;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Reproduction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class Delegates
/// A method to add new young cohort for a particular species at a
/// site.
/// </summary>
public delegate void AddNewCohort(ISpecies species, ActiveSite site);
public delegate void AddNewCohort(ISpecies species, ActiveSite site, string reproductionType);

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

Expand Down Expand Up @@ -298,7 +298,7 @@ public static void Reproduce(ActiveSite site)
ISpecies species = speciesDataset[index];
sufficientLight = SufficientResources(species, site);
if (sufficientLight && Establish(species, site)) {
AddNewCohort(species, site);
AddNewCohort(species, site, "serotiny");
serotinyOccurred = true;
if (isDebugEnabled)
log.DebugFormat("site {0}: {1} post-fire regenerated",
Expand All @@ -324,7 +324,7 @@ public static void Reproduce(ActiveSite site)
sufficientLight = SufficientResources(species, site);
if (sufficientLight &&
(Model.Core.GenerateUniform() < species.VegReprodProb)) {
AddNewCohort(species, site);
AddNewCohort(species, site, "resprout");
speciesResprouted = true;
if (isDebugEnabled)
log.DebugFormat("site {0}: {1} resprouted",
Expand Down
2 changes: 1 addition & 1 deletion src/Seeding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Do(ActiveSite site)
for (int i = 0; i < Model.Core.Species.Count; i++) {
ISpecies species = Model.Core.Species[i];
if (seedingAlgorithm(species, site)) {
Reproduction.AddNewCohort(species, site);
Reproduction.AddNewCohort(species, site, "seed");
if (isDebugEnabled)
log.DebugFormat("site {0}: seeded {1}",
site.Location, species.Name);
Expand Down
32 changes: 21 additions & 11 deletions src/library-succession.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Landis.Library.Succession</RootNamespace>
<AssemblyName>Landis.Library.Succession-v7</AssemblyName>
<AssemblyTitle>Landis.Library.Succession-v7</AssemblyTitle>
<AssemblyName>Landis.Library.Succession-v8</AssemblyName>
<AssemblyTitle>Landis.Library.Succession-v8</AssemblyTitle>
<AssemblyCompany>LANDIS-II Foundation</AssemblyCompany>
<AssemblyProduct>Landis.Library.Succession-v6</AssemblyProduct>
<AssemblyProduct>Landis.Library.Succession-v8</AssemblyProduct>
<AssemblyCopyright>LANDIS-II Foundation</AssemblyCopyright>
<AssemblyVersion>7.0</AssemblyVersion>
<AssemblyVersion>8.0</AssemblyVersion>
<AssemblyDescription>Input Parameters Library for LANDIS-II</AssemblyDescription>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -18,24 +18,34 @@
<Authors>LANDIS-II Foundation</Authors>
<Product>Succession Library</Product>
<Copyright>LANDIS-II Foundation</Copyright>
<Version>6.0</Version>
<Version>8.0</Version>
<PackageTags>LANDIS-II;Landis;Library;Succession</PackageTags>
<Description>Succession Library for LANDIS-II</Description>
<PackageReleaseNotes>.NET Standard 2.0 update.</PackageReleaseNotes>
<FileVersion>7.0</FileVersion>
<FileVersion>8.0</FileVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>


<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<!--<OutputPath>C:\BRM\LANDIS_II\GitCode\brmiranda\Core-Model-v7\Tool-Console\src\bin\extensions</OutputPath>-->
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Deploy\</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Landis.Core" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="Landis.Library.AgeOnlyCohorts-v3">
<HintPath>lib\Landis.Library.AgeOnlyCohorts-v3.dll</HintPath>
<HintPath>..\..\Support-Library-Dlls-v7\Landis.Library.AgeOnlyCohorts-v3.dll</HintPath>
</Reference>
<Reference Include="Landis.Library.Cohorts-v2">
<HintPath>lib\Landis.Library.Cohorts-v2.dll</HintPath>
<HintPath>..\..\Support-Library-Dlls-v7\Landis.Library.Cohorts-v2.dll</HintPath>
</Reference>
</ItemGroup>
</ItemGroup>

</Project>

0 comments on commit 8c8617d

Please sign in to comment.