Hi Giovanni,
There is indeed an equal operator which evaluates to 1 if the equality is satisfied, or 0 otherwise.
For example, you can put this in your model:
- Code: Select all
x = delta*(y == 3);
x=delta when y=3, and x=0 otherwise.
Similarly, you have other comparison operators: != < > <= >=
However note that the use of this only make sense in a deterministic setup where we fully handle the non-linearities.
In a stochastic setup, we make a local approximation around the steady state. So if the steady state doesn't satisfy the equality, the equality will always be unsatisfied in the neighborhood of the steady state, so Dynare will act as if the equality is always unsatisfied. And if the steady state satisfies the equality, then you can't make a local approximation, because you have a singularity at the steady state.
Best,