Merge branch 'master' into ecb-master+folder

Fixed conflicts in:
	tests/block_bytecode/run_ls2003.m
time-shift
Stéphane Adjemian(Charybdis) 2018-07-10 10:18:55 +02:00
commit 85a585c73e
68 changed files with 233 additions and 212 deletions

View File

@ -65,7 +65,7 @@ A number of tools and libraries are needed in order to recompile everything. You
- The [GNU Compiler Collection](http://gcc.gnu.org/), with gcc, g++ and gfortran (mandatory) - The [GNU Compiler Collection](http://gcc.gnu.org/), with gcc, g++ and gfortran (mandatory)
- MATLAB (if you want to compile MEX for MATLAB) - MATLAB (if you want to compile MEX for MATLAB)
- [GNU Octave](http://www.octave.org), with the development headers (if you want to compile MEX for Octave) - [GNU Octave](http://www.octave.org), with the development headers (if you want to compile MEX for Octave)
- [Boost libraries](http://www.boost.org), version 1.36 or later - [Boost libraries](http://www.boost.org), version 1.36 or later (with the filesystem library compiled)
- [Bison](http://www.gnu.org/software/bison/), version 2.5 or later (only if you get the source through Git) - [Bison](http://www.gnu.org/software/bison/), version 2.5 or later (only if you get the source through Git)
- [Flex](http://flex.sourceforge.net/), version 2.5.4 or later (only if you get the source through Git) - [Flex](http://flex.sourceforge.net/), version 2.5.4 or later (only if you get the source through Git)
- [Autoconf](http://www.gnu.org/software/autoconf/), version 2.62 or later (only if you get the source through Git) (see [Installing an updated version of Autoconf in your own directory, in GNU/Linux](http://www.dynare.org/DynareWiki/AutoMake)) - [Autoconf](http://www.gnu.org/software/autoconf/), version 2.62 or later (only if you get the source through Git) (see [Installing an updated version of Autoconf in your own directory, in GNU/Linux](http://www.dynare.org/DynareWiki/AutoMake))
@ -220,7 +220,7 @@ Alternatively, if you want to build everything, manually install the following p
- `build-essential` (for gcc, g++ and make) - `build-essential` (for gcc, g++ and make)
- `gfortran` - `gfortran`
- `liboctave-dev` (or `octave3.2-headers` on older systems) - `liboctave-dev` (or `octave3.2-headers` on older systems)
- `libboost-graph-dev` - `libboost-graph-dev` and `libboost-filesystem-dev`
- `libgsl-dev` (or `libgsl0-dev` on older systems) - `libgsl-dev` (or `libgsl0-dev` on older systems)
- `libmatio-dev` - `libmatio-dev`
- `libslicot-dev` and `libslicot-pic` - `libslicot-dev` and `libslicot-pic`

View File

@ -97,7 +97,7 @@
@c %**end of header @c %**end of header
@copying @copying
Copyright @copyright{} 1996-2017, Dynare Team. Copyright @copyright{} 1996-2018, Dynare Team.
@quotation @quotation
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
@ -778,30 +778,21 @@ file. By default (unless @code{use_dll} option has been given to
@table @file @table @file
@item @var{FILENAME}.m @item +@var{FILENAME}/driver.m
Contains variable declarations, and computing tasks Contains variable declarations, and computing tasks
@item @var{FILENAME}_dynamic.m @item +@var{FILENAME}/dynamic.m
@vindex M_.lead_lag_incidence @vindex M_.lead_lag_incidence
Contains the dynamic model equations. Note that Dynare might introduce auxiliary equations and variables (@pxref{Auxiliary variables}). Outputs are the residuals of the dynamic model equations in the order the equations were declared and the Jacobian of the dynamic model equations. For higher order approximations also the Hessian and the third-order derivatives are provided. When computing the Jacobian of the dynamic model, the order of the endogenous variables in the columns is stored in @code{M_.lead_lag_incidence}. The rows of this matrix represent time periods: the first row denotes a lagged (time t-1) variable, the second row a contemporaneous (time t) variable, and the third row a leaded (time t+1) variable. The columns of the matrix represent the endogenous variables in their order of declaration. A zero in the matrix means that this endogenous does not appear in the model in this time period. The value in the @code{M_.lead_lag_incidence} matrix corresponds to the column of that variable in the Jacobian of the dynamic model. Example: Let the second declared variable be @code{c} and the @code{(3,2)} entry of @code{M_.lead_lag_incidence} be @code{15}. Then the @code{15}th column of the Jacobian is the derivative with respect to @code{c(+1)}. Contains the dynamic model equations. Note that Dynare might introduce auxiliary equations and variables (@pxref{Auxiliary variables}). Outputs are the residuals of the dynamic model equations in the order the equations were declared and the Jacobian of the dynamic model equations. For higher order approximations also the Hessian and the third-order derivatives are provided. When computing the Jacobian of the dynamic model, the order of the endogenous variables in the columns is stored in @code{M_.lead_lag_incidence}. The rows of this matrix represent time periods: the first row denotes a lagged (time t-1) variable, the second row a contemporaneous (time t) variable, and the third row a leaded (time t+1) variable. The columns of the matrix represent the endogenous variables in their order of declaration. A zero in the matrix means that this endogenous does not appear in the model in this time period. The value in the @code{M_.lead_lag_incidence} matrix corresponds to the column of that variable in the Jacobian of the dynamic model. Example: Let the second declared variable be @code{c} and the @code{(3,2)} entry of @code{M_.lead_lag_incidence} be @code{15}. Then the @code{15}th column of the Jacobian is the derivative with respect to @code{c(+1)}.
@item @var{FILENAME}_static.m @item +@var{FILENAME}/static.m
Contains the long run static model equations. Note that Dynare might introduce auxiliary equations and variables (@pxref{Auxiliary variables}). Outputs are the residuals of the static model equations in the order the equations were declared and the Jacobian of the static equations. Entry @code{(i,j)} of the Jacobian represents the derivative of the @code{i}th static model equation with respect to the @code{j}th model variable in declaration order. Contains the long run static model equations. Note that Dynare might introduce auxiliary equations and variables (@pxref{Auxiliary variables}). Outputs are the residuals of the static model equations in the order the equations were declared and the Jacobian of the static equations. Entry @code{(i,j)} of the Jacobian represents the derivative of the @code{i}th static model equation with respect to the @code{j}th model variable in declaration order.
@end table @end table
@noindent @noindent
These files may be looked at to understand errors reported at the simulation stage. These files may be looked at to understand errors reported at the simulation stage.
@code{dynare} will then run the computing tasks by executing @file{@var{FILENAME}.m}. @code{dynare} will then run the computing tasks by executing @file{+@var{FILENAME}/driver.m}.
A few words of warning is warranted here: the filename of the
@file{.mod} file should be chosen in such a way that the generated
@file{.m} files described above do not conflict with @file{.m} files
provided by MATLAB/Octave or by Dynare. Not respecting this rule could
cause crashes or unexpected behaviour. In particular, it means that
the @file{.mod} file cannot be given the name of a MATLAB/Octave or
Dynare command. Under Octave, it also means that the @file{.mod} file
cannot be named @file{test.mod}.
@optionshead @optionshead
@ -875,16 +866,16 @@ Suppresses all warnings.
@item json=parse|transform|compute @item json=parse|transform|compute
Causes the preprocessor to output a version of the @file{.mod} file in JSON Causes the preprocessor to output a version of the @file{.mod} file in JSON
format. If @code{parse} is passed, the output will be written after the parsing format. If @code{parse} is passed, the output will be written after the parsing
of the @file{.mod} file to a file called @file{@var{FILENAME}.json}. If of the @file{.mod} file to a file called @file{@var{FILENAME}/model/json/modfile.json}. If
@code{transform} is passed, the JSON output of the transformed model (maximum @code{transform} is passed, the JSON output of the transformed model (maximum
lead of 1, minimum lag of -1, expectation operators substituted, etc.) will be lead of 1, minimum lag of -1, expectation operators substituted, etc.) will be
written to a file called @file{@var{FILENAME}.json} and the original, written to a file called @file{@var{FILENAME}/model/json/modfile.json} and the original,
untransformed model will be written in @file{@var{FILENAME}_original.json}. And untransformed model will be written in @file{@var{FILENAME}/model/json/modfile-original.json}. And
if @code{compute} is passed, the output is written after the computing pass. In if @code{compute} is passed, the output is written after the computing pass. In
this case, the transformed model is written to @file{@var{FILENAME}.json}, the this case, the transformed model is written to @file{@var{FILENAME}/model/json/modfile.json}, the
original model is written to @file{@var{FILENAME}_original.json}, and the original model is written to @file{@var{FILENAME}/model/json/model-original.json}, and the
dynamic and static files are written to @file{@var{FILENAME}_dynamic.json} and dynamic and static files are written to @file{@var{FILENAME}/model/json/dynamic.json} and
@file{@var{FILENAME}_static.json}. @file{@var{FILENAME}/model/json/static.json}.
@item jsonstdout @item jsonstdout
Instead of writing output requested by @ref{json} to files, write to standard Instead of writing output requested by @ref{json} to files, write to standard
@ -895,8 +886,8 @@ Quit processing once the output requested by @ref{json} has been written.
@item jsonderivsimple @item jsonderivsimple
Print a simplified version (excluding variable name(s) and lag information) of the Print a simplified version (excluding variable name(s) and lag information) of the
static and dynamic files in @file{@var{FILENAME}_static.json} and static and dynamic files in @file{@var{FILENAME}/model/json/static.json} and
@file{@var{FILENAME}_dynamic.json}. @file{@var{FILENAME}/model/json/dynamic.json}.
@item warn_uninit @item warn_uninit
Display a warning for each variable or parameter which is not Display a warning for each variable or parameter which is not
@ -1634,22 +1625,34 @@ model_local_variable GDP_US $GDPUS$;
@subsection On-the-fly Model Variable Declaration @subsection On-the-fly Model Variable Declaration
Endogenous variables, exogenous variables, and parameters can also be declared Endogenous variables, exogenous variables, and parameters can also be declared
inside the model block. To do this, simply follow the symbol name with a inside the model block. You can do this in two different ways: either via the
vertical line (@code{|}) and either an @code{e}, an @code{x}, or a equation tag or directly in an equation.
@code{p}. For example, to declare a parameter named @code{alphaa} in the model
block, you could write @code{alphaa|p} directly in an equation where it To declare a variable on-the-fly in an equation tag, simply state the type of
appears. Similarly, to declare an endogenous variable @code{c} in the model variable to be declared (@code{endogenous}, @code{exogenous}, or
block you could write @code{c|e}. These on-the-fly variable declarations do not @code{parameter} followed by an equal sign and the variable name in single
have to appear in the first place where this variable is encountered. Note that quotes. Hence, to declare a variable @code{c} as endogenous in an equation tag,
you can type @code{[endogenous='c']}.
To perform on-the-fly variable declaration in an equtaion, simply follow the
symbol name with a vertical line (@code{|}) and either an @code{e}, an
@code{x}, or a @code{p}. For example, to declare a parameter named
@code{alphaa} in the model block, you could write @code{alphaa|p} directly in
an equation where it appears. Similarly, to declare an endogenous variable
@code{c} in the model block you could write @code{c|e}. Note that in-equation
on-the-fly variable declarations must be made on contemporaneous variables. on-the-fly variable declarations must be made on contemporaneous variables.
On-the-fly variable declarations do not have to appear in the first place where
this variable is encountered.
As an example, the following two snippets are equivalent: As an example, the following two snippets are equivalent:
@emph{Using on-the-fly variable and parameter declaration} @emph{Using on-the-fly variable and parameter declaration}
@example @example
model; model;
[endogenous='k',name='law of motion of capital']
k(+1) = i|e + (1-delta|p)*k; k(+1) = i|e + (1-delta|p)*k;
y|e = k|e^alpha|p; y|e = k^alpha|p;
@dots{} @dots{}
end; end;
delta = 0.025; delta = 0.025;
@ -1664,6 +1667,7 @@ delta = 0.025;
alpha = 0.36; alpha = 0.36;
@dots{} @dots{}
model; model;
[name='law of motion of capital']
k(1) = i|e + (1-delta|p)*k; k(1) = i|e + (1-delta|p)*k;
y|e = k|e^alpha|p; y|e = k|e^alpha|p;
@dots{} @dots{}
@ -3601,7 +3605,7 @@ is described below in more details. See also @file{fs2000.mod} in the
@file{examples} directory for an example. @file{examples} directory for an example.
The steady state file generated by Dynare will be called The steady state file generated by Dynare will be called
@file{@var{FILENAME}_steadystate2.m}. @file{+@var{FILENAME}/steadystate.m}.
@item @item
You can write the corresponding MATLAB function by hand. If your You can write the corresponding MATLAB function by hand. If your
@ -10838,8 +10842,8 @@ strings.
It is possible to construct macro-expressions which can be assigned to It is possible to construct macro-expressions which can be assigned to
macro-variables or used within a macro-directive. The expressions are macro-variables or used within a macro-directive. The expressions are
constructed using literals of the four basic types (integers, strings, constructed using literals of five basic types (integers, strings, arrays of
arrays of strings, arrays of integers), macro-variables names and strings, arrays of integers, and string functions), macro-variable names, and
standard operators. standard operators.
String literals have to be enclosed between @strong{double} quotes String literals have to be enclosed between @strong{double} quotes
@ -10902,6 +10906,14 @@ getting the length of an array: @code{length} operator (for example:
@code{[1,2,3]}) @code{[1,2,3]})
@end itemize @end itemize
The following operators can be used on string functions:
@itemize
@item
comparison operators: @code{==}, @code{!=}
@item
concatenation of two strings: @code{+}
@end itemize
Macro-expressions can be used at two places: Macro-expressions can be used at two places:
@itemize @itemize
@item @item
@ -10957,16 +10969,18 @@ file will be searched for in the folders provided by @ref{-I} and
@end deffn @end deffn
@deffn {Macro directive} @@#define @var{MACRO_VARIABLE} = @var{MACRO_EXPRESSION} @deffn {Macro directive} @@#define @var{MACRO_VARIABLE} = @var{MACRO_EXPRESSION}
Defines a macro-variable. Defines a macro-variable or macro-function
@customhead{Example 1} @customhead{Example 1}
@example @example
@@#define x = 5 // Integer @@#define x = 5 // Integer
@@#define y = "US" // String @@#define y = "US" // String
@@#define v = [ 1, 2, 4 ] // Integer array @@#define v = [ 1, 2, 4 ] // Integer array
@@#define w = [ "US", "EA" ] // String array @@#define w = [ "US", "EA" ] // String array
@@#define z = 3 + v[2] // Equals 5 @@#define z = 3 + v[2] // Equals 5
@@#define t = ("US" in w) // Equals 1 (true) @@#define t = ("US" in w) // Equals 1 (true)
@@#define f(x) = " + @@@{x@} + @@@{y@}" // Defines a function 'f' with argument 'x'
// that returns the string: ' + @@@{x@} + US'
@end example @end example
@customhead{Example 2} @customhead{Example 2}
@ -10974,15 +10988,16 @@ Defines a macro-variable.
@example @example
@@#define x = [ "B", "C" ] @@#define x = [ "B", "C" ]
@@#define i = 2 @@#define i = 2
@@#define f(x) = " + @@@{x@}"
model; model;
A = @@@{x[i]@}; A = @@@{x[i] + f("D")@};
end; end;
@end example @end example
is strictly equivalent to: is strictly equivalent to:
@example @example
model; model;
A = C; A = C + D;
end; end;
@end example @end example

View File

@ -233,16 +233,16 @@ else
'dataset_info',dataset_info); 'dataset_info',dataset_info);
% which files have to be copied to run remotely % which files have to be copied to run remotely
NamFileInput(1,:) = {'',[M_.fname '_static.m']}; NamFileInput(1,:) = {'',[M_.fname '.static.m']};
NamFileInput(2,:) = {'',[M_.fname '_dynamic.m']}; NamFileInput(2,:) = {'',[M_.fname '.dynamic.m']};
if M_.set_auxiliary_variables if M_.set_auxiliary_variables
NamFileInput(3,:) = {'',[M_.fname '_set_auxiliary_variables.m']}; NamFileInput(3,:) = {'',[M_.fname '.set_auxiliary_variables.m']};
end end
if options_.steadystate_flag if options_.steadystate_flag
if options_.steadystate_flag == 1 if options_.steadystate_flag == 1
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
else else
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate2.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '.steadystate.m']};
end end
end end
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'PosteriorIRF_core1', localVars, globalVars, options_.parallel_info); [fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'PosteriorIRF_core1', localVars, globalVars, options_.parallel_info);

View File

@ -82,7 +82,7 @@ ModelInversion.x_free_id = freeinnovations_id;
ModelInversion.J_id = [ModelInversion.y_free_id ; sum(DynareModel.lead_lag_incidence(:)>0)+ModelInversion.x_free_id]; ModelInversion.J_id = [ModelInversion.y_free_id ; sum(DynareModel.lead_lag_incidence(:)>0)+ModelInversion.x_free_id];
% Get the name of the dynamic model routines. % Get the name of the dynamic model routines.
model_dynamic = str2func([DynareModel.fname,'_dynamic']); model_dynamic = str2func([DynareModel.fname,'.dynamic']);
model_dtransf = str2func('dynamic_backward_model_for_inversion'); model_dtransf = str2func('dynamic_backward_model_for_inversion');
% Initialization of the returned simulations (endogenous variables). % Initialization of the returned simulations (endogenous variables).

View File

@ -36,7 +36,7 @@ function [residuals, info] = calibrateresiduals(dbase, info, DynareModel)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Get function handle for the dynamic model % Get function handle for the dynamic model
model_dynamic = str2func([DynareModel.fname,'_dynamic']); model_dynamic = str2func([DynareModel.fname,'.dynamic']);
% Get data for all the endogenous variables. % Get data for all the endogenous variables.
ydata = dbase{info.endonames{:}}.data; ydata = dbase{info.endonames{:}}.data;

View File

@ -31,7 +31,7 @@ if nargin<3
inversionflag = false; inversionflag = false;
end end
set_auxiliary_series = [DynareModel.fname '_dynamic_set_auxiliary_series']; set_auxiliary_series = [DynareModel.fname '.dynamic_set_auxiliary_series'];
if exist([set_auxiliary_series '.m']) if exist([set_auxiliary_series '.m'])
dbase = feval(set_auxiliary_series, dbase, DynareModel.params); dbase = feval(set_auxiliary_series, dbase, DynareModel.params);

View File

@ -203,7 +203,7 @@ if nargout>8
idx = 1:DynareModel.endo_nbr; idx = 1:DynareModel.endo_nbr;
jdx = idx+ny1; jdx = idx+ny1;
% Get the name of the dynamic model routine. % Get the name of the dynamic model routine.
model_dynamic = str2func([DynareModel.fname,'_dynamic']); model_dynamic = str2func([DynareModel.fname,'.dynamic']);
% initialization of vector y. % initialization of vector y.
y = NaN(length(idx)+ny1,1); y = NaN(length(idx)+ny1,1);
end end

View File

@ -21,5 +21,5 @@ function [r, g1] = block_mfs_steadystate(y, b, y_all, exo, params, M)
y_all(M.block_structure_stat.block(b).variable) = y; y_all(M.block_structure_stat.block(b).variable) = y;
eval(['[r,g1] = ' M.fname '_static(b, y_all, exo, params);']); eval(['[r,g1] = ' M.fname '.static(b, y_all, exo, params);']);
g1 = full(g1); g1 = full(g1);

View File

@ -77,7 +77,7 @@ options_.threads.local_state_space_iteration_2 = 1;
options_.jacobian_flag = 1; options_.jacobian_flag = 1;
% steady state file % steady state file
if exist([M_.fname '_steadystate2.m'],'file') if exist(['+' M_.fname '/steadystate.m'],'file')
options_.steadystate_flag = 2; options_.steadystate_flag = 2;
elseif exist([M_.fname '_steadystate.m'],'file') elseif exist([M_.fname '_steadystate.m'],'file')
options_.steadystate_flag = 1; options_.steadystate_flag = 1;

View File

@ -66,7 +66,7 @@ if options_.steadystate_flag
[junk,M_.params,info] = evaluate_steady_state_file(oo_.steady_state,[oo_.exo_steady_state; oo_.exo_det_steady_state],M_, ... [junk,M_.params,info] = evaluate_steady_state_file(oo_.steady_state,[oo_.exo_steady_state; oo_.exo_det_steady_state],M_, ...
options_,0); options_,0);
end end
[U,Uy,W] = feval([M_.fname,'_objective_static'],zeros(endo_nbr,1),[], M_.params); [U,Uy,W] = feval([M_.fname,'.objective.static'],zeros(endo_nbr,1),[], M_.params);
if any(any(Uy~=0)) if any(any(Uy~=0))
non_zero_derivs=find(any(Uy~=0)); non_zero_derivs=find(any(Uy~=0));
for ii=1:length(non_zero_derivs) for ii=1:length(non_zero_derivs)
@ -94,7 +94,7 @@ if exo_nbr == 0
oo_.exo_steady_state = [] ; oo_.exo_steady_state = [] ;
end end
[junk,jacobia_] = feval([M_.fname '_dynamic'],z, [zeros(size(oo_.exo_simul)) ... [junk,jacobia_] = feval([M_.fname '.dynamic'],z, [zeros(size(oo_.exo_simul)) ...
oo_.exo_det_simul], M_.params, zeros(endo_nbr,1), it_); oo_.exo_det_simul], M_.params, zeros(endo_nbr,1), it_);
if any(junk~=0) if any(junk~=0)
error(['discretionary_policy: the model must be written in deviation ' ... error(['discretionary_policy: the model must be written in deviation ' ...

View File

@ -73,7 +73,7 @@ end
if (options_.bytecode) if (options_.bytecode)
[chck, zz, data]= bytecode('dynamic','evaluate', z, zx, M_.params, dr.ys, 1, data); [chck, zz, data]= bytecode('dynamic','evaluate', z, zx, M_.params, dr.ys, 1, data);
else else
[r, data] = feval([M_.fname '_dynamic'], options_, M_, oo_, z', zx, M_.params, dr.ys, M_.maximum_lag+1, data); [r, data] = feval([M_.fname '.dynamic'], options_, M_, oo_, z', zx, M_.params, dr.ys, M_.maximum_lag+1, data);
chck = 0; chck = 0;
end end
mexErrCheck('bytecode', chck); mexErrCheck('bytecode', chck);

View File

@ -135,7 +135,7 @@ xx(1:M.orig_endo_nbr) = x(1:M.orig_endo_nbr); %set values of original endogenous
if any([M.aux_vars.type] ~= 6) %auxiliary variables other than multipliers if any([M.aux_vars.type] ~= 6) %auxiliary variables other than multipliers
needs_set_auxiliary_variables = 1; needs_set_auxiliary_variables = 1;
if M.set_auxiliary_variables if M.set_auxiliary_variables
fh = str2func([M.fname '_set_auxiliary_variables']); fh = str2func([M.fname '.set_auxiliary_variables']);
s_a_v_func = @(z) fh(z,... s_a_v_func = @(z) fh(z,...
[oo.exo_steady_state,... [oo.exo_steady_state,...
oo.exo_det_steady_state],... oo.exo_det_steady_state],...
@ -150,7 +150,7 @@ end
% value and Jacobian of objective function % value and Jacobian of objective function
ex = zeros(1,M.exo_nbr); ex = zeros(1,M.exo_nbr);
[U,Uy,Uyy] = feval([fname '_objective_static'],x,ex, params); [U,Uy,Uyy] = feval([fname '.objective.static'],x,ex, params);
Uyy = reshape(Uyy,endo_nbr,endo_nbr); Uyy = reshape(Uyy,endo_nbr,endo_nbr);
% set multipliers and auxiliary variables that % set multipliers and auxiliary variables that
@ -160,7 +160,7 @@ if (options_.bytecode)
params, 'evaluate'); params, 'evaluate');
fJ = junk.g1; fJ = junk.g1;
else else
[res,fJ] = feval([fname '_static'],xx,[oo.exo_steady_state oo.exo_det_steady_state], ... [res,fJ] = feval([fname '.static'],xx,[oo.exo_steady_state oo.exo_det_steady_state], ...
params); params);
end end
% index of multipliers and corresponding equations % index of multipliers and corresponding equations
@ -197,7 +197,7 @@ if (options_.bytecode)
[chck, res, junk] = bytecode('static',ys,[oo.exo_steady_state oo.exo_det_steady_state], ... [chck, res, junk] = bytecode('static',ys,[oo.exo_steady_state oo.exo_det_steady_state], ...
M.params, 'evaluate'); M.params, 'evaluate');
else else
res = feval([M.fname '_static'],ys,[oo.exo_steady_state oo.exo_det_steady_state], ... res = feval([M.fname '.static'],ys,[oo.exo_steady_state oo.exo_det_steady_state], ...
M.params); M.params);
end end
if norm(res) < options_.solve_tolf if norm(res) < options_.solve_tolf

View File

@ -160,7 +160,7 @@ end
z = repmat(ys,1,3); z = repmat(ys,1,3);
z = z(iyr0) ; z = z(iyr0) ;
[resid1,d1,d2] = feval([M.fname '_dynamic'],z,... [resid1,d1,d2] = feval([M.fname '.dynamic'],z,...
[oo.exo_simul ... [oo.exo_simul ...
oo.exo_det_simul], M.params, dr.ys, 2); oo.exo_det_simul], M.params, dr.ys, 2);
if ~isreal(d1) || ~isreal(d2) if ~isreal(d1) || ~isreal(d2)
@ -204,7 +204,7 @@ v_np = pm.v_np;
% assumed portfolio % assumed portfolio
dr.ys(v_p) = x; dr.ys(v_p) = x;
ys0 = dr.ys(v_np); ys0 = dr.ys(v_np);
f_h =str2func([M.fname '_static']); f_h =str2func([M.fname '.static']);
[dr.ys(v_np),info] = csolve(@ds_static_model,ys0,[],1e-10,100,f_h,x,pm.eq_np,v_np,v_p, ... [dr.ys(v_np),info] = csolve(@ds_static_model,ys0,[],1e-10,100,f_h,x,pm.eq_np,v_np,v_p, ...
M.endo_nbr,M.exo_nbr,M.params); M.endo_nbr,M.exo_nbr,M.params);
if info if info
@ -220,7 +220,7 @@ iyr0 = find(iyv) ;
z = repmat(dr.ys,1,3); z = repmat(dr.ys,1,3);
z = z(iyr0) ; z = z(iyr0) ;
[resid1,d1,d2] = feval([M.fname '_dynamic'],z,... [resid1,d1,d2] = feval([M.fname '.dynamic'],z,...
[oo.exo_simul ... [oo.exo_simul ...
oo.exo_det_simul], M.params, dr.ys, 2); oo.exo_det_simul], M.params, dr.ys, 2);
if ~isreal(d1) || ~isreal(d2) if ~isreal(d1) || ~isreal(d2)
@ -253,7 +253,7 @@ ys(pm.v_p) = x;
z = repmat(ys,1,3); z = repmat(ys,1,3);
z = z(iyr0) ; z = z(iyr0) ;
[resid1,d1,d2] = feval([M.fname '_dynamic'],z,... [resid1,d1,d2] = feval([M.fname '.dynamic'],z,...
[oo.exo_simul ... [oo.exo_simul ...
oo.exo_det_simul], M.params, dr.ys, 2); oo.exo_det_simul], M.params, dr.ys, 2);
if ~isreal(d1) || ~isreal(d2) if ~isreal(d1) || ~isreal(d2)
@ -294,7 +294,7 @@ end
z = repmat(ys,1,3); z = repmat(ys,1,3);
z = z(iyr0) ; z = z(iyr0) ;
[resid1,d1,d2] = feval([M.fname '_dynamic'],z,... [resid1,d1,d2] = feval([M.fname '.dynamic'],z,...
[oo.exo_simul ... [oo.exo_simul ...
oo.exo_det_simul], M.params, dr.ys, 2); oo.exo_det_simul], M.params, dr.ys, 2);
@ -329,7 +329,7 @@ resid = resid1+0.5*(d1(:,i_fwrd_f1)*ghuu(i_fwrd_g,:)+d2(:,i_fwrd_f2)* ...
kron(gu1,gu1))*vec(M.Sigma_e); kron(gu1,gu1))*vec(M.Sigma_e);
if nargout > 1 if nargout > 1
[resid1,d1,d2,d3] = feval([M.fname '_dynamic'],z,... [resid1,d1,d2,d3] = feval([M.fname '.dynamic'],z,...
[oo.exo_simul ... [oo.exo_simul ...
oo.exo_det_simul], M.params, dr.ys, 2); oo.exo_det_simul], M.params, dr.ys, 2);

View File

@ -137,7 +137,7 @@ else
fnamelength = length(fname) - 4; fnamelength = length(fname) - 4;
end end
if fnamelength + length('_set_auxiliary_variables') > namelengthmax() if fnamelength + length('.set_auxiliary_variables') > namelengthmax()
error('The name of your MOD file is too long, please shorten it') error('The name of your MOD file is too long, please shorten it')
end end
@ -283,4 +283,9 @@ end
if ~ isempty(find(abs(fname) == 46)) if ~ isempty(find(abs(fname) == 46))
fname = fname(:,1:find(abs(fname) == 46)-1) ; fname = fname(:,1:find(abs(fname) == 46)-1) ;
end end
evalin('base',fname) ;
% We need to clear the driver (and only the driver, because the "clear all"
% within the driver will clean the rest)
clear(['+' fname '/driver'])
evalin('base',[fname '.driver']) ;

View File

@ -36,7 +36,7 @@ if options.block && ~options.bytecode
ss(M.block_structure_stat.block(b).variable) = y; ss(M.block_structure_stat.block(b).variable) = y;
else else
n = length(M.block_structure_stat.block(b).variable); n = length(M.block_structure_stat.block(b).variable);
[ss, check] = solve_one_boundary([M.fname '_static_' int2str(b)], ss, exo, ... [ss, check] = solve_one_boundary([M.fname '.block.static_' int2str(b)], ss, exo, ...
params, [], M.block_structure_stat.block(b).variable, n, 1, 0, b, 0, options.simul.maxit, ... params, [], M.block_structure_stat.block(b).variable, n, 1, 0, b, 0, options.simul.maxit, ...
options.solve_tolf, ... options.solve_tolf, ...
options.slowc, 0, options.solve_algo, 1, 0, 0,M,options); options.slowc, 0, options.solve_algo, 1, 0, 0,M,options);
@ -46,7 +46,7 @@ if options.block && ~options.bytecode
end end
end end
end end
[r, g1, x] = feval([M.fname '_static'], b, ss, ... [r, g1, x] = feval([M.fname '.static'], b, ss, ...
exo, params); exo, params);
end end
elseif options.bytecode elseif options.bytecode

View File

@ -17,7 +17,7 @@ function e = euler_equation_error(y0,x,innovations,M,options,oo,pfm,nodes,weight
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
dynamic_model = str2func([M.fname '_dynamic']); dynamic_model = str2func([M.fname '.dynamic']);
ep = options.ep; ep = options.ep;
[y1, info_convergence, endogenousvariablespaths] = extended_path_core(ep.periods, ... [y1, info_convergence, endogenousvariablespaths] = extended_path_core(ep.periods, ...
M.endo_nbr, M.exo_nbr, ... M.endo_nbr, M.exo_nbr, ...

View File

@ -66,7 +66,7 @@ else
end end
pfm.i_cols_j = 1:pfm.nd; pfm.i_cols_j = 1:pfm.nd;
pfm.i_upd = pfm.ny+(1:pfm.periods*pfm.ny); pfm.i_upd = pfm.ny+(1:pfm.periods*pfm.ny);
pfm.dynamic_model = str2func([DynareModel.fname,'_dynamic']); pfm.dynamic_model = str2func([DynareModel.fname,'.dynamic']);
pfm.verbose = DynareOptions.ep.verbosity; pfm.verbose = DynareOptions.ep.verbosity;
pfm.maxit_ = DynareOptions.simul.maxit; pfm.maxit_ = DynareOptions.simul.maxit;
pfm.tolerance = DynareOptions.dynatol.f; pfm.tolerance = DynareOptions.dynatol.f;

View File

@ -49,7 +49,7 @@ gu(dr.order_var,:) = dr.ghu;
ys = oo.dr.ys; ys = oo.dr.ys;
[U,Uy,Uyy] = feval([M.fname '_objective_static'],ys,zeros(1,exo_nbr), ... [U,Uy,Uyy] = feval([M.fname '.objective.static'],ys,zeros(1,exo_nbr), ...
M.params); M.params);
%second order terms %second order terms
Uyy = full(Uyy); Uyy = full(Uyy);

View File

@ -43,7 +43,7 @@ if options.bytecode
exo_ss, params, ys, 1); exo_ss, params, ys, 1);
mexErrCheck('bytecode', check1); mexErrCheck('bytecode', check1);
else else
fh_static = str2func([M.fname '_static']); fh_static = str2func([M.fname '.static']);
if options.block if options.block
residuals = zeros(M.endo_nbr,1); residuals = zeros(M.endo_nbr,1);
for b = 1:length(M.block_structure_stat.block) for b = 1:length(M.block_structure_stat.block)

View File

@ -47,7 +47,7 @@ params = M.params;
exo_ss = [oo.exo_steady_state; oo.exo_det_steady_state]; exo_ss = [oo.exo_steady_state; oo.exo_det_steady_state];
if length(M.aux_vars) > 0 && ~steadystate_flag if length(M.aux_vars) > 0 && ~steadystate_flag
h_set_auxiliary_variables = str2func([M.fname '_set_auxiliary_variables']); h_set_auxiliary_variables = str2func([M.fname '.set_auxiliary_variables']);
if M.set_auxiliary_variables if M.set_auxiliary_variables
ys_init = h_set_auxiliary_variables(ys_init,exo_ss,M.params); ys_init = h_set_auxiliary_variables(ys_init,exo_ss,M.params);
end end
@ -219,7 +219,7 @@ elseif steadystate_flag
elseif (options.bytecode == 0 && options.block == 0) elseif (options.bytecode == 0 && options.block == 0)
if options.linear == 0 if options.linear == 0
% non linear model % non linear model
static_model = str2func([M.fname '_static']); static_model = str2func([M.fname '.static']);
[ys,check] = dynare_solve(@static_problem,... [ys,check] = dynare_solve(@static_problem,...
ys_init,... ys_init,...
options, exo_ss, params,... options, exo_ss, params,...
@ -247,7 +247,7 @@ elseif (options.bytecode == 0 && options.block == 0)
end end
else else
% linear model % linear model
fh_static = str2func([M.fname '_static']); fh_static = str2func([M.fname '.static']);
[fvec,jacob] = fh_static(ys_init,exo_ss, ... [fvec,jacob] = fh_static(ys_init,exo_ss, ...
params); params);
@ -312,12 +312,12 @@ if M.static_and_dynamic_models_differ
[chck, r, junk]= bytecode('dynamic','evaluate', z, zx, M.params, ys, 1); [chck, r, junk]= bytecode('dynamic','evaluate', z, zx, M.params, ys, 1);
mexErrCheck('bytecode', chck); mexErrCheck('bytecode', chck);
elseif options.block elseif options.block
[r, oo.dr] = feval([M.fname '_dynamic'], z', zx, M.params, ys, M.maximum_lag+1, oo.dr); [r, oo.dr] = feval([M.fname '.dynamic'], z', zx, M.params, ys, M.maximum_lag+1, oo.dr);
else else
iyv = M.lead_lag_incidence'; iyv = M.lead_lag_incidence';
iyr0 = find(iyv(:)); iyr0 = find(iyv(:));
xys = z(iyr0); xys = z(iyr0);
r = feval([M.fname '_dynamic'], z(iyr0), zx, M.params, ys, M.maximum_lag + 1); r = feval([M.fname '.dynamic'], z(iyr0), zx, M.params, ys, M.maximum_lag + 1);
end end
% Fail if residual greater than tolerance % Fail if residual greater than tolerance
if max(abs(r)) > options.solve_tolf if max(abs(r)) > options.solve_tolf

View File

@ -53,7 +53,7 @@ if options.steadystate_flag == 1
params1 = evalin('base','M_.params'); params1 = evalin('base','M_.params');
else % steadystate_flag == 2 else % steadystate_flag == 2
% new format % new format
h_steadystate = str2func([fname '_steadystate2']); h_steadystate = str2func([fname '.steadystate']);
[ys,params1,check] = h_steadystate(ys_init, exo_ss, params); [ys,params1,check] = h_steadystate(ys_init, exo_ss, params);
end end
@ -75,7 +75,7 @@ if M.set_auxiliary_variables
% variables only if the model has auxiliary variables. Otherwise % variables only if the model has auxiliary variables. Otherwise
% Octave may crash (see https://savannah.gnu.org/bugs/?52568) because % Octave may crash (see https://savannah.gnu.org/bugs/?52568) because
% the function does not exist in the path. % the function does not exist in the path.
h_set_auxiliary_variables = str2func([M.fname '_set_auxiliary_variables']); h_set_auxiliary_variables = str2func([M.fname '.set_auxiliary_variables']);
end end
if isnan(updated_params_flag) || (updated_params_flag && any(isnan(params(~isnan(params))-params1(~isnan(params))))) %checks if new NaNs were added if isnan(updated_params_flag) || (updated_params_flag && any(isnan(params(~isnan(params))-params1(~isnan(params))))) %checks if new NaNs were added

View File

@ -33,5 +33,5 @@ global it_ M_ oo_
n1 = size(x,1) - M_.exo_nbr; n1 = size(x,1) - M_.exo_nbr;
oo_.exo_simul(it_+M_.maximum_lag-M_.maximum_lag,:) = x(n1+1:end)'; oo_.exo_simul(it_+M_.maximum_lag-M_.maximum_lag,:) = x(n1+1:end)';
fh = str2func([M_.fname '_static']); fh = str2func([M_.fname '.static']);
y=feval(fh,x(1:n1),oo_.exo_simul, M_.params); y=feval(fh,x(1:n1),oo_.exo_simul, M_.params);

View File

@ -124,7 +124,7 @@ end
if kronflag==-2 if kronflag==-2
if nargout>5 if nargout>5
[residual, g1, g2 ] = feval([M_.fname,'_dynamic'],yy0, oo_.exo_steady_state', ... [residual, g1, g2 ] = feval([M_.fname,'.dynamic'],yy0, oo_.exo_steady_state', ...
M_.params, oo_.dr.ys, 1); M_.params, oo_.dr.ys, 1);
g22 = hessian_sparse('thet2tau',[M_.params(indx)],options_.gstep,estim_params_,M_, oo_, indx,[],-1); g22 = hessian_sparse('thet2tau',[M_.params(indx)],options_.gstep,estim_params_,M_, oo_, indx,[],-1);
H2ss=full(g22(1:M_.endo_nbr,:)); H2ss=full(g22(1:M_.endo_nbr,:));
@ -144,7 +144,7 @@ if kronflag==-2
g22 = gx22; g22 = gx22;
clear gx22; clear gx22;
else else
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, oo_.exo_steady_state', ... [residual, g1 ] = feval([M_.fname,'.dynamic'],yy0, oo_.exo_steady_state', ...
M_.params, oo_.dr.ys, 1); M_.params, oo_.dr.ys, 1);
end end
gp = fjaco('thet2tau',[M_.params(indx)],estim_params_,M_, oo_, indx,[],-1); gp = fjaco('thet2tau',[M_.params(indx)],estim_params_,M_, oo_, indx,[],-1);
@ -154,17 +154,17 @@ if kronflag==-2
else else
dyssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr); dyssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr);
d2yssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr,M_.param_nbr); d2yssdtheta=zeros(length(oo_.dr.ys),M_.param_nbr,M_.param_nbr);
[residual, gg1] = feval([M_.fname,'_static'],oo_.dr.ys, oo_.exo_steady_state', M_.params); [residual, gg1] = feval([M_.fname,'.static'],oo_.dr.ys, oo_.exo_steady_state', M_.params);
df = feval([M_.fname,'_static_params_derivs'],oo_.dr.ys, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), ... df = feval([M_.fname,'.static_params_derivs'],oo_.dr.ys, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), ...
M_.params); M_.params);
dyssdtheta = -gg1\df; dyssdtheta = -gg1\df;
if nargout>5 if nargout>5
[residual, gg1, gg2] = feval([M_.fname,'_static'],oo_.dr.ys, oo_.exo_steady_state', M_.params); [residual, gg1, gg2] = feval([M_.fname,'.static'],oo_.dr.ys, oo_.exo_steady_state', M_.params);
[residual, g1, g2, g3] = feval([M_.fname,'_dynamic'],yy0, oo_.exo_steady_state', ... [residual, g1, g2, g3] = feval([M_.fname,'.dynamic'],yy0, oo_.exo_steady_state', ...
M_.params, oo_.dr.ys, 1); M_.params, oo_.dr.ys, 1);
[nr, nc]=size(gg2); [nr, nc]=size(gg2);
[df, gpx, d2f] = feval([M_.fname,'_static_params_derivs'],oo_.dr.ys, oo_.exo_steady_state', ... [df, gpx, d2f] = feval([M_.fname,'.static_params_derivs'],oo_.dr.ys, oo_.exo_steady_state', ...
M_.params);%, oo_.dr.ys, 1, dyssdtheta*0, d2yssdtheta); M_.params);%, oo_.dr.ys, 1, dyssdtheta*0, d2yssdtheta);
d2f = get_all_resid_2nd_derivs(d2f,length(oo_.dr.ys),M_.param_nbr); d2f = get_all_resid_2nd_derivs(d2f,length(oo_.dr.ys),M_.param_nbr);
if isempty(find(gg2)) if isempty(find(gg2))
@ -201,13 +201,13 @@ else
end end
end end
if nargout>5 if nargout>5
[df, gp, d2f, gpp, hp] = feval([M_.fname,'_params_derivs'],yy0, oo_.exo_steady_state', ... [df, gp, d2f, gpp, hp] = feval([M_.fname,'.dynamic_params_derivs'],yy0, oo_.exo_steady_state', ...
M_.params, oo_.dr.ys, 1, dyssdtheta, d2yssdtheta); M_.params, oo_.dr.ys, 1, dyssdtheta, d2yssdtheta);
H2ss = d2yssdtheta(oo_.dr.order_var,indx,indx); H2ss = d2yssdtheta(oo_.dr.order_var,indx,indx);
else else
[df, gp] = feval([M_.fname,'_params_derivs'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ... [df, gp] = feval([M_.fname,'.dynamic_params_derivs'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ...
M_.params, oo_.dr.ys, 1, dyssdtheta,d2yssdtheta); M_.params, oo_.dr.ys, 1, dyssdtheta,d2yssdtheta);
[residual, g1, g2 ] = feval([M_.fname,'_dynamic'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ... [residual, g1, g2 ] = feval([M_.fname,'.dynamic'],yy0, repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1,1]), ...
M_.params, oo_.dr.ys, 1); M_.params, oo_.dr.ys, 1);
end end

View File

@ -52,7 +52,7 @@ fig_name_long = opts_decomp.fig_name;
use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
screen_shocks = opts_decomp.screen_shocks; screen_shocks = opts_decomp.screen_shocks;
if use_shock_groups | comp_nbr<=18 if ~isempty(use_shock_groups) || comp_nbr<=18
screen_shocks=0; screen_shocks=0;
end end
if use_shock_groups if use_shock_groups
@ -189,7 +189,7 @@ for j=1:nvar
hold on hold on
ht = text(0.3,y1+0.3*height,labels(i,:),'Interpreter','none'); ht = text(0.3,y1+0.3*height,labels(i,:),'Interpreter','none');
hold on hold on
if interactive & (~isoctave & use_shock_groups) if interactive && (~isoctave && ~isempty(use_shock_groups))
mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end); mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end);
mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
mydata.shock_group = shock_groups.(shock_ind{i}); mydata.shock_group = shock_groups.(shock_ind{i});

View File

@ -52,7 +52,7 @@ if ~isempty(opts_decomp.type)
fig_mode = [fig_mode '_']; fig_mode = [fig_mode '_'];
end end
screen_shocks = opts_decomp.screen_shocks; screen_shocks = opts_decomp.screen_shocks;
if DynareOptions.plot_shock_decomp.use_shock_groups | comp_nbr<=18 if ~isempty(DynareOptions.plot_shock_decomp.use_shock_groups) || comp_nbr<=18
screen_shocks=0; screen_shocks=0;
end end
fig_name_long = opts_decomp.fig_name; fig_name_long = opts_decomp.fig_name;
@ -166,7 +166,7 @@ for j=1:nvar
ineg=zz<0; ineg=zz<0;
hax = subplot(nrow,ncol,i); set(gca,'box','on') hax = subplot(nrow,ncol,i); set(gca,'box','on')
hbar = bar(x(2:end),(zz.*ipos)','stacked','FaceColor','flat'); hbar = bar(x(2:end),(zz.*ipos)','stacked','FaceColor','flat');
if ~matlab_ver_less_than('9.3.0') if ~isoctave && ~matlab_ver_less_than('9.3.0')
% make bar obey colormap under MATLAB R2017b % make bar obey colormap under MATLAB R2017b
for k = 1:2 for k = 1:2
hbar(k).CData = k; hbar(k).CData = k;
@ -175,7 +175,7 @@ for j=1:nvar
set(hbar,'edgecolor','flat'); set(hbar,'edgecolor','flat');
hold on, hold on,
hbar = bar(x(2:end),(zz.*ineg)','stacked','FaceColor','flat'); hbar = bar(x(2:end),(zz.*ineg)','stacked','FaceColor','flat');
if ~matlab_ver_less_than('9.3.0') if ~isoctave && ~matlab_ver_less_than('9.3.0')
% make bar obey colormap under MATLAB R2017b % make bar obey colormap under MATLAB R2017b
for k = 1:2 for k = 1:2
hbar(k).CData = k; hbar(k).CData = k;
@ -191,7 +191,7 @@ for j=1:nvar
a0(4)=max(a(4),a0(4)); a0(4)=max(a(4),a0(4));
set(gca,'ylim',a0(3:4)) set(gca,'ylim',a0(3:4))
hold on, h1=plot(x(2:end),z1(end,:),'k-','LineWidth',2); hold on, h1=plot(x(2:end),z1(end,:),'k-','LineWidth',2);
if interactive & (~isoctave & use_shock_groups) if interactive && (~isoctave && ~isempty(use_shock_groups))
mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end); mydata.fig_name = DynareOptions.plot_shock_decomp.fig_name(2:end);
mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups; mydata.use_shock_groups = DynareOptions.plot_shock_decomp.use_shock_groups;
mydata.shock_group = shock_groups.(shock_ind{ic}); mydata.shock_group = shock_groups.(shock_ind{ic});

View File

@ -77,7 +77,7 @@ if info(1)==0
oo0=oo_; oo0=oo_;
tau=[oo_.dr.ys(oo_.dr.order_var); vec(A); dyn_vech(B*M_.Sigma_e*B')]; tau=[oo_.dr.ys(oo_.dr.order_var); vec(A); dyn_vech(B*M_.Sigma_e*B')];
yy0=oo_.dr.ys(I); yy0=oo_.dr.ys(I);
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ... [residual, g1 ] = feval([M_.fname,'.dynamic'],yy0, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), M_.params, ... repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), M_.params, ...
oo_.dr.ys, 1); oo_.dr.ys, 1);
vg1 = [oo_.dr.ys(oo_.dr.order_var); vec(g1)]; vg1 = [oo_.dr.ys(oo_.dr.order_var); vec(g1)];

View File

@ -54,7 +54,7 @@ i_upd = ny+(1:periods*ny);
x = endo_simul(:); x = endo_simul(:);
model_dynamic = str2func([M.fname,'_dynamic']); model_dynamic = str2func([M.fname,'.dynamic']);
z = x(find(lead_lag_incidence')); z = x(find(lead_lag_incidence'));
[res,A] = model_dynamic(z, exo_simul, params, steady_state,2); [res,A] = model_dynamic(z, exo_simul, params, steady_state,2);
nnzA = nnz(A); nnzA = nnz(A);

View File

@ -115,7 +115,7 @@ for b=1:nb
int2str(b)]); int2str(b)]);
end end
else else
[res,jacob]=feval([M.fname '_static'],dr.ys,exo,M.params); [res,jacob]=feval([M.fname '.static'],dr.ys,exo,M.params);
end end
if any(any(isinf(jacob) | isnan(jacob))) if any(any(isinf(jacob) | isnan(jacob)))
problem_dummy=1; problem_dummy=1;
@ -208,7 +208,7 @@ if ~options.block
M.params, dr.ys, 1); M.params, dr.ys, 1);
jacobia_ = [loc_dr.g1 loc_dr.g1_x loc_dr.g1_xd]; jacobia_ = [loc_dr.g1 loc_dr.g1_x loc_dr.g1_xd];
else else
[junk,jacobia_] = feval([M.fname '_dynamic'],z(iyr0),exo_simul, ... [junk,jacobia_] = feval([M.fname '.dynamic'],z(iyr0),exo_simul, ...
M.params, dr.ys, it_); M.params, dr.ys, it_);
end end
elseif options.order >= 2 elseif options.order >= 2
@ -217,7 +217,7 @@ if ~options.block
M.params, dr.ys, 1); M.params, dr.ys, 1);
jacobia_ = [loc_dr.g1 loc_dr.g1_x]; jacobia_ = [loc_dr.g1 loc_dr.g1_x];
else else
[junk,jacobia_,hessian1] = feval([M.fname '_dynamic'],z(iyr0),... [junk,jacobia_,hessian1] = feval([M.fname '.dynamic'],z(iyr0),...
exo_simul, ... exo_simul, ...
M.params, dr.ys, it_); M.params, dr.ys, it_);
end end

View File

@ -5,15 +5,15 @@ y = z(find(ll(:)));
switch nargout switch nargout
case 1 case 1
r = feval([M.fname '_dynamic'],y,x, ... r = feval([M.fname '.dynamic'],y,x, ...
M.params, ss, 1); M.params, ss, 1);
case 2 case 2
[r,g1] = feval([M.fname '_dynamic'],y,x, ... [r,g1] = feval([M.fname '.dynamic'],y,x, ...
M.params, ss, 1); M.params, ss, 1);
case 3 case 3
[r,g1,g2] = feval([M.fname '_dynamic'],y,x, ... [r,g1,g2] = feval([M.fname '.dynamic'],y,x, ...
M.params, ss, 1); M.params, ss, 1);
case 4 case 4
[r,g1,g2,g3] = feval([M.fname '_dynamic'],y,x, ... [r,g1,g2,g3] = feval([M.fname '.dynamic'],y,x, ...
M.params, ss, 1); M.params, ss, 1);
end end

View File

@ -44,11 +44,11 @@ y = [y;ys_(lea_cols)];
if ismac if ismac
eval(['[resid,g1]=',M_.fname,'_dynamic(y,x, M_.params, ys_, it_);']); eval(['[resid,g1]=',M_.fname,'.dynamic(y,x, M_.params, ys_, it_);']);
% Older versions of DYNARE for Mac did not include ys_ in the call structure % Older versions of DYNARE for Mac did not include ys_ in the call structure
%eval(['[resid,g1]=',M_.fname,'_dynamic(y,x, M_.params, it_);']); %eval(['[resid,g1]=',M_.fname,'.dynamic(y,x, M_.params, it_);']);
else else
eval(['[resid,g1]=',M_.fname,'_dynamic(y,x, M_.params, ys_, it_);']); eval(['[resid,g1]=',M_.fname,'.dynamic(y,x, M_.params, ys_, it_);']);
end end

View File

@ -65,7 +65,7 @@ end
dr.ys = ys; dr.ys = ys;
check1 = 0; check1 = 0;
% testing for steadystate file % testing for steadystate file
fh = str2func([M_.fname '_static']); fh = str2func([M_.fname '.static']);
if options_.steadystate_flag if options_.steadystate_flag
[dr.ys,check1] = feval([M_.fname '_steadystate'],dr.ys,... [dr.ys,check1] = feval([M_.fname '_steadystate'],dr.ys,...
[oo_.exo_steady_state; ... [oo_.exo_steady_state; ...

View File

@ -27,7 +27,7 @@ for i=1:n+1
[exo_steady_state; ... [exo_steady_state; ...
exo_det_steady_state],params); exo_det_steady_state],params);
else else
res = feval([fname '_static'],ys1,... res = feval([fname '.static'],ys1,...
[exo_steady_state; ... [exo_steady_state; ...
exo_det_steady_state],params); exo_det_steady_state],params);
end end

View File

@ -130,7 +130,7 @@ else
z = repmat(dr.ys,1,klen); z = repmat(dr.ys,1,klen);
end end
z = z(iyr0) ; z = z(iyr0) ;
[junk,jacobia_] = feval([M_.fname '_dynamic'],z,[oo_.exo_simul ... [junk,jacobia_] = feval([M_.fname '.dynamic'],z,[oo_.exo_simul ...
oo_.exo_det_simul], M_.params, dr.ys, it_); oo_.exo_det_simul], M_.params, dr.ys, it_);
if options_.ACES_solver==1 && (length(sim_ruleids)>0 || length(tct_ruleids)>0 ) if options_.ACES_solver==1 && (length(sim_ruleids)>0 || length(tct_ruleids)>0 )

View File

@ -475,7 +475,7 @@ if pf && ~surprise
if (options_.bytecode) if (options_.bytecode)
[chck, zz, data1]= bytecode('dynamic','evaluate', z, zx, M_.params, oo_.steady_state, k, data1); [chck, zz, data1]= bytecode('dynamic','evaluate', z, zx, M_.params, oo_.steady_state, k, data1);
else else
[zz, g1b] = feval([M_.fname '_dynamic'], z', zx, M_.params, oo_.steady_state, k); [zz, g1b] = feval([M_.fname '.dynamic'], z', zx, M_.params, oo_.steady_state, k);
data1.g1_x = g1b(:,end - M_.exo_nbr + 1:end); data1.g1_x = g1b(:,end - M_.exo_nbr + 1:end);
data1.g1 = g1b(:,1 : end - M_.exo_nbr); data1.g1 = g1b(:,1 : end - M_.exo_nbr);
chck = 0; chck = 0;
@ -747,7 +747,7 @@ else
if (options_.bytecode) if (options_.bytecode)
[chck, zz, data1]= bytecode('dynamic','evaluate', z, zx, M_.params, oo_.steady_state, k, data1); [chck, zz, data1]= bytecode('dynamic','evaluate', z, zx, M_.params, oo_.steady_state, k, data1);
else else
[zz, g1b] = feval([M_.fname '_dynamic'], z', zx, M_.params, oo_.steady_state, k); [zz, g1b] = feval([M_.fname '.dynamic'], z', zx, M_.params, oo_.steady_state, k);
data1.g1_x = g1b(:,end - M_.exo_nbr + 1:end); data1.g1_x = g1b(:,end - M_.exo_nbr + 1:end);
data1.g1 = g1b(:,1 : end - M_.exo_nbr); data1.g1 = g1b(:,1 : end - M_.exo_nbr);
chck = 0; chck = 0;

View File

@ -39,7 +39,7 @@ params = M_.params;
endo_simul = oo_.endo_simul; endo_simul = oo_.endo_simul;
exo_simul = oo_.exo_simul; exo_simul = oo_.exo_simul;
model_dynamic = str2func([M_.fname,'_dynamic']); model_dynamic = str2func([M_.fname,'.dynamic']);
residuals = zeros(ny,periods); residuals = zeros(ny,periods);

View File

@ -41,7 +41,7 @@ persistent lead_lag_incidence dynamic_model ny nyp nyf nrs nrc iyf iyp isp is is
if ~nargin && isempty(iflag)% Initialization of the persistent variables. if ~nargin && isempty(iflag)% Initialization of the persistent variables.
lead_lag_incidence = M_.lead_lag_incidence; lead_lag_incidence = M_.lead_lag_incidence;
dynamic_model = [M_.fname '_dynamic']; dynamic_model = [M_.fname '.dynamic'];
ny = size(oo_.endo_simul,1); ny = size(oo_.endo_simul,1);
nyp = nnz(lead_lag_incidence(1,:));% number of lagged variables. nyp = nnz(lead_lag_incidence(1,:));% number of lagged variables.
nyf = nnz(lead_lag_incidence(3,:));% number of leaded variables. nyf = nnz(lead_lag_incidence(3,:));% number of leaded variables.

View File

@ -40,7 +40,7 @@ end
options_.scalv= 1; options_.scalv= 1;
if options_.debug if options_.debug
model_static = str2func([M_.fname,'_static']); model_static = str2func([M_.fname,'.static']);
for ii=1:size(oo_.exo_simul,1) for ii=1:size(oo_.exo_simul,1)
[residual(:,ii)] = model_static(oo_.steady_state, oo_.exo_simul(ii,:),M_.params); [residual(:,ii)] = model_static(oo_.steady_state, oo_.exo_simul(ii,:),M_.params);
end end
@ -183,7 +183,7 @@ if ~isreal(oo_.endo_simul(:)) %can only happen without bytecode
illi = illi(:,2:3); illi = illi(:,2:3);
[i_cols_J1,junk,i_cols_1] = find(illi(:)); [i_cols_J1,junk,i_cols_1] = find(illi(:));
i_cols_T = nonzeros(M_.lead_lag_incidence(1:2,:)'); i_cols_T = nonzeros(M_.lead_lag_incidence(1:2,:)');
residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '_dynamic']), y0, yT, ... residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '.dynamic']), y0, yT, ...
oo_.exo_simul,M_.params,oo_.steady_state, ... oo_.exo_simul,M_.params,oo_.steady_state, ...
M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ... M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ...
i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ... i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ...

View File

@ -58,7 +58,7 @@ if options_.block
mexErrCheck('bytecode', info); mexErrCheck('bytecode', info);
end end
else else
oo_ = feval([M_.fname '_dynamic'], options_, M_, oo_); oo_ = feval([M_.fname '.dynamic'], options_, M_, oo_);
end end
else else
if options_.bytecode if options_.bytecode
@ -134,7 +134,7 @@ if nargout>1
if options_.bytecode if options_.bytecode
[chck, residuals, junk]= bytecode('dynamic','evaluate', oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1); [chck, residuals, junk]= bytecode('dynamic','evaluate', oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1);
else else
residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '_dynamic']), y0, yT, ... residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '.dynamic']), y0, yT, ...
oo_.exo_simul,M_.params,oo_.steady_state, ... oo_.exo_simul,M_.params,oo_.steady_state, ...
M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ... M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ...
i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ... i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ...

View File

@ -75,4 +75,4 @@ illi = M.lead_lag_incidence';
illi = illi(:,2:3); illi = illi(:,2:3);
[i_cols_J1, junk,i_cols_1] = find(illi(:)); [i_cols_J1, junk,i_cols_1] = find(illi(:));
i_cols_T = nonzeros(M.lead_lag_incidence(1:2,:)'); i_cols_T = nonzeros(M.lead_lag_incidence(1:2,:)');
dynamicmodel = str2func([M.fname,'_dynamic']); dynamicmodel = str2func([M.fname,'.dynamic']);

View File

@ -43,7 +43,7 @@ if options_.block
mexErrCheck('bytecode', info); mexErrCheck('bytecode', info);
end end
else else
oo_ = feval([M_.fname '_dynamic'], options_, M_, oo_); oo_ = feval([M_.fname '.dynamic'], options_, M_, oo_);
end end
else else
if options_.bytecode if options_.bytecode
@ -110,7 +110,7 @@ if nargout>1
if options_.bytecode if options_.bytecode
[chck, residuals, junk]= bytecode('dynamic','evaluate', oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1); [chck, residuals, junk]= bytecode('dynamic','evaluate', oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1);
else else
residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '_dynamic']), y0, yT, ... residuals = perfect_foresight_problem(yy(:),str2func([M_.fname '.dynamic']), y0, yT, ...
oo_.exo_simul,M_.params,oo_.steady_state, ... oo_.exo_simul,M_.params,oo_.steady_state, ...
M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ... M_.maximum_lag,options_.periods,M_.endo_nbr,i_cols, ...
i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ... i_cols_J1, i_cols_1, i_cols_T, i_cols_j, ...

View File

@ -76,7 +76,7 @@ if verbose
skipline() skipline()
end end
model_dynamic = str2func([M.fname,'_dynamic']); model_dynamic = str2func([M.fname,'.dynamic']);
z = Y(find(lead_lag_incidence')); z = Y(find(lead_lag_incidence'));
[d1,jacobian] = model_dynamic(z, exogenousvariables, params, steadystate,maximum_lag+1); [d1,jacobian] = model_dynamic(z, exogenousvariables, params, steadystate,maximum_lag+1);

View File

@ -48,7 +48,7 @@ isf1 = [nyp+ny+1:nyf+nyp+ny+1];
stop = false; stop = false;
iz = [1:ny+nyp+nyf]; iz = [1:ny+nyp+nyf];
dynamicmodel = sprintf('%s_dynamic', M.fname); dynamicmodel = sprintf('%s.dynamic', M.fname);
verbose = options.verbosity; verbose = options.verbosity;

View File

@ -107,7 +107,7 @@ if verbose
skipline() skipline()
end end
dynamicmodel = str2func([M.fname,'_dynamic']); dynamicmodel = str2func([M.fname,'.dynamic']);
z = steadystate_y([ip; ic; in]); z = steadystate_y([ip; ic; in]);
x = repmat(transpose(steadystate_x), 1+M.maximum_exo_lag+M.maximum_exo_lead, 1); x = repmat(transpose(steadystate_x), 1+M.maximum_exo_lag+M.maximum_exo_lead, 1);

View File

@ -34,7 +34,7 @@ if ny0 ~= M.endo_nbr
error('All endogenous variables must appear at the current period!') error('All endogenous variables must appear at the current period!')
end end
dynamicmodel = str2func([M.fname,'_dynamic']); dynamicmodel = str2func([M.fname,'.dynamic']);
info.status = 1; info.status = 1;

View File

@ -25,7 +25,7 @@ if ny0 ~= M.endo_nbr
error('All endogenous variables must appear at the current period!') error('All endogenous variables must appear at the current period!')
end end
dynamicmodel = str2func([M.fname,'_dynamic']); dynamicmodel = str2func([M.fname,'.dynamic']);
info.status = 1; info.status = 1;

View File

@ -125,16 +125,16 @@ else
% Global variables for parallel routines. % Global variables for parallel routines.
globalVars = struct(); globalVars = struct();
% which files have to be copied to run remotely % which files have to be copied to run remotely
NamFileInput(1,:) = {'',[ModelName '_static.m']}; NamFileInput(1,:) = {'',[ModelName '.static.m']};
NamFileInput(2,:) = {'',[ModelName '_dynamic.m']}; NamFileInput(2,:) = {'',[ModelName '.dynamic.m']};
if M_.set_auxiliary_variables if M_.set_auxiliary_variables
NamFileInput(3,:) = {'',[M_.fname '_set_auxiliary_variables.m']}; NamFileInput(3,:) = {'',[M_.fname '.set_auxiliary_variables.m']};
end end
if options_.steadystate_flag if options_.steadystate_flag
if options_.steadystate_flag == 1 if options_.steadystate_flag == 1
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
else else
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate2.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '.steadystate.m']};
end end
end end
if (options_.load_mh_file~=0) && any(fline>1) if (options_.load_mh_file~=0) && any(fline>1)

View File

@ -292,16 +292,16 @@ else
'estim_params_', estim_params_, ... 'estim_params_', estim_params_, ...
'oo_', oo_); 'oo_', oo_);
% which files have to be copied to run remotely % which files have to be copied to run remotely
NamFileInput(1,:) = {'',[M_.fname '_static.m']}; NamFileInput(1,:) = {'',[M_.fname '.static.m']};
NamFileInput(2,:) = {'',[M_.fname '_dynamic.m']}; NamFileInput(2,:) = {'',[M_.fname '.dynamic.m']};
if M.set_auxiliary_variables if M.set_auxiliary_variables
NamFileInput(3,:) = {'',[M_.fname '_set_auxiliary_variables.m']}; NamFileInput(3,:) = {'',[M_.fname '.set_auxiliary_variables.m']};
end end
if options_.steadystate_flag if options_.steadystate_flag
if options_.steadystate_flag == 1 if options_.steadystate_flag == 1
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
else else
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate2.m']}; NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '.steadystate.m']};
end end
end end
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars, options_.parallel_info); [fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars, options_.parallel_info);

View File

@ -70,7 +70,7 @@ end
if options_.block && ~options_.bytecode if options_.block && ~options_.bytecode
z = zeros(M_.endo_nbr,1); z = zeros(M_.endo_nbr,1);
for i = 1:length(M_.block_structure_stat.block) for i = 1:length(M_.block_structure_stat.block)
[r, g, yy, var_indx] = feval([M_.fname '_static'],... [r, g, yy, var_indx] = feval([M_.fname '.static'],...
i,... i,...
oo_.steady_state,... oo_.steady_state,...
[oo_.exo_steady_state; ... [oo_.exo_steady_state; ...
@ -82,7 +82,7 @@ elseif options_.bytecode
[check, z] = bytecode('evaluate','static'); [check, z] = bytecode('evaluate','static');
mexErrCheck('bytecode', check); mexErrCheck('bytecode', check);
else else
z = feval([M_.fname '_static'],... z = feval([M_.fname '.static'],...
oo_.steady_state,... oo_.steady_state,...
[oo_.exo_steady_state; ... [oo_.exo_steady_state; ...
oo_.exo_det_steady_state], M_.params); oo_.exo_det_steady_state], M_.params);

View File

@ -25,7 +25,7 @@ ss = oo_.steady_state;
ss(indx) = y; ss(indx) = y;
eval(['[R,G] = ' M_.fname '_static(ss, x, M_.params);']); eval(['[R,G] = ' M_.fname '.static(ss, x, M_.params);']);
sR = R(inde); sR = R(inde);
sG = G(inde,indx); sG = G(inde,indx);

View File

@ -115,7 +115,7 @@ if local_order == 1
M_.params, dr.ys, 1); M_.params, dr.ys, 1);
jacobia_ = [loc_dr.g1 loc_dr.g1_x loc_dr.g1_xd]; jacobia_ = [loc_dr.g1 loc_dr.g1_x loc_dr.g1_xd];
else else
[junk,jacobia_] = feval([M_.fname '_dynamic'],z(iyr0),exo_simul, ... [junk,jacobia_] = feval([M_.fname '.dynamic'],z(iyr0),exo_simul, ...
M_.params, dr.ys, it_); M_.params, dr.ys, it_);
end end
elseif local_order == 2 elseif local_order == 2
@ -124,7 +124,7 @@ elseif local_order == 2
M_.params, dr.ys, 1); M_.params, dr.ys, 1);
jacobia_ = [loc_dr.g1 loc_dr.g1_x]; jacobia_ = [loc_dr.g1 loc_dr.g1_x];
else else
[junk,jacobia_,hessian1] = feval([M_.fname '_dynamic'],z(iyr0),... [junk,jacobia_,hessian1] = feval([M_.fname '.dynamic'],z(iyr0),...
exo_simul, ... exo_simul, ...
M_.params, dr.ys, it_); M_.params, dr.ys, it_);
end end

View File

@ -50,7 +50,7 @@ if flagmoments==0
elseif flagmoments==-1 elseif flagmoments==-1
[I,J]=find(M_.lead_lag_incidence'); [I,J]=find(M_.lead_lag_incidence');
yy0=oo_.dr.ys(I); yy0=oo_.dr.ys(I);
[residual, g1] = feval([M_.fname,'_dynamic'],yy0, oo_.exo_steady_state', ... [residual, g1] = feval([M_.fname,'.dynamic'],yy0, oo_.exo_steady_state', ...
M_.params, oo_.dr.ys, 1); M_.params, oo_.dr.ys, 1);
tau=[oo_.dr.ys(oo_.dr.order_var); g1(:)]; tau=[oo_.dr.ys(oo_.dr.order_var); g1(:)];

View File

@ -32,8 +32,8 @@ function dyn_mex(win_compiler,basename,force)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
Dc = dir([basename '_dynamic.c']); Dc = dir([basename '/mode/src/dynamic.c']);
Dmex = dir([basename '_dynamic.' mexext]); Dmex = dir(['+' basename '/model/dynamic.' mexext]);
% compile only if date of C file is greater than date of mex file % compile only if date of C file is greater than date of mex file
% and force is not True % and force is not True
@ -50,19 +50,19 @@ if ~exist('OCTAVE_VERSION')
if strcmp(win_compiler,'msvc') if strcmp(win_compiler,'msvc')
% MATLAB/Windows + Microsoft Visual C++ % MATLAB/Windows + Microsoft Visual C++
% Add /TP flag as fix for #1227 % Add /TP flag as fix for #1227
eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" COMPFLAGS="/TP" ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" COMPFLAGS="/TP" ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Static" COMPFLAGS="/TP" ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Static" COMPFLAGS="/TP" ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
elseif strcmp(win_compiler,'mingw') elseif strcmp(win_compiler,'mingw')
eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Static" ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKFLAGS="$LINKFLAGS /export:Static" ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
elseif strcmp(win_compiler,'cygwin') %legacy support for Cygwin with mexopts.bat elseif strcmp(win_compiler,'cygwin') %legacy support for Cygwin with mexopts.bat
% MATLAB/Windows + Cygwin g++ % MATLAB/Windows + Cygwin g++
eval(['mex -O PRELINK_CMDS1="echo EXPORTS > mex.def & echo ' ... eval(['mex -O PRELINK_CMDS1="echo EXPORTS > mex.def & echo ' ...
'mexFunction >> mex.def & echo Dynamic >> mex.def" ' ... 'mexFunction >> mex.def & echo Dynamic >> mex.def" ' ...
basename '_dynamic.c ' basename '_dynamic_mex.c']) basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O PRELINK_CMDS1="echo EXPORTS > mex.def & echo ' ... eval(['mex -O PRELINK_CMDS1="echo EXPORTS > mex.def & echo ' ...
'mexFunction >> mex.def & echo Dynamic >> mex.def" ' ... 'mexFunction >> mex.def & echo Dynamic >> mex.def" ' ...
basename '_static.c ' basename '_static_mex.c']) basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
else else
error(['When using the USE_DLL option, you must give either ' ... error(['When using the USE_DLL option, you must give either ' ...
'''cygwin'', ''mingw'' or ''msvc'' option to the ''dynare'' command']) '''cygwin'', ''mingw'' or ''msvc'' option to the ''dynare'' command'])
@ -71,15 +71,15 @@ if ~exist('OCTAVE_VERSION')
% MATLAB/Linux % MATLAB/Linux
if matlab_ver_less_than('8.3') if matlab_ver_less_than('8.3')
eval(['mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' ' ... eval(['mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' ' ...
basename '_dynamic.c ' basename '_dynamic_mex.c']) basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' ' ... eval(['mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' ' ...
basename '_static.c ' basename '_static_mex.c']) basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
elseif matlab_ver_less_than('9.1') elseif matlab_ver_less_than('9.1')
eval(['mex -O LINKEXPORT='''' ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKEXPORT='''' ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKEXPORT='''' ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKEXPORT='''' ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
else else
eval(['mex -O LINKEXPORTVER='''' ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKEXPORTVER='''' ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKEXPORTVER='''' ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKEXPORTVER='''' ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
end end
elseif ismac elseif ismac
% MATLAB/MacOS % MATLAB/MacOS
@ -87,30 +87,30 @@ if ~exist('OCTAVE_VERSION')
eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ... eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ...
'error -arch $ARCHS -Wl,-syslibroot,$SDKROOT ' ... 'error -arch $ARCHS -Wl,-syslibroot,$SDKROOT ' ...
'-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ... '-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ...
basename '_dynamic.c ' basename '_dynamic_mex.c']) basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ... eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ...
'error -arch $ARCHS -Wl,-syslibroot,$SDKROOT ' ... 'error -arch $ARCHS -Wl,-syslibroot,$SDKROOT ' ...
'-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ... '-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ...
basename '_static.c ' basename '_static_mex.c']) basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
elseif matlab_ver_less_than('8.3') elseif matlab_ver_less_than('8.3')
eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ... eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ...
'error -arch $ARCHS -Wl,-syslibroot,$MW_SDKROOT ' ... 'error -arch $ARCHS -Wl,-syslibroot,$MW_SDKROOT ' ...
'-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ... '-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ...
basename '_dynamic.c ' basename '_dynamic_mex.c']) basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ... eval(['mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined ' ...
'error -arch $ARCHS -Wl,-syslibroot,$MW_SDKROOT ' ... 'error -arch $ARCHS -Wl,-syslibroot,$MW_SDKROOT ' ...
'-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ... '-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle'' ' ...
basename '_static.c ' basename '_static_mex.c']) basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
elseif matlab_ver_less_than('9.1') elseif matlab_ver_less_than('9.1')
eval(['mex -O LINKEXPORT='''' ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKEXPORT='''' ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKEXPORT='''' ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKEXPORT='''' ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
else else
eval(['mex -O LINKEXPORT='''' LINKEXPORTVER='''' ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex -O LINKEXPORT='''' LINKEXPORTVER='''' ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -output +' basename '/dynamic'])
eval(['mex -O LINKEXPORT='''' LINKEXPORTVER='''' ' basename '_static.c ' basename '_static_mex.c']) eval(['mex -O LINKEXPORT='''' LINKEXPORTVER='''' ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -output +' basename '/static'])
end end
end end
else else
% Octave % Octave
eval(['mex ' basename '_dynamic.c ' basename '_dynamic_mex.c']) eval(['mex ' basename '/model/src/dynamic.c ' basename '/model/src/dynamic_mex.c -o +' basename '/dynamic'])
eval(['mex ' basename '_static.c ' basename '_static_mex.c']) eval(['mex ' basename '/model/src/static.c ' basename '/model/src/static_mex.c -o +' basename '/static'])
end end

View File

@ -48,9 +48,6 @@ case ${host_os} in
AC_MSG_WARN([not run from MATLAB, because it cannot load the Cygwin DLL.]) AC_MSG_WARN([not run from MATLAB, because it cannot load the Cygwin DLL.])
AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.]) AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.])
;; ;;
*darwin13*)
CXXFLAGS="$CXXFLAGS -std=c++11"
;;
esac esac
CFLAGS="$CFLAGS -Wall -Wno-parentheses" CFLAGS="$CFLAGS -Wall -Wno-parentheses"
@ -76,6 +73,9 @@ case ${host_os} in
# Also see <uchar.h> # Also see <uchar.h>
CFLAGS="$CFLAGS -include stdint.h -Dchar16_t=uint_least16_t" CFLAGS="$CFLAGS -include stdint.h -Dchar16_t=uint_least16_t"
;; ;;
*darwin*)
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
;;
esac esac
AX_PTHREAD AX_PTHREAD

View File

@ -577,9 +577,9 @@ void
Interpreter::ReadCodeFile(string file_name, CodeLoad &code) Interpreter::ReadCodeFile(string file_name, CodeLoad &code)
{ {
if (steady_state) if (steady_state)
file_name += "_static"; file_name += "/model/bytecode/static";
else else
file_name += "_dynamic"; file_name += "/model/bytecode/dynamic";
//First read and store in memory the code //First read and store in memory the code
code_liste = code.get_op_code(file_name); code_liste = code.get_op_code(file_name);
@ -587,7 +587,7 @@ Interpreter::ReadCodeFile(string file_name, CodeLoad &code)
if (!code_liste.size()) if (!code_liste.size())
{ {
ostringstream tmp; ostringstream tmp;
tmp << " in compute_blocks, " << file_name.c_str() << " cannot be opened\n"; tmp << " in compute_blocks, " << file_name << ".cod cannot be opened\n";
throw FatalExceptionHandling(tmp.str()); throw FatalExceptionHandling(tmp.str());
} }
if (block >= (int) code.get_block_number()) if (block >= (int) code.get_block_number())

View File

@ -524,23 +524,22 @@ dynSparseMatrix::Read_SparseMatrix(string file_name, const int Size, int periods
{ {
unsigned int eq, var; unsigned int eq, var;
int lag; int lag;
filename = file_name;
mem_mngr.fixe_file_name(file_name); mem_mngr.fixe_file_name(file_name);
/*mexPrintf("steady_state=%d, size=%d, solve_algo=%d, stack_solve_algo=%d, two_boundaries=%d\n",steady_state, Size, solve_algo, stack_solve_algo, two_boundaries); /*mexPrintf("steady_state=%d, size=%d, solve_algo=%d, stack_solve_algo=%d, two_boundaries=%d\n",steady_state, Size, solve_algo, stack_solve_algo, two_boundaries);
mexEvalString("drawnow;");*/ mexEvalString("drawnow;");*/
if (!SaveCode.is_open()) if (!SaveCode.is_open())
{ {
if (steady_state) if (steady_state)
SaveCode.open((file_name + "_static.bin").c_str(), ios::in | ios::binary); SaveCode.open(file_name + "/model/bytecode/static.bin", ios::in | ios::binary);
else else
SaveCode.open((file_name + "_dynamic.bin").c_str(), ios::in | ios::binary); SaveCode.open(file_name + "/model/bytecode/dynamic.bin", ios::in | ios::binary);
if (!SaveCode.is_open()) if (!SaveCode.is_open())
{ {
ostringstream tmp; ostringstream tmp;
if (steady_state) if (steady_state)
tmp << " in Read_SparseMatrix, " << file_name << "_static.bin cannot be opened\n"; tmp << " in Read_SparseMatrix, " << file_name << "/model/bytecode/static.bin cannot be opened\n";
else else
tmp << " in Read_SparseMatrix, " << file_name << "_dynamic.bin cannot be opened\n"; tmp << " in Read_SparseMatrix, " << file_name << "/model/bytecode/dynamic.bin cannot be opened\n";
throw FatalExceptionHandling(tmp.str()); throw FatalExceptionHandling(tmp.str());
} }
} }

View File

@ -27,7 +27,7 @@ DynamicModelDLL::DynamicModelDLL(const string &modName) throw (DynareException)
#if !defined(__CYGWIN32__) && !defined(_WIN32) #if !defined(__CYGWIN32__) && !defined(_WIN32)
fName = "./"; fName = "./";
#endif #endif
fName += modName + "_dynamic" + MEXEXT; fName += "+" + modName + "/dynamic" + MEXEXT;
try try
{ {

View File

@ -20,7 +20,7 @@
#include "dynamic_m.hh" #include "dynamic_m.hh"
DynamicModelMFile::DynamicModelMFile(const string &modName) throw (DynareException) : DynamicModelMFile::DynamicModelMFile(const string &modName) throw (DynareException) :
DynamicMFilename(modName + "_dynamic") DynamicMFilename(modName + ".dynamic")
{ {
} }

View File

@ -293,7 +293,7 @@ extern "C" {
++ii; ++ii;
} }
if (kOrder == 3 && nlhs > 4) if (kOrder == 3 && nlhs > 5)
{ {
const FGSContainer *derivs = app.get_rule_ders(); const FGSContainer *derivs = app.get_rule_ders();
const std::string fieldnames[] = {"gy", "gu", "gyy", "gyu", "guu", "gss", const std::string fieldnames[] = {"gy", "gu", "gyy", "gyu", "guu", "gss",

@ -1 +1 @@
Subproject commit a2b19cbffff9612aea4d255fd7c6df0591087da8 Subproject commit 7baee7312614a32d00a051f0ce5246f66be0796b

View File

@ -936,15 +936,6 @@ clean-local:
$(patsubst %.trs, %.json, $(O_TRS_FILES)) \ $(patsubst %.trs, %.json, $(O_TRS_FILES)) \
$(patsubst %.trs, %.json, $(O_XFAIL_TRS_FILES)) $(patsubst %.trs, %.json, $(O_XFAIL_TRS_FILES))
rm -f $(patsubst %.mod, %.m, $(MODFILES)) \
$(patsubst %.mod, %_static.*, $(MODFILES)) \
$(patsubst %.mod, %_static_*.m, $(MODFILES)) \
$(patsubst %.mod, %_objective_static.m, $(MODFILES)) \
$(patsubst %.mod, %_set_auxiliary_variables.m, $(MODFILES)) \
$(patsubst %.mod, %_steadystate2.m, $(MODFILES)) \
$(patsubst %.mod, %_dynamic.*, $(MODFILES)) \
$(patsubst %.mod, %_dynamic_*.m, $(MODFILES))
rm -f $(patsubst %.mod, %_results.mat, $(MODFILES)) \ rm -f $(patsubst %.mod, %_results.mat, $(MODFILES)) \
$(patsubst %.mod, %_mode.mat, $(MODFILES)) \ $(patsubst %.mod, %_mode.mat, $(MODFILES)) \
$(patsubst %.mod, %_mh_mode.mat, $(MODFILES)) \ $(patsubst %.mod, %_mh_mode.mat, $(MODFILES)) \
@ -956,6 +947,8 @@ clean-local:
rm -rf $(patsubst %.mod, %, $(MODFILES)) rm -rf $(patsubst %.mod, %, $(MODFILES))
rm -rf $(foreach mod, $(MODFILES), $(dir $(mod))+$(basename $(notdir $(mod))))
rm -f $(patsubst %.mod, %*.pdf, $(MODFILES)) \ rm -f $(patsubst %.mod, %*.pdf, $(MODFILES)) \
$(patsubst %.mod, %*.eps, $(MODFILES)) \ $(patsubst %.mod, %*.eps, $(MODFILES)) \
$(patsubst %.mod, %*.fig, $(MODFILES)) $(patsubst %.mod, %*.fig, $(MODFILES))
@ -1014,4 +1007,3 @@ clean-local:
find . -name "*.aux" -type f -delete find . -name "*.aux" -type f -delete
find . -name "*.log" -type f -delete find . -name "*.log" -type f -delete
find . -name "*.eps" -type f -delete find . -name "*.eps" -type f -delete
find . -name "*.json" -type f -delete

View File

@ -17,12 +17,7 @@ function run_ls2003(block, bytecode, solve_algo, stack_solve_algo)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Workaround for a strange race condition under Octave disp(['TEST: ls2003 (block=' num2str(block) ', bytecode=' ...
if exist('ls2003_tmp.m') == 2
delete('ls2003_tmp.m')
end
disp(['TEST: ls2003 (block=' num2str(block) ', bytecode=' ...
num2str(bytecode) ', solve_algo=' num2str(solve_algo) ... num2str(bytecode) ', solve_algo=' num2str(solve_algo) ...
', stack_solve_algo=' num2str(stack_solve_algo) ')...']); ', stack_solve_algo=' num2str(stack_solve_algo) ')...']);
fid = fopen('ls2003_tmp.mod', 'w'); fid = fopen('ls2003_tmp.mod', 'w');

View File

@ -38,6 +38,6 @@ perfect_foresight_solver;
rplot c; rplot c;
rplot k; rplot k;
if ~exist('./ramst.json', 'file') || exist('./ramst.log', 'file') if ~exist('./ramst/model/json/modfile.json', 'file') || exist('./ramst.log', 'file')
error('The dynare command did not honor the options provided in the mod file!') error('The dynare command did not honor the options provided in the mod file!')
end end

View File

@ -56,7 +56,7 @@ end;
// Write analytical steady state file (without globals) // Write analytical steady state file (without globals)
options_.steadystate_flag = 2; options_.steadystate_flag = 2;
copyfile('rbcii_steady_state.m','rbcii_steadystate2.m'); copyfile('rbcii_steady_state.m','+rbcii/steadystate.m');
@#if extended_path_version @#if extended_path_version

View File

@ -1,5 +1,5 @@
// Example 1 from Collard's guide to Dynare // Example 1 from Collard's guide to Dynare
var y, c, k, a, h, b; var y, k, a, h, b;
varexo e, u; varexo e, u;
verbatim; verbatim;
@ -22,6 +22,7 @@ theta = 2.95;
phi = 0.1; phi = 0.1;
model; model;
[endogenous='c',name='law of motion of capital']
c*theta*h^(1+psi)=(1-alpha)*y; c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1))) k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k)); *(exp(b(+1))*alpha*y(+1)+(1-delta)*k));

View File

@ -1,10 +1,24 @@
// Example 1 from Collard's guide to Dynare // --+ options: nostrict +--
/*
** In the following example, the types (exogenous variable, endogenous variable, parameter) of the objects appearing in the model are declared
** on the fly in the equations. With the nostrict option, an object is by default an exogenous variable (if the type of an object is not declared
** in one of the equations, it will be interpreted as an exogenous variable). Without the nostrict option, Dynare will raise an error if the model
** contains untyped objects.
**
** An object followed by |e is an endogenous variable,
** |x is an exogenous variable,
** |p is a parameter.
**
** Example. If the first equation (consumption/leisure arbitrage) is removed from the following model block, then h (hours)
** will be interpreted as an exogenous variable.
*/
model; model;
c|e*theta|p*h|e^(1+psi|p)=(1-alpha)*y; c*theta|p*h|e^(1+psi|p)=(1-alpha)*y;
k|e = beta|p*(((exp(b)*c)/(exp(b(+1))*c(+1))) k|e = beta|p*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha|p*y(+1)+(1-delta)*k)); *(exp(b(+1))*alpha|p*y(+1)+(1-delta)*k));
y|e = exp(a)*(k(-1)^alpha)*(h^(1-alpha)); y|e = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta|p)*k(-1); k = exp(b)*(y-c|e)+(1-delta|p)*k(-1);
a|e = rho|p*a(-1)+tau*b(-1) + e|x; a|e = rho|p*a(-1)+tau*b(-1) + e|x;
b|e = tau|p*a(-1)+rho*b(-1) + u|x; b|e = tau|p*a(-1)+rho*b(-1) + u|x;
end; end;

View File

@ -69,11 +69,11 @@ end;
simul(periods=1000); simul(periods=1000);
newton_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton_dynamic'), oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f; newton_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton.dynamic'), oo_.endo_simul, oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f;
lmmcp = load('sw_lmmcp_results'); lmmcp = load('sw_lmmcp_results');
lmmcp_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton_dynamic'), lmmcp.oo_.endo_simul, lmmcp.oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f; lmmcp_solution_is_wrong = abs(evaluate_max_dynamic_residual(str2func('sw_newton.dynamic'), lmmcp.oo_.endo_simul, lmmcp.oo_.exo_simul, M_.params, oo_.steady_state, 1000, size(oo_.endo_simul, 1), 1, M_.lead_lag_incidence))>options_.dynatol.f;
solutions_are_different = max(max(abs(lmmcp.oo_.endo_simul-oo_.endo_simul)))>options_.dynatol.x; solutions_are_different = max(max(abs(lmmcp.oo_.endo_simul-oo_.endo_simul)))>options_.dynatol.x;

View File

@ -57,7 +57,7 @@ Using Dynare with Octave
Dynare also works on top of GNU Octave, a free clone of MATLAB (R) (see Dynare also works on top of GNU Octave, a free clone of MATLAB (R) (see
<http://www.octave.org>). <http://www.octave.org>).
This version of Dynare is compiled for Octave 4.2.1 (MinGW, 32bit and 64bit), and may not work This version of Dynare is compiled for Octave 4.4.0 (MinGW, 32bit and 64bit), and may not work
with other versions of Octave. The recommended version of Octave can be with other versions of Octave. The recommended version of Octave can be
downloaded at: downloaded at:

View File

@ -110,14 +110,14 @@ SectionEnd
SectionGroupEnd SectionGroupEnd
SectionGroup "MEX files for OCTAVE" SectionGroup "MEX files for Octave"
Section "MEX files for Octave 4.2.1 (MinGW, 64bit)" Section "MEX files for Octave 4.4.0 (MinGW, 64bit)"
SetOutPath $INSTDIR\mex\octave SetOutPath $INSTDIR\mex\octave
File ..\mex\octave\* File ..\mex\octave\*
SectionEnd SectionEnd
Section "MEX files for Octave 4.2.1 (MinGW, 32bit)" Section "MEX files for Octave 4.4.0 (MinGW, 32bit)"
SetOutPath $INSTDIR\mex\octave32 SetOutPath $INSTDIR\mex\octave32
File ..\mex\octave32\* File ..\mex\octave32\*
SectionEnd SectionEnd