APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
138 stars 167 forks source link

Plant damage from LiveCycle organisums not working #8891

Closed HamishBrownPFR closed 6 months ago

HamishBrownPFR commented 6 months ago

What happened?

The plant damage functionality of Lifecycle was never completed properly.

What Operating System are you on?

Windows

hol353 commented 6 months ago

What damage functionality is not working?

HamishBrownPFR commented 6 months ago

There are two classes that in theory send damage from the lifecycle to the plant model: PlantOrganConsumption.cs and PlantOrganFunctionalReductionDimension.cs. The former has all the calculations to work out how much damage to induce but the method to send the damage to the effected organ is commented out with a good explination why. The error was cause by an unprotected divide which I have fixed in #8892. The latter does not connect to the correct instance of a host organ (this was fixed in PlantOrgnanConsumption.cs by @hol353 in #8114 but not fixed in PlantOrganFunctionalReductionDimension.cs). PlantOrganFunctionalReductionDimension.cs is also missing some logic to apply population multipliers into damage affects. These issues are also fixed (I hope) in #8892 image