Commit Graph

43 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
Sébastien Villemot b071e85214
Merge branch 'lmmcp' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2067
2022-09-12 16:58:05 +02:00
Johannes Pfeifer 0225cb23ac Path solver: trigger lmmcp flag
Solves https://git.dynare.org/Dynare/dynare/-/issues/1720 for PATH solver
2022-09-06 09:34:20 +02:00
Johannes Pfeifer 85a894efde lmmcp: display norm of residuals in homotopy 2022-09-01 13:00:09 +02:00
Sébastien Villemot 06f665e231
Perfect foresight: LBJ now available under stack_solve_algo=1 (with/without block/bytecode)
Previously, LBJ was available:

– under stack_solve_algo=6 when neither block nor bytecode were present
– under stack_solve_algo=1 with either block or bytecode (but the documentation
  was not making it clear that it was LBJ)

This commit merges the two values for the option, and makes them
interchangeable. LBJ should now be invoked with stack_solve_algo=1 (but
stack_solve_algo=6 is kept for compatibility, and is a synonymous).
2022-06-15 15:06:33 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +02:00
Sébastien Villemot b4ce69db3a
Remove options_.slowc field
There was no user interface, and the feature that it provides has lost
relevance over time.

Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f).
2022-03-31 17:39:43 +02:00
Johannes Pfeifer 1ed765b8c4 perfect_foresight_solver_core.m: fix Fortran not 2022-03-25 14:23:11 +01:00
Sébastien Villemot e49e7e906f
Forbid changing the value of “slowc” if “block” or “bytecode” is used
The code is buggy and leads to wrong results, so forbid this combination.
2022-03-25 12:36:36 +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) 27ee801a67
Add specialized version of sim1 for static models.
Also add an integration test and fix homotopy error message.
2021-05-28 14:11:34 +02:00
Sébastien Villemot ec28179043
Perfect foresight: add warning when lmmcp and linear option are used together 2021-04-20 16:53:54 +02:00
Johannes Pfeifer 7bdf07631a Provide better warnings when using ramsey_constraints 2020-12-18 12:59:29 +00:00
Sébastien Villemot e21cb1ad6b
LMMCP: fix the purely backward and purely forward cases
Closes: #1720
2020-10-21 16:30:40 +02:00
Sébastien Villemot 4ba0f0a9c3
LMMCP: don’t report a wrong maxerror, rather put NaN 2020-10-20 18:27:19 +02:00
Sébastien Villemot 0d11f8182a
Block decomposition: no longer compute deterministic simulation from dynamic.m file
By the way, fix bug where oo_ was not modified by solve_one_boundary.

Also convert oo_.deterministic_simulations.status to a boolean in the block
routines, for consistency with the non-block case.
2020-06-02 17:46:29 +02:00
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