Discrete Modelling of Plasticity and Martensitic Transformations