Hysteresis modeling of two-way shape memory effect in NiTi alloys