Optimal configuration of modular cogeneration plants integrated by a battery energy storage system providing peak shaving service