Unexpected behaviour of the deterministic shock

Dear all,

I am trying to simulate a deterministic model with a dummy variable (i.e DUM) that switches the fiscal policy from a decifit-rule to a debt-rule, from a certain period onward. i.e.:

DUM*(-Pb/y-deficitGDP_target)+(1-DUM)(d/(4y)-debtGDP_target);

The dummy variable, DUM, is declared as an exogenous variable which is set to 1 for the first 100 periods, and then to 0 until steady-state. For this purpose, I am using the shocks block, ie.:

shocks;
var DUM;
periods 1:100 101:1000;
values 1 0;
end;

However, when simulating it, I can see from the oo_.exo_simul that the variable of the DUM is taking a value of 0.5964 for the first 100 periods and not of 1. Could you explain me why this is?
I am using Dynare version 4.6.1 and I attach the .mod file.
CBO_Deficit_calibrated.mod (6.2 KB)

I cannot run your file due to k0 not being defined.

Apologies.
I attach the updated .mod file with the vars properly initialized - it should run with no issues.

Many thanks in advance, Professor Pfeifer.
Mattia
CBO_Deficit_calibrated.mod (6.2 KB)

The setup is correct. But you are taking a look at oo_.exo_simul after perfect_foresight_solver failed. In that case, the contents are at the last unsuccessful step of homotopy.