Large-scale energy storage grid profit analysis code