Reference to non-existent field 'planner_objective_value'.

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.

Reference to non-existent field 'planner_objective_value'.

Postby nk178 » Mon Aug 24, 2015 7:02 pm

Dear all,

I solve my model for the optimal discretionary policy and I am trying to store the value of the planner objective function. I get the following error message:

Reference to non-existent field 'planner_objective_value'.

I use the dynare version 4.4.3. I have run the model diagnostics and they give back nothing (probably there is no mistake in the model).

Best,

Nikos
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Reference to non-existent field 'planner_objective_value

Postby jpfeifer » Tue Aug 25, 2015 4:43 am

Please try the unstable version.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Reference to non-existent field 'planner_objective_value

Postby nk178 » Tue Aug 25, 2015 5:59 pm

Dear Johannes,

I installed the unstable version, then opened matlab and typed addpath /usr/local/opt/dynare/lib/dynare/matlab. I still get the same error message "Reference to non-existent field 'planner_objective_value'."

I don't know if it is relevant, but when I type the addpath /usr/... I get the following warning message:

Warning: Function bsxfun has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name
conflict.
> In path at 109
In addpath at 86
Warning: Function ilu has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name
conflict.
> In path at 109
In addpath at 86
Warning: Function ordeig has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name
conflict.
> In path at 109
In addpath at 86

Thank you a lot,
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Reference to non-existent field 'planner_objective_value

Postby nk178 » Tue Aug 25, 2015 6:08 pm

Please let me say, that I figured out that this problem holds only under discretionary policy. I solved the Ramsey problem with the stable version and the command for the value of the objective function works.
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Reference to non-existent field 'planner_objective_value

Postby jpfeifer » Tue Aug 25, 2015 6:34 pm

Please provide the file to replicate the issue. This sounds like a bug.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Reference to non-existent field 'planner_objective_value

Postby nk178 » Tue Aug 25, 2015 6:40 pm

Please find attached the mod file.
Attachments
NK_ff_discretion.mod
(7.9 KiB) Downloaded 170 times
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Reference to non-existent field 'planner_objective_value

Postby jpfeifer » Wed Aug 26, 2015 7:59 am

The reason is that we do not save the objective function value for discretionary policy. We are going to change that in the future, see https://github.com/DynareTeam/dynare/issues/1041
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Reference to non-existent field 'planner_objective_value

Postby nk178 » Wed Aug 26, 2015 12:27 pm

Thank you very much for raising this issue .

Just to let you know, I tried to include the

oo_.planner_objective_value = evaluate_planner_objective(M_,options_,oo_);

to the discretionary_policy.m file and then I run the model again. I got the following error

Undefined function or variable "yhat2".
Error in evaluate_planner_objective (line 95)
yhat2 = yhat2(dr.order_var(nstatic+(1:nspred)),1)-dr.ys(dr.order_var(nstatic+(1:nspred)));
Error in discretionary_policy (line 39)
oo_.planner_objective_value = evaluate_planner_objective(M_,options_,oo_);

Thank you again.
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Reference to non-existent field 'planner_objective_value

Postby jpfeifer » Wed Aug 26, 2015 12:44 pm

------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Reference to non-existent field 'planner_objective_value

Postby nk178 » Wed Aug 26, 2015 2:07 pm

Yes, I made the changes. It works perfectly. Thank you a lot for this.
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 1 guest