Commit Graph

52 Commits (7e770f69e791e705ab535126e0157130dc9d40c6)

Author SHA1 Message Date
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot a1b8bd39b2 Move the location of various generated files on the filesystem
- M and MEX files are now under +${MODELNAME}/
- bytecode, C source and JSON now under ${MODELNAME}/model/
2018-06-27 17:03:39 +02:00
Stéphane Adjemian (Scylla) 7be8f10e0e Use cells of strings instead of char arrays. 2018-01-09 22:30:01 +01:00
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Johannes Pfeifer 578fb04590 Check for complexity of steady state in resid.m
Residuals might be 0, but steady state might be complex, resulting in hard-to-diagnose problems when calling steady.m
2016-07-14 15:04:27 +02:00
Johannes Pfeifer cb3804ab51 Remove automatic error from resid.m when steady state does not solve.
Closes #573
2015-10-13 13:45:54 +02:00
Johannes Pfeifer 23bd54ce72 Fixed typo that prevented correct updating of parameters when using resid together with the steady_state_model block 2013-11-21 19:39:50 +01:00
Stéphane Adjemian (Charybdis) 4052d4ccaf Cosmetic changes. Use skipline() instead of disp(' '). 2013-07-10 17:12:34 +02:00
Stéphane Adjemian (Charybdis) 8574dfd053 Adapted print_info routine. 2013-06-12 10:54:33 +02:00
Sébastien Villemot 31a13db66a Remove duplicate information in M_.blocksMFS 2012-11-16 17:39:03 +01:00
Sébastien Villemot bf19ab801f Remove duplicate information in M_.blocksEQU 2012-11-16 17:16:40 +01:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Stéphane Adjemian (Charybdis) a341a4f8a3 Fixed bug in steady state check (issue with mean preserving spread corrections). 2012-06-06 18:25:07 +02:00
Michel Juillard 57861e22d9 resid: print residuals even if a *_steadystate.m file reports an error 2012-05-20 21:35:34 +02:00
Ferhat Mihoubi dfbd6c8f2a Adds the index of equations (M_.blocksEQU) for a block decomposed model without bytecode option and use this index in resid.m to retrieve the residuals 2012-03-08 15:29:56 +01:00
Stéphane Adjemian (Charybdis) a36cf30118 Make options_.dynatol specific to x/f by adding dynatol.x and dynatol.f. By default dynatol.x=dynatol.f= old default value of dynatol. 2011-12-12 14:20:14 +01:00
Stéphane Adjemian (Charybdis) 7aeb881e3a Temporarily set the variance of the shocks to zero when computing or checking the deterministic steady
state. This is necessary if the model contains mean preverving spread terms.
2011-12-04 23:57:46 +01:00
Michel Juillard d1cb9fd0a8 fixed recent bug in resid when there is no steadystate file 2011-10-27 22:08:10 +02:00
Michel Juillard 9425b36358 fixing problems related to auxiliary variables 2011-10-19 12:47:15 +02:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Sébastien Villemot 757a9067c0 Global reindentation of MATLAB files 2011-02-04 17:17:48 +01:00
Ferhat Mihoubi ac9415a943 - The bytecode.mex file has to be called when bytecode option is specified independently of the block option. 2011-01-14 10:39:34 +01:00
Sébastien Villemot 3af62c4ac9 Fixed bug in resid.m (order matters in "or" statement, because of short-circuit: "ind" is not defined if "istag" is false) 2010-12-06 18:24:08 +01:00
Stéphane Adjemian (Charybdis) 618f72bc91 resid displays the name of the equations if they are specified in equations tags. 2010-11-25 17:31:11 +01:00
Ferhat Mihoubi b356c5e58e add_auxiliary_variables_to_steadystate is compatible with bytecode option
+ minor corrections in steady_.m
2010-11-25 16:00:54 +01:00
Stéphane Adjemian (Charybdis) 31b734e9b3 Do not print residuals of the static equations for the equations of the auxiliary variables. 2010-11-04 14:19:28 +01:00
Ferhat Mihoubi df1b1e4ed0 - In bytecode, the MATLAB function "mexErrMsgTxt" has been replaced by an exception handling see ticket #137 2010-09-24 12:52:58 +02:00
Ferhat Mihoubi 25b3c84b40 RESID command is compatible now with block option and without bytecode option (closes ticket #45) 2010-09-17 16:54:43 +02:00
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
sebastien a2cef7009d Fixes for ticket #57
preprocessor:
* add a field "M_.orig_endo_nbr" containing the nbr of endogenous before adding aux vars
* always provide "M_.aux_vars" (define it to "[]" when there is no aux var)
* rename "M_.aux_vars().orig_endo_index" to "M_.aux_vars().orig_index"

M-files:
* for commands which accept a list of variables (stoch_simul, osr, estimation, dynasave, dynatype, datatomfile), when no variable is given, use only the set of original endogenous (without aux vars) as the default
* when displaying the decision rule, when there is aux vars in the state variables, replace them by their original name (with the right lag)
* in "steady", don't display aux vars
* special exception for ramsey policy: all vars (including aux vars) are displayed, because the system of aux vars from ramsey policy is not compatible with the aux vars from the preprocessor


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3166 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-25 10:22:39 +00:00
sebastien ffd9b2d405 preprocessor: clean-up workaround for acosh(), asinh(), atanh() on Win 64 platforms
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3101 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-29 17:16:10 +00:00
stepan bc83fbd808 * Allow the use of a *_steadystate.m file with options block and bytecode.
* Added the possibility to use resid when the the options block *and* bytecode
are used.

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2986 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-25 16:20:19 +00:00
ferhat beade4bea1 References to model_mod option are ruled out of M-files
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2878 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-02 13:07:59 +00:00
ferhat d32dd99210 - extension of normalization of equations to nonlinear equations
- mfs: new option for 'steady' and 'model' commands. Determines the equation belonging to the set of feedback variables.
  mfs = 0 => all variables are considered as feedback variables (default value)
  mfs = 1 => using only naturally normalized equation as potential recursive equations (all variables assigned to unnormalized equations are considered as feedback variable)
  mfs = 2 => adding to the set of potential recursive equation with mfs = 1 the linear equation in endogenous variable normalized (all variables assigned to nonlinear unnormalized equations are considered as feedback variable)
  mfs = 3 => adding to the set of potential recursive equation with mfs = 2 the non linear equation in endogenous variable normalized
- correction of few buggs in simulate.dll
- block_mfs_dll: new option for 'steady' command. Use simulate.dll to solve the steady state model (speedup the computation of the steady-state and the homotopy)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2866 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-08-25 09:43:01 +00:00
sebastien 695a638f09 trunk: fixed bug with USE_DLL (stoch_simul was calling stoch_simul_sparse, because of wrong handling of options_.model_mode)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2571 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-09 10:02:45 +00:00
stepan 5c18a68ac3 v4.1:: The reported residuals are rounded to zero if inferior to options_.dynatol/100.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2383 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-01-29 22:25:01 +00:00
ferhat a0bbe27b95 Load_params_and_steady_state is now a dynare command -> needed to normalize the equations.
-> MatlabFile.cc and MatlabFile.hh are added to dynare in order to read the Mat-File

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2349 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-31 19:29:17 +00:00
sebastien 2134146033 trunk:
* removed obsolete global variables "endval_" and "rplottype_"
* removed duplicate initialization of options_.replic


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2295 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-05 15:34:26 +00:00
ferhat 26ae037863 - factorization of simulation methods for static m-file
- correction of bugs in resid.m

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2280 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-02 21:29:43 +00:00
sebastien db50368418 v4 matlab: fixed some existing copyright headers (and some other minor header issues)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1974 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-01 12:40:33 +00:00
sebastien 75fb140b5c v4 matlab+preprocessor:
* removed global variables from "static" and "dynamic" files (in standard and USE_DLL modes only)
* added extra arguments when those functions are called from M-files


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1859 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-06 14:01:02 +00:00
adjemian 0de34265c1 The global ys0_ is useless now...
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1643 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-01-24 14:12:39 +00:00
adjemian f5ad60486a Correction of a bug related to ys0_ and the endval block.
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1642 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-01-24 14:11:44 +00:00
adjemian c930948d5d Bug correction. Declaration of ys0_ as a global was missing (this is a problem if resid.m is called after the endval block and the steady command).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1641 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-01-23 16:05:02 +00:00
assia 2754210396 header updated
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1625 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-01-21 11:13:07 +00:00
michel 17bfdcc1d9 v4 resid.m: added test for case with no exogenous variable
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1467 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-11-29 14:33:18 +00:00
michel 4baff7fdd2 v4: changed oo_.y_simul in oo_.endo_simul
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@849 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-07-31 15:46:55 +00:00
adjemian a6db1acda7 Changed the output of resid.m (the number of each equation is printed on screen followed by the residual).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@804 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-06-21 16:51:25 +00:00