A one-dimensional modelling of constrained shape memory effect