Optimal capacity of the battery energy storage system in a power system | Synapse