| 1 |
// Example that triggers homotopy in perfect foresight simulation. |
| 2 |
// Tests the homotopy_marginal_linearization_fallback and homotopy_step_size_increase_success_count options |
| 3 |
|
| 4 |
@#include "homotopy_linearization.inc" |
| 5 |
|
| 6 |
perfect_foresight_setup(periods=200, endval_steady); |
| 7 |
|
| 8 |
perfect_foresight_solver(homotopy_max_completion_share = 0.7, |
| 9 |
homotopy_step_size_increase_success_count = 3, |
| 10 |
homotopy_marginal_linearization_fallback, |
| 11 |
steady_solve_algo = 13); |
| 12 |
|
| 13 |
if ~oo_.deterministic_simulation.status |
| 14 |
error('Perfect foresight simulation failed') |
| 15 |
end |