Text this: Numerical methods of simulation and optimization of piecewise deterministic Markov processes :