| 1 |
// Example that triggers homotopy in perfect foresight simulation. |
| 2 |
// Tests the endval_steady, homotopy_linearization_fallback options, and a few more. |
| 3 |
|
| 4 |
@#include "homotopy_linearization.inc" |
| 5 |
|
| 6 |
perfect_foresight_setup(periods=200, endval_steady); |
| 7 |
|
| 8 |
perfect_foresight_solver(homotopy_initial_step_size = 0.5, |
| 9 |
homotopy_max_completion_share = 0.6, |
| 10 |
homotopy_min_step_size = 0.0001, |
| 11 |
homotopy_linearization_fallback, |
| 12 |
steady_solve_algo = 13, steady_tolf=1e-7); |
| 13 |
|
| 14 |
if ~oo_.deterministic_simulation.status |
| 15 |
error('Perfect foresight simulation failed') |
| 16 |
end |