Simulation of Chemical Reactions Using Stochastic Petri Nets