Problem with osr

I’m having trouble with the optimal simple rule (using v.3). The example file that Michel had provided in this forum for osr runs just fine.

My program (which has 20 variables) runs with stoch_simul, but is giving me the following error message when I run osr.

I’ve checked for typos, that’s not the issue. Has anyone encountered a similar problem? Any suggestions how it could be fixed?

Thanks a lot.

??? Index exceeds matrix dimensions.

Error in ==> osr_obj at 41
weights = weights(dr_.order_var,dr_.order_var);

Error in ==> osr1 at 24
[f,vx,info] = osr_obj(t0,params,weights);

Error in ==> osr at 37
[dr_,info] = osr1(params,W)

Error in ==> OP2 at 214

Error in ==> dynare at 26
evalin(‘base’,fname) ;

I now tried running my program with v4, and it works. In the Version 4 page, it states that optimal policy doesn’t work in v4 yet. I’m guessing that’s no longer valid, but I still want to make sure.