Simulation of the CMS Resistive Plate Chambers