In a numerical study, we consider the Allen–Cahn equation with a double-obstacle constraint. The constraint is a multivalued function that is provided by the subdi erential of the indicator function on a closed interval. Therefore, performing a numerical simulation of our problem poses diffculties. We propose a new approximate method for the constraint and demonstrate its validity. Moreover, we present stability criteria for the standard forward Euler method guaranteeing stable numerical experiments when using the approximating equation.