An energy storage system for a building includes a battery asset configured to store electricity and discharge the stored electricity for use in satisfying a building electric load. The system includes a planning tool configured to identify one or more selected functionalities of the energy storage system and generate a cost function defining a cost of operating the energy storage system over an optimization period. The cost function includes a term for each of the selected functionalities. The planning tool is configured to generate optimization constraints based on the selected functionalities, attributes of the battery asset, and the electric energy load to be satisfied. The planning tool is configured to optimize the cost function to determine optimal power setpoints for the battery asset at each of a plurality of time steps of the optimization period.