View Issue Details

IDProjectCategoryView StatusLast Update
0000691HeurekaTPGpublic2024-05-21 09:57
Reporterjonare Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status newResolutionopen 
Product Version2.22.0 
Summary0000691: Rerun simulation has differences compared to TPG in period 0 on NFI-plots
DescriptionB3-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.
TagsNo tags attached.
ProductPlanWise

Activities

jonare

2024-05-20 08:59

administrator   ~0000618

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.

Issue History

Date Modified Username Field Change
2024-05-16 13:21 jonare New Issue
2024-05-20 08:59 jonare Note Added: 0000618
2024-05-21 09:57 jonare Summary Rerun simulation has differences compare to TPG in period 0 on NFI-plots => Rerun simulation has differences compared to TPG in period 0 on NFI-plots