Varexo_det to simulate random shocks during a predetermined period

I am trying to define a deterministic variable in a stochastic RBC model by declaring a varexo_det BB. The objective is to simulate TFP shocks during a predetermined period. This is done by setting BB=1 or BB=0 for certain predetermined periods.

GDP is given by:
y = Aexp(BBz)k(-1)^alphah^(1-alpha);

The process for z is given by:
z = rhoz(-1) + stddeveps_t;

BB=1 for t=1:20 and BB=0 otherwise:

shocks;
var eps_t; // Stochastic shock, defined with varexo
stderr 1;

var BB;     // Deterministic shock, defined with varexo_det
periods 1:20;
values 1;

end;

stoch_simul(periods=200,irf=0);

However, oo_.exo_det_simul=0 for all periods and all variables are equal to their steady state values for all periods in the simulation.

I am sending the mod file attached, RBC01.mod. What should be changed to implement the predetermined shocks to BB? Is there another way to implement this kind of predetermined shocks combined with stochastic simulations?
RBC01.mod (1.5 KB)

This might be a bug. But it will take some time to look into this in detail. You can keep track at https://github.com/DynareTeam/dynare/issues/1603

Thank you for your attention. Best