Problem with discretionary monetary policy

Hi professor,
I am trying to replicate a model in which the central bank uses reserves to buy much of government bonds (QE policy under ZLB conditions)
Following Chadha and Corrado(2021), the QE monetary policy by assuming that the central bank adopted the following countercyclical feedback rule with the size of reserves, rt, as the policy variable.
Policy function is:
image
How can I model this policy with Dynare?
Thanks a lot in advance!
Readqpost

Given the occasionally binding constraint, you may have to use OCCBIN in Dynare 5.0