A generalized visco-plasticity model and its algorithmic implementation