Calculation Speed

Calculation Speed - Calculation is very slow - Сообщения

#1 Опубликовано: 19.09.2014 12:34:51
stiviboy

stiviboy

0 сообщений из 2 понравились пользователям.

Группа: User

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
#2 Опубликовано: 20.09.2014 05:39:42
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 20.09.2014 05:52:34
stiviboy

stiviboy

0 сообщений из 2 понравились пользователям.

Группа: User

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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений