Commit Graph

15798 Commits (e549bbba7a96f822b8f8475041b4263467d2b609)

Author SHA1 Message Date
Johannes Pfeifer ec55e6b7c6 Use official English translation of Johannes's affiliation 2023-06-21 13:15:43 -04:00
Sébastien Villemot 01007e3776
Windows package: avoid prompts from unzip that cause build failures
Unpacked files may already be present due to GitLab CI caching.

Bug introduced in 39c2cba1b6.
2023-06-21 17:25:02 +02:00
Sébastien Villemot d5a3a8e16a
Various improvements to perfect foresight homotopy
– new option “endval_steady” to pf_setup command to recompute terminal
  steady state in the homotopy loop

– new options “homotopy_linearization_fallback” and
  “homotopy_marginal_linearization_fallback” to pf_solver and pfwee_solver
  commands, to get an approximate solution when homotopy fails to go to 100%

– new options “homotopy_initial_step_size”, “homotopy_min_step_size”,
  “homotopy_step_size_increase_success_count” and “homotopy_max_completion_share”
  to pf_solver and pfwee_solver commands to fine tune the homotopy behaviour

– removed option “homotopy_alt_starting_point” to pf_solver command, not really
  useful

– new options “steady_solve_algo”, “steady_tolf”, “steady_tolx”,
  “steady_maxit”, “steady_markowitz” to pf_solver and pfwee_solver commands, to
  control the computation of the terminal steady state (and remove the
  equivalent options which previously had different names in pfwee_solver command)
2023-06-21 15:58:23 +02:00
Sébastien Villemot 3a789ca780
🐛 dynare_solve would incorrectly accept some guess values leading to NaN residuals
If the guess value passed to dynare_solve was such that the residuals were all
below tolerance, except some that were NaN, then this guess value would be
incorrectly accepted as a solution.
2023-06-20 15:35:36 +02:00
Sébastien Villemot ec336e9c95
Manual: homotopy in perfect foresight supported for purely backward/forward/static models
Done in fe142b663e.

[skip ci]
2023-06-19 18:01:47 +02:00
Sébastien Villemot 39c2cba1b6
Windows package: use official x13as binary, instead of building it from source
Ref. #1878
2023-06-19 16:19:47 +02:00
Sébastien Villemot a8de0f56f3
CONTRIBUTING.md: mention that GitLab account creation is moderated
[skip ci]
2023-06-19 14:57:06 +02:00
Sébastien Villemot 86ef9f2924
CONTRIBUTING.md: replace straight quotes by typographical quotes
[skip ci]
2023-06-19 14:54:15 +02:00
Sébastien Villemot 8fa37a0439
perfect_foresight_with_expectation_errors_solver: remove obsolete code
This should have been removed in c1b78e26ac
2023-06-16 16:45:04 +02:00
Sébastien Villemot d4b5e156d1
perfect_foresight_with_expectation_errors_solver: check convergence of informational iterations
Error out if an iteration failed.

Also display an informative message about those iterations.
2023-06-16 16:45:04 +02:00
Sébastien Villemot 018f69b69b
Windows package: stronger compiler optimization flags
– enable maximum optimization (-O3), which in particular triggers code
  auto-vectorization
– raise the minimal architectural requirement to match MSYS2 policy
  (roughly requires CPUs from ~2006/7+)
2023-06-16 15:35:29 +02:00
Sébastien Villemot 396267260a
Block solvers: improvement to error messages
– Do not mention internal options_ structure
– Remain agnostic about whether we are in a steady state or a deterministic simulation

[skip ci]
2023-06-15 15:49:50 +02:00
Sébastien Villemot c1b78e26ac
perfect_foresight_with_expectation_errors_{setup,solver}: streamline handling of guess values
– Remove the terminal_steady_state_as_guess_value option to pfwee_solver
– pfwee_setup now sets the same guess values as pf_setup (i.e. terminal steady
  state at all periods)
– With constant_simulation_length option, pfwee_solver uses terminal steady
  state as guess values for periods that are added to the simulation
2023-06-15 15:37:48 +02:00
Sébastien Villemot 30c17ad346
🐛 Steady state: wrong value of maxit was used for some block/bytecode cases
It was using the value of maxit for perfect foresight simulations.
2023-06-15 15:37:48 +02:00
Sébastien Villemot c7b4ea40f8
🐛 Steady state computation: fix crash if bytecode (without block) does not find a solution
ys was uninitialized and it would crash further down in the function.
2023-06-15 15:37:48 +02:00
Sébastien Villemot d6ea315a18
Bytecode: further improve some informative messages 2023-06-15 15:37:45 +02:00
Stéphane Adjemian (Ryûk) a541e1e6d0
Update dseries submodule. 2023-06-14 10:47:57 +02:00
Sébastien Villemot 192f136b96
Bytecode: improve some informative messages 2023-06-13 16:59:08 +02:00
Sébastien Villemot 277c5d4c4f
Bytecode: display real iteration time instead of CPU time 2023-06-13 16:59:08 +02:00
Sébastien Villemot 7c9e261355
Bytecode: fix treatment of maxit option
It would do one extra iteration.
2023-06-13 16:59:08 +02:00
Sébastien Villemot dcf56b89cd
Bytecode: rework message verbosity
Now uses options_.verbosity to decide what to print:
– if options_.verbosity == 0, prints nothing
– if options_.verbosity >= 1, prints iteration counter and duration, and fatal errors
– if options_.verbosity >= 2, additionally print floating point exceptions and
  details about algorithmic decisions
2023-06-13 16:59:07 +02:00
Sébastien Villemot 73b1850cb5
Bytecode: remove unused function 2023-06-13 16:58:06 +02:00
Sébastien Villemot d81e3992c3
perfect_foresight_solver_core: fix crash when bytecode does not converge
The bug was introduced in commit 7722e8e36b
2023-06-12 19:19:21 +02:00
Sébastien Villemot 4431a89e87
perfect_foresight_solver_core.m: when relevant, use bytecode MEX to recompute ∞-norm of residuals
Since commit 7722e8e36b it would always use the
perfect_foresight_problem MEX, but the latter is less efficient than bytecode.
2023-06-12 19:18:45 +02:00
Sébastien Villemot 73ae1ac8ce
evaluate_steady_state: minor simplification 2023-06-12 19:18:44 +02:00
Sébastien Villemot 08d378c244
Bytecode: in evaluate+dynamic mode, return residuals with as many columns as periods
Previously it would also include initial and terminal conditions (i.e.
residuals would have periods+maximum_lag+maximum_lead columns). But we do not
care about residuals at the initial and terminal conditions.

This change is for consistency with the perfect_foresight_problem MEX.
2023-06-12 19:18:44 +02:00
Sébastien Villemot 8cf8731c65
det_cond_forecast.m: use better syntax for ignored outputs 2023-06-12 19:18:44 +02:00
Sébastien Villemot 90d790f1c3
Bytecode: fix error message 2023-06-12 19:18:44 +02:00
Sébastien Villemot d814a4090b
Bytecode: improve display of residuals error during iterations 2023-06-12 15:12:00 +02:00
Sébastien Villemot 3ef833ac5f
Testsuite: remove unused test 2023-06-12 14:14:53 +02:00
Sébastien Villemot c0294bb343
Testsuite: remove the simul/ folder, and move its files under {deterministic,stochastic}_simulations/
With the exception of ramst2.mod which was not run by the testsuite and has
thus been deleted.
2023-06-12 14:14:53 +02:00
Sébastien Villemot 4459f9a488
Testsuite: move homotopy/ folder under the steady_state/ folder
To clarify that those tests are about homotopy for steady state computation,
and not for perfect foresight simulation.
2023-06-12 14:14:53 +02:00
Sébastien Villemot 9c88bab247
Testsuite: remove obsolete Julia tests 2023-06-12 14:14:53 +02:00
Sébastien Villemot 37870e4a40
evaluate_steady_state: accept exogenous steady state as argument instead of whole oo_ structure
This is a move towards a more functional programming style.
2023-06-07 17:58:19 +02:00
Sébastien Villemot 5931e3aa46
macOS: bump to GCC 13 (for compilation and for use_dll)
The formulas are taken from commit 46401325ed2c4d72adb6f1592cf6096bb844b489 of
the homebrew-core repository.

The gcc.rb formula was modified by adding “cellar: :any” to all bottles (see
https://github.com/Homebrew/brew/blob/master/docs/Bottles.md).

The preprocessor has been updated accordingly.
2023-06-07 11:16:21 +02:00
Sébastien Villemot 6df56e7485
README.md: fix typo 2023-06-07 10:46:16 +02:00
Sébastien Villemot 9fd6515f29
Windows package: bump dependencies
In particular, now ship GCC 13 for the use_dll option.
2023-06-07 10:01:41 +02:00
Sébastien Villemot 7722e8e36b
Perfect foresight: inner functions no longer return a modified oo_
They now only return what’s really their output (simulated paths, maximum
residual error…). This is a move towards a more functional programming style.
2023-06-06 18:13:10 +02:00
Sébastien Villemot 6ed90b3dbf
🐛 Homotopy for extended path (order 0) was utterly broken
The convergence test was wrong.
2023-06-06 17:54:04 +02:00
Sébastien Villemot fe142b663e
Perfect foresight: allow homotopy for purely backward/forward/static models
This was previously disabled, but the code seems to work.
2023-06-06 17:26:07 +02:00
Sébastien Villemot 1cf83dc278
perfect_foresight_solver: always use perfect_foresight_problem MEX for computing residuals
The MEX no works on models without leads or lags.

This is essentially a revert of 74dc4f81f0.

Ref. #1850
2023-06-06 17:06:10 +02:00
Sébastien Villemot 4210618dba
🐛 perfect_foresight_problem MEX: check over size of M_.dynamic_g1_sparse_colptr size was incorrect 2023-06-06 16:57:48 +02:00
Stéphane Adjemian (Argos) 8e42f6d137
Update dseries submodule (new method returning last observed period for each variable). 2023-06-05 11:21:53 +02:00
Stéphane Adjemian (Ryûk) b1933d58dd
Bug fix (undefined variable). 2023-06-04 08:07:28 +02:00
Sébastien Villemot d9cdcf3766 Merge branch 'occbin_init' into 'master'
dynare_estimation_init.m: make sure OccBin estimation can be run after...

See merge request Dynare/dynare!2135
2023-06-02 13:54:54 +00:00
Johannes Pfeifer 37eb10971b dynare_estimation_init.m: make sure OccBin estimation can be run after previous shocks(surprise) block 2023-06-02 08:43:14 -04:00
Sébastien Villemot 37bc08eb5b Merge branch 'parallel' into 'master'
masterParallel.m: assign explicit empty window title to allow passing full path in quoted strings

Closes #1887

See merge request Dynare/dynare!2133
2023-06-01 08:26:52 +00:00
Sébastien Villemot d41501bc6d
Misc updates to gitignore files
[skip ci]
2023-05-30 20:59:59 +02:00
Sébastien Villemot 5a6d03a2e7
CI: adapt for new location of MATLAB binaries 2023-05-30 17:12:30 +02:00
Stéphane Adjemian (Argos) 399532a201
Remove trailing whitespaces. 2023-05-27 07:22:55 +02:00