Skip to content

Commit

Permalink
Update 4.8.1-11, 4.1.3-1. Fix save as bug. Fix file export units
Browse files Browse the repository at this point in the history
  • Loading branch information
holos-aafc committed Sep 4, 2024
1 parent 0ca9c2f commit 9baad4d
Show file tree
Hide file tree
Showing 23 changed files with 4,752 additions and 71 deletions.
20 changes: 17 additions & 3 deletions H.Content/Documentation/User Guide/User Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ Under the “**Defaults**” header, there are three options available: **Farm D

<br>
<p align="center">
<img src="../../Images/UserGuide/en/chapter4/figure4-1.png" alt="Figure4-1" width=""/>
<img src="../../Images/UserGuide/en/chapter4/figure4-1.png" alt="Figure4-1" width="142"/>
<br>
<em>
Figure 4.1: Defaults Options
Expand Down Expand Up @@ -675,8 +675,22 @@ The default data for this screen is based on information found in the algorithm

1. Select “**Reset Defaults**
2. Here you will be able to reset to default some values for the **Crops** and **Animals** in your farms that you have saved. Defaults may be changed for current farm or for all farms.
3. Select all values that you would like to have reverted to defaults and click **Apply** to apply the cahnges to the farm(s), **Apply All** when clicked will revert to default all values given in the tab, **Cancel** will undo any changes made to the tab.


<br>
<p align="center">
<img src="../../Images/UserGuide/en/chapter4/figure4-10.png" alt="Figure4-7" width="650"/>
<br>
<em>
Figure 4.7: Reset Defaults
<br>
A: Step 1. Select a if you would like to reset to default values for 'All Farms' or 'Selected Frams'.
<br>
B:Step 2. Select 'Toggle All On' if you want to reset all values in the list or 'Toggle All Off' if you want to undo all changes.
</em>
</p>
<br>

3. Select all values that you would like to have reverted to defaults and click **Apply** to apply the cahnges to the farm(s) and **Cancel** will undo any changes made to the tab.

# Chapter 5 - Tools

Expand Down
4,337 changes: 4,337 additions & 0 deletions H.Content/Documentation/User Guide/~User Guide.md.saved.bak

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions H.Core/Calculators/Infrastructure/ADCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public SubstrateFlowInformation GetFreshManureFlowRate(AnaerobicDigestionCompone

// Equation 4.8.1-3
substrateFlowRate.TotalSolidsFlowOfSubstrate =
substrateFlowRate.TotalMassFlowOfSubstrate * adManagementPeriod.TotalSolids;
substrateFlowRate.TotalMassFlowOfSubstrate * (adManagementPeriod.TotalSolids / 1000);

// Equation 4.8.1-4
substrateFlowRate.VolatileSolidsFlowOfSubstrate =
Expand Down Expand Up @@ -705,16 +705,14 @@ public List<SubstrateFlowInformation> GetDailyFlowRatesForSubstrateTypes(
substrateFlow.FlowRate = substrateViewItemBase.FlowRate;

/* Equation 4.8.1-10
* Equation 4.8.1-27
*/
substrateFlow.TotalMassFlowOfSubstrate = substrateViewItemBase.FlowRate;

/* Equation 4.8.1-11
* Equation 4.8.1-28
*
* Note: TS will be 0 for manure
*/
substrateFlow.TotalSolidsFlowOfSubstrate = (substrateViewItemBase.TotalSolids / 1000.0);
substrateFlow.TotalSolidsFlowOfSubstrate = substrateFlow.TotalMassFlowOfSubstrate * (substrateViewItemBase.TotalSolids / 1000.0);

// Equation 4.8.1-12
substrateFlow.VolatileSolidsFlowOfSubstrate = substrateViewItemBase.VolatileSolids;
Expand Down
12 changes: 0 additions & 12 deletions H.Core/Calculators/Nitrogen/N2OEmissionFactorCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,15 +516,6 @@ public double CalculateEmissionFactor(double baseEcodistictEmissionFactor,
return result;
}










/// <summary>
/// Equation 2.5.2-20
/// </summary>
Expand All @@ -533,9 +524,6 @@ public double CalculateWeightedEmissionFactor(IEnumerable<WeightedAverageInput>
return areasAndEmissionFactors.WeightedAverage(record => record.Value, record => record.Weight);
}




/// <summary>
/// Combines total emissions for entire area of a field from each manure/digestate application into per hectare emissions
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions H.Core/Calculators/Shelterbelt/ShelterbeltCalculator.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Transactions;
using AutoMapper.Configuration.Conventions;
using H.Core.Enumerations;
using H.Core.Models;
using H.Core.Models.LandManagement.Shelterbelt;
using H.Core.Providers.Shelterbelt;
using H.Infrastructure;
Expand Down
2 changes: 0 additions & 2 deletions H.Core/Models/LandManagement/Fields/HarvestViewItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public HarvestViewItem()

// https://hayforks.com/blog/how-much-does-a-bale-of-hay-weigh
this.BaleWeight = 500;

this.HarvestLossPercentage = 35;
}

#endregion
Expand Down
117 changes: 108 additions & 9 deletions H.Core/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 35 additions & 2 deletions H.Core/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5990,8 +5990,8 @@ Please note: emissions related to the deposition or application of livestock man
<data name="LabelResetUserDefaults" xml:space="preserve">
<value>Reset user defaults</value>
</data>
<data name="LabelResetUtilization" xml:space="preserve">
<value>Reset pasture utilization</value>
<data name="LabelResetHarvestLoss" xml:space="preserve">
<value>Reset harvest loss</value>
</data>
<data name="LabelResetYieldsAllYears" xml:space="preserve">
<value>Reset yields for all years</value>
Expand Down Expand Up @@ -6146,4 +6146,37 @@ Please note: emissions related to the deposition or application of livestock man
<data name="MessageResetNitrogenExcretionRate" xml:space="preserve">
<value>Resets the nitrogen excretion rate for each animal group (for management period) to the default value</value>
</data>
<data name="TitleResetDefaultValues" xml:space="preserve">
<value>Reset default values</value>
</data>
<data name="LabelStepOneDefaultValues" xml:space="preserve">
<value>Select if you would like to apply defaults to all farms or only the selected farm.</value>
</data>
<data name="LabelAllFarms" xml:space="preserve">
<value>All farms</value>
</data>
<data name="LabelSelectedFarm" xml:space="preserve">
<value>Selected farm</value>
</data>
<data name="LabelStepTwoDefaultValues" xml:space="preserve">
<value>Select all buttons that you would like default values reset for.</value>
</data>
<data name="LabelToggleAllOff" xml:space="preserve">
<value>Toggle all off</value>
</data>
<data name="LabelToggleAllOn" xml:space="preserve">
<value>Toggle all on</value>
</data>
<data name="TitleResetDefaults" xml:space="preserve">
<value>Reset defaults</value>
</data>
<data name="LabelAnimals" xml:space="preserve">
<value>Animals</value>
</data>
<data name="LabelCrops" xml:space="preserve">
<value>Crops</value>
</data>
<data name="LabelDefaultResetWindow" xml:space="preserve">
<value>This window allows the user to reset the default values on crops and animals.</value>
</data>
</root>
38 changes: 38 additions & 0 deletions H.Core/Properties/Settings2.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9baad4d

Please sign in to comment.