ramsey policy example & octave

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

ramsey policy example & octave

Postby ivan_lozev » Wed Apr 15, 2009 1:11 pm

Hi,
I am trying to run the wiki example (http://www.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 for `struct' 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 from `ramsey_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 from `dynare_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 from `dr1' in file `C:/dynare/4.0.3/matlab\dr1.m'
error: evaluating if command near line 98, column 1
error: called from `resol' in file `C:/dynare/4.0.3/matlab\resol.m'
error: called from `stoch_simul' in file `C:/dynare/4.0.3/matlab\stoch_simul.m'
error: evaluating assignment expression near line 25, column 8
error: called from `ramsey_policy' in file `C:/dynare/4.0.3/matlab\ramsey_policy.m'
error: near line 100 of file `C:\Octave2\ramsey.m'
error: called from `dynare' in file `C:/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!
ivan_lozev
 
Posts: 9
Joined: Wed Apr 15, 2009 12:28 pm

Re: ramsey policy example & octave

Postby MichelJuillard » Sat Apr 18, 2009 2:29 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: ramsey policy example & octave

Postby ivan_lozev » Wed Apr 22, 2009 7:50 am

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
Attachments
ramsey.mod
(568 Bytes) Downloaded 206 times
ivan_lozev
 
Posts: 9
Joined: Wed Apr 15, 2009 12:28 pm

Re: ramsey policy example & octave

Postby MichelJuillard » Sat Apr 25, 2009 9:02 am

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: ramsey policy example & octave

Postby olugovoy » Mon May 04, 2009 11:09 pm

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
olugovoy
 
Posts: 4
Joined: Thu Apr 10, 2008 2:21 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests