1 Pages (3 items)
Calculation Speed - Calculation is very slow - Messages
#1 Posted: 9/19/2014 12:34:51 PM
Hi,
I have a large calculation that gets very slow. With every new line I add it takes like 5 minutes to calculate. I think the problem is that I am calling functions several times as shown below:
c.air(T):line(τ:T/'K,(1045.356-0.3161783*τ+7.083814*10^{-4}*τ^2-2.705209*10^{-7}*τ^3)*'J/{'kg*'K},2,1)
c.pbed2:c.air(T.bed2)
I have tried to make the optimisation numeric instead of symbolic, but then it says: units don't match.
Same with the eval() function.
Please help me on this. I need this urgently.
Thank you very much.
Kind regards
I have a large calculation that gets very slow. With every new line I add it takes like 5 minutes to calculate. I think the problem is that I am calling functions several times as shown below:
c.air(T):line(τ:T/'K,(1045.356-0.3161783*τ+7.083814*10^{-4}*τ^2-2.705209*10^{-7}*τ^3)*'J/{'kg*'K},2,1)
c.pbed2:c.air(T.bed2)
I have tried to make the optimisation numeric instead of symbolic, but then it says: units don't match.
Same with the eval() function.
Please help me on this. I need this urgently.
Thank you very much.
Kind regards
#2 Posted: 9/20/2014 5:39:42 AM
I'm not completely sure the problem is here... If I set both the optimizations to numeric (definition and for loop), I can make 5000 calculations in 2.0-2.1 seconds...
![2014-09-19 20_51_19-SMath Studio Desktop - [Page1_].png](/en-US/file/6oyseN/2014-09-19-20_51_19-SMath-Studio-Desktop---_Page1___png)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 9/20/2014 5:52:34 AM
Hi,
yes, I found out what my problem was. I only selected the last few calculations, i.e. those when it was getting really slow. However, I should have selected all calculations and changed optimisation to numeric...not only for the last few.
Thanks
yes, I found out what my problem was. I only selected the last few calculations, i.e. those when it was getting really slow. However, I should have selected all calculations and changed optimisation to numeric...not only for the last few.
Thanks
1 Pages (3 items)
-
New Posts
-
No New Posts