| 1 |
// Regression test for bug #1720 (in the purely forward case) |
| 2 |
// Also tests the obsolete “mcp” tag syntax |
| 3 |
|
| 4 |
var y; |
| 5 |
|
| 6 |
varexo eps; |
| 7 |
|
| 8 |
model; |
| 9 |
[ mcp='y>1' ] |
| 10 |
y = sqrt(y(1))*exp(eps); |
| 11 |
end; |
| 12 |
|
| 13 |
initval; |
| 14 |
y = 1; |
| 15 |
end; |
| 16 |
|
| 17 |
steady; |
| 18 |
|
| 19 |
check; |
| 20 |
|
| 21 |
|
| 22 |
shocks; |
| 23 |
var eps; |
| 24 |
periods 1 10; |
| 25 |
values 1 -1; |
| 26 |
end; |
| 27 |
|
| 28 |
perfect_foresight_setup(periods=20); |
| 29 |
perfect_foresight_solver(lmmcp); |
| 30 |
|
| 31 |
if ~oo_.deterministic_simulation.status |
| 32 |
error('Perfect foresight simulation failed') |
| 33 |
end |
| 34 |
|
| 35 |
if any(oo_.endo_simul < 1) |
| 36 |
error('y>1 constraint not enforced') |
| 37 |
end |