Hello, everyone. I wrote a simple program that solves 5 differential equations. Further, I fit experimental data with MINERR.
It works but it works very slow. Does anyone know how to do it a bit faster?
Thank you in advance! Program is attached
Solved! Go to Solution.
I notice that your odesolve-block returns 8 functions, but in your minerr-solve block you assign the result to a vector with just seven variables. Thats sure possible - are you sure you don't need p022.
I can't check your sheet because I always get the error message that Excel is busy, can't be activated and I shall try in a few seconds again.
I have Excel 2016 installed and I see in the task manager that its invoked. Not sure whats going on.
Your minerr-solveblock calls the odesolve-solve block (function F) six times for every iteration, which is quite inefficient.
The modification seen in the pic below should speed up the calculation by the factor 6.
I turned the solve block into a function just to be able to determine and compare the execution time of both versions.
I just finished timing the two versions and the speed gain with my suggested modification is indeed a little bit more than factor 6.
P6 sheet (with auto-calc disabled) attached
Oh, interesting you have called function in vector format. That is interesting.
Thank you Werner_E. Your insight is very useful as always.
Hi Werner,
After I applied your solution to my main program. It still works slow.
I do not really see why. Maybe you could find it.
Thank you in advance!.
I notice that your odesolve-block returns 8 functions, but in your minerr-solve block you assign the result to a vector with just seven variables. Thats sure possible - are you sure you don't need p022.
I can't check your sheet because I always get the error message that Excel is busy, can't be activated and I shall try in a few seconds again.
I have Excel 2016 installed and I see in the task manager that its invoked. Not sure whats going on.
I added p022 "just in case" to use in the future. But seem it is critical for minerr function. After I deleted unused p022 it works much faster.
Thank again Werner.
You saved my day again!