Generic Energy Storage System Represents an Energy Storage System consisting of a Battery-Inverter and a Battery. Source Code