Addressing a Problem?
The calculation in GetEnergyLossesFromReach & GetEnergyLossesInTransit is cubic complexity in N=_nMlatHist[p]. First the k loop, then the m loop, and then inside of FunkyEnergyIntegral again a loop over m, yields O(N^3) work
Potential Solution
It should be possible to reduce this to quadratic complexity through using a prefix-sum recurrence to replace the summation in FunkyTemperatureIntegral, which will save a lot of calls to exp()
Additional context
i think #76 needs resolution before working up the prefix sum part.
Contribution