You could try an indicator variable as in The zero lower bound issue in deterministic simulations - #7 by asprilqjs