A lattice model of structural and dislocation transformations