Battery storage in and out management