Commit Graph

20 Commits (51ffe77fb7e8b41f4543de8730a28796124ae224)

Author SHA1 Message Date
Stéphane Adjemian (Ryûk) 51ffe77fb7
Add error flag (new output) to simul_backward_model routine. 2023-04-05 11:09:59 +02:00
Stéphane Adjemian (Ryûk) 7583790851
Improve error message. 2023-03-09 11:25:04 +01:00
Sébastien Villemot d574705b4a
Design and performance improvement to solve_algo={12,14}
Use the new time-recursive block decomposition computed by the preprocessor
for:
- the simulation of backward models with “simul_backward”
- the perfect foresight simulation of purely backward/forward/static models

Also note that in this case, the preprocessor now defaults to “mfs=3” (i.e. it
minimizes the set of feedback variables and tries to renormalize equations).

This replaces the previous algorithm based on Dulmage-Mendelsohn (dmperm), plus
an ad hoc identification of some equations that can be evaluated (those with a
LHS equal to a variable, the log of a variable, or the diff-log of a variable).

By the way, the block_trust_region MEX has been modified so that it accepts a
boolean argument to decide whether it performs a Dulmage-Mendelsohn
decomposition (if not, then it performs a simple trust region on the whole
nonlinear system).

This provides a significant performance improvement (of almost an order of
magnitude for solve_algo=14 on a 700 equations model).
2022-11-30 14:47:57 +01:00
Stéphane Adjemian (Charybdis) 4d646ba30b
Fix evaluation of the dynamic model.
Call the wrapper instead of the dynamic routine.
2022-04-19 19:15:21 +02:00
Stéphane Adjemian (Charybdis) 63224ed45d
Bug fix (display of problematic equations). 2022-04-19 16:33:29 +02:00
Stéphane Adjemian (Charybdis) f1aff2b370
Remove calls to dbstack in dynare_solve.
Adding three input parameters for maxit, tolf and tolx.

Closes #1841.
2022-04-10 20:29:57 +02:00
Stéphane Adjemian (Ryûk) ef2bb4e669
Return and use errorcode from dynare_solve.
Note that the interpretation of the error code depends on the nonlinear solver.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk) 882091cc97
Return more info about nonlinear solver failures (solve1). 2022-03-03 22:30:38 +01:00
Stéphane Adjemian (Ryûk) e815fb2901
Display exitflag returned by fsolve.
When the Newton fails in the simulation of backward models.
2022-03-03 18:19:33 +01:00
Stéphane Adjemian (Ryûk) e6592b3943
Display more info if Newton fails in backward model simulations. 2022-03-03 16:57:59 +01:00
Stéphane Adjemian (Ryûk) 7ee124bbba
Fix bug.
Return the paths for the endogenous only before the nonlinear solver crash.
2022-03-03 10:57:40 +01:00
Stéphane Adjemian (Charybdis) 90ae54a6ff
Translate to English. 2022-03-03 09:35:30 +01:00
Stéphane Adjemian (Charybdis) 9d1e07a2e4
Fix headers. 2022-03-03 09:35:30 +01:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Stéphane Adjemian (Charybdis) 492b0fffea
Cosmetic change. 2020-03-11 12:34:21 +01:00
Stéphane Adjemian (Charybdis) 864d4c25c7
Updated simulation routine for nonlinear backward models.
Changes necessary for the latest patches on dynare_solve (solve_algo={12,14}).
2020-02-27 22:58:19 +01:00
Stéphane Adjemian (Charybdis) 84e7d4bd3d
Adapted code to use solve_algo={12,14}. 2020-02-20 13:12:16 +01:00
Stéphane Adjemian (Charybdis) 0f23f88700
Exit gracefully if Newton solver fails (added try/catch block). 2020-02-19 14:39:02 +01:00
Stéphane Adjemian (Scylla) 05d8058d57 Return an error if Newton fails when simulating a backward model. 2017-09-29 10:17:33 +02:00
Stéphane Adjemian (Scylla) 510eccd965 Fixed routines for backward model simulation (with IRFs and forecasts). 2017-09-28 10:12:53 +02:00