This is due to Matlab itself. If I recall correctly, Matlab uses some sort of just-in-time compiler to process the M-files the first time it runs them. After that, unless the code changes, it uses the pre-compiled code, and can skip the compilation step, making it much faster for future runs. This is particularly noticeable when loading extremely large case files.
So, the 2nd and following runs are a more accurate representation of the performance. -- Ray Zimmerman Senior Research Associate B30 Warren Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 On Sep 19, 2013, at 2:46 PM, Home Lin <[email protected]> wrote: > Dear Dr. Zimmerman and Matpower users, > > I have a question about the running time of runpf and runopf. Say I start > matlab and then runopf(case30) or runpf(case30) continuously for 3 times and > their computation time is t1, t2, t3 > I find that t1 is significantly larger than t2, t3, while t2 is similar to > t3. > > Similar thing happens to larger cases, such as case300, case3120sp. > > Is it because of matlab itself? Does anyone know what is the reason? and > which running time correctly refelect the performance of the solver. > > > Thanks, > Best Regards, > Lin
