Statistics of avalanches in martensitic transformations. II. Modeling.