This paper addresses the marking optimization of stochastic timed even
t graphs, where the transition firing times are generated by random va
riables with general distributions. The marking optimization problem c
onsists of obtaining a given cycle time while minimizing a p-invariant
criterion. We propose two heuristic algorithms, both starting from th
e optimal solution to the associated deterministic problem and iterati
vely adding tokens to adequate places as long as the given cycle time
is not obtained. Infinitesimal perturbation analysis of the average cy
cle time with respect to the transition firing times is used to identi
fy the appropriate places in which new tokens are added at each iterat
ion. Numerical results show that the heuristic algorithms provide solu
tions better than the ones obtained by the existing methods.