Thermodynamic investigations of optimum active magnetic regenerators