Parent Topic: MODEL
To improve execution speed, MODEL `half' compiles the modelling equations; however, MODEL basically works as an interpreter. The following hints can help improve speed even further.
Make equations as simple as possible. For example:
replace: #e = 7 * (%1/2 + 3^2); with: #e = 3.5 * %1 + 63;Accessing attribute data is slow. If this data will be used a number of times in the model, assign it to a numeric/string variable and use the variable instead. For example:
replace: if (%3.2>27) then #e = %3.2 + ln(%3.2); endif; with: #a = %3.2; if (#a>27) then #e = #a + ln(#a); endif;Avoid the use of character data where possible. This type of data is much slower than numeric data.
Please note that comments, blank lines, and white space do not affect execution speed so they should be used liberally.