View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000691 | Heureka | TPG | public | 2024-05-16 13:21 | 2024-05-21 09:57 |
Reporter | jonare | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | 2.22.0 | ||||
Summary | 0000691: Rerun simulation has differences compared to TPG in period 0 on NFI-plots | ||||
Description | B3-plots with existing trees with mean height below 7 m will be regenerated, and original trees with diameter < 15 are removed. When the treatmentUnit is reset the regenerated trees will be removed, creating a different state before regeneration. | ||||
Tags | No tags attached. | ||||
Product | PlanWise | ||||
|
Proposed change in TreatmentUnitEngine.cs L283 (this change will need some adjustments, i.e. SetMainSaplingFunction[...] and other updates should only be called if handleExistingTrees[...] actually removed trees: handleExistingTreesAtInitialRegeneration(regenerateToExistingState, p); var treesBeforeRegeneration = p.Trees.Count; p.SetMainSaplingFunctionMeanHeight(p.CurrentPeriod, new double[(Enum.GetValues(typeof(MainPlantCalculatorSpecies))).Length]); p.SetMainSaplingFunctionMeanAge(p.CurrentPeriod, new double[(Enum.GetValues(typeof(MainPlantCalculatorSpecies))).Length]); p.UpdateBefore(); _production.AssignBarkThickness(p); Motivation: Trees from DB are removed before regeneration (well, after regenation in current code). When a TU is reset the trees from DB are not recreated and aggregated values for the TU will differ. A way to at least make calculations consistent is to make sure to update relevant values after the removal of trees. |