Ramsey policy example & octave

Hi,
I am trying to run the wiki example (dynare.org/DynareWiki/Optima … call&rev=7) in dynare 4.0.3 with GNU Octave, version 3.0.3. However I get the following output

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare …
Starting preprocessing of the model file …
2 equation(s) found
Processing derivation …
Processing Order 1… done
Processing Order 2… done
1 equation(s) found
Processing derivation …
Processing Order 1… done
Processing Order 2… done
Processing outputs …
Preprocessing completed.
Starting Matlab computing …

error: binary operator *' not implemented forstruct’ by scalar' operations error: evaluating binary operator*’ near line 15, column 15
error: evaluating binary operator +' near line 15, column 20 error: evaluating binary operator+’ near line 15, column 39
error: evaluating binary operator +' near line 15, column 61 error: evaluating assignment expression near line 15, column 5 error: called fromramsey_static’ in file C:\Octave2\ramsey_static.m' error: evaluating assignment expression near line 72, column 12 error: evaluating if command near line 69, column 5 error: evaluating if command near line 40, column 3 error: called fromdynare_solve’ in file C:/dynare/4.0.3/matlab\dynare_solve.m' error: evaluating assignment expression near line 83, column 26 error: evaluating if command near line 70, column 5 error: called fromdr1’ in file C:/dynare/4.0.3/matlab\dr1.m' error: evaluating if command near line 98, column 1 error: called fromresol’ in file C:/dynare/4.0.3/matlab\resol.m' error: called fromstoch_simul’ in file C:/dynare/4.0.3/matlab\stoch_simul.m' error: evaluating assignment expression near line 25, column 8 error: called fromramsey_policy’ in file C:/dynare/4.0.3/matlab\ramsey_policy.m' error: near line 100 of fileC:\Octave2\ramsey.m’
error: called from dynare' in fileC:/dynare/4.0.3/matlab\dynare.m’
octave-3.0.3.exe:7>

So if someone has a suggestion how to get through this problem can you please post it!

I can’t reproduce the problem. Maybe you have made a typo while creating the *.mod file near line 15.
If not, please upload your *.mod file.

Best

Michel

Dear Michael,
Thanks for the reply. I am posting the mod file that I still cannot fix. Please, write me whether it is working at your environment.
Best,
Ivan
ramsey.mod (568 Bytes)

The problem was coming from an unfortunate name collision between the Dynare function ramsey_static in the toolbox and the name of the static model for your *.mod file (ramsey.mod) and would have the same effect in Dynare Matlab (with a different error message)

I have renamed the Dynare functions
ramsey_static -> dyn_ramsey_static_.m
ramsey_dynamic -> dyn_ramsey_dynamic_.m
in order to avoid such problems.
This is available in the snapshot.

Thank you for reporting the bug

Michel

FYI:
I met similar problem with the example naming it ‘ramsey_policy.dyn’ (on Dynare 4.0.3 / Matlab)
After renaming the file to ‘rpol.dyn’ the error was the same. But I noticed that dynare still reports error in old file (ramsey_policy.m).
I deleted all the related files and cleared memory, it solved the problem.

Regards,
Oleg