Do a keyword search on the site for 'vent' or 'depressure', it's been discussed several times.
What's I've done is to do this with a spreadsheet, some simulation programs like Pro/II or Hysys will also do it.
Basically, set up a spreadsheet starting with the initial mass and pressure in the pipeline. Calculate the flow through your vent and therefore, for a given timestep, the mass released. Recalculate the mass in the pipeline and therefore the new pressure and continue. Continue to the end. You can include terms for the gas compressibility and temperature if you want to.