You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. This is an issue I have encountered too. It is related to the way Matlab's integral function works.
This suggests that replacing the anonymous function with a regular function could result in a marginal speedup. You could consider testing this and making a pull request if this results in a speedup.
Alternative approaches would involve either (1) changing the equation to something that is quicker to solve, or (2) changing the default solving tolerances of the integral function as described here as well. Either of these approaches has the downside of affecting the model simulations. For (1), using a different function than the integral will obviously result in different simulations. For (2), loosening the tolerances will affect the accuracy of the integral solution and this will (likely) lead to different simulations also.
A final option may be having an in-depth look at the integral function to figure out how it computes the integral, and see if there is something special in the MARRMoT case that lets us somehow short-circuit part of the solving. Intuitively I doubt this will be the case.
Summarizing, a slight speedup might be achievable fairly easily. Larger speedups are likely not possible without changing this flux equation and thus changing the model simulations. I'll leave this open for a while in case you want to try replacing the anonymous function with a real one.
https://github.com/wknoben/MARRMoT/blob/master/MARRMoT/Models/Flux%20files/saturation_7.m#L24
The integral operation leads to
m_14_topmodel_7p_2s
about 20 times slower than other models?Any idea how to improve this?
Thanks and Regards,
Dongdong
The text was updated successfully, but these errors were encountered: