A rate-independent model for permanent inelastic effects in shape memory materials