A phenomenological model for microstructure-dependent inelasticity in shape-memory alloys