Commit Graph

28 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
Houtan Bastani 3d6091b3a1
remove unused return arguments 2019-09-12 14:01:52 +02:00
Sébastien Villemot f8af21819e
Simplify the interface to perfect_foresight_problem MEX 2019-07-09 14:33:17 +02:00
Sébastien Villemot 2ad6b31d76
Option endogenous_terminal_period is only available for stack_solve_algo=0 2019-07-04 18:37:27 +02:00
Sébastien Villemot 7d9b2a557b
perfect_foresight_problem MEX: number of threads is now configurable 2019-06-27 17:00:12 +02:00
Sébastien Villemot 5b591fac42
New perfect_foresight_problem MEX file
It constructs the stacked residuals and jacobian of the perfect foresight
problem.

It is an almost perfect replacement for the perfect_foresight_problem.m
routine, while being much more efficient.

Note however that the DLL never return complex numbers (it instead puts NaNs at
the place where there would have been complex). This may create problems for
some MOD files; the algorithms will need to be adapted to use a more
line-search method.
2019-06-24 17:53:59 +02:00
Sébastien Villemot 5a36d57b90
Perfect foresight: remove unused nnzJ argument in several stacked problem functions 2019-05-13 18:33:26 +02:00
Stéphane Adjemian (Charybdis) 24cc67e585 Ensure that all perfect foresight solvers work with periods=1.
See #1205 and #1176.
2019-04-26 15:55:48 +02:00
Sébastien Villemot 7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments 2018-11-13 18:02:09 +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 (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
Johannes Pfeifer 1c070f536a Add headers to various functions 2016-08-23 17:28:41 +02:00
Michel Juillard c159dff19c adding hook for PATH solver 2016-05-31 12:10:12 +02:00
Stéphane Adjemian (Charybdis) fb4dfc6da6 Fixed typo. 2016-05-24 22:32:02 +02:00
Stéphane Adjemian (Hermes) be0f6230ad Cosmetic changes.
- Use a switch-case block.
 - Added a warning when the user tries to solve a linear(ized) model
with solve_algo different from 0 (for a linear model).
 - Added an error message if the user try to solve a linearized model
with stack_solve_algo=6 (not implemented).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 1815eb8e56 Code factorization. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 8a163842d0 Removed oo_ from sim1_linear routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Hermes) 53747cb082 Fixed lmmcp option.
This option may be used in extended_path and perfect_foresight_solver commands.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) e0be60710c Removed oo_ from sim1_purely_{backward,forward} routines. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 290ce5db68 Removed oo_ from sim1_lbj routine. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 674c9ab286 Removed oo_ from sim1 routine. 2016-05-24 17:26:06 +02:00
Johannes Pfeifer 5f32b80a27 Fix error codes for bytecode in perfect_foresight_solver_core.m
If it fails, 1 must indicate error, not 0
2016-05-05 10:52:17 +02:00
Michel Juillard e8f318ff50 fixed problems in extended path 2015-07-23 14:27:55 +02:00
Michel Juillard 3640b2b511 minor change to perfect_foresight_solver_core.m 2015-07-07 16:42:30 +02:00
Michel Juillard f8af7724bb small fixes to perfect foresight 2015-02-15 16:49:33 +01:00
Michel Juillard 3c7b1cf2d7 changed calling sequence for sim1; use local variable names without _;
sim1 honors options_.nodisplay
2015-02-14 12:02:18 +01:00
Michel Juillard 21f009a531 Merge branch 'master' into new_ep 2015-02-14 11:54:57 +01:00