See how AMS utilizes Gurobi to efficiently allocate power within their analytics platform, taking under consideration forecast demand, physical, and economic constraints.

### Power Generation Can Be Unpredictable

The San Onofre Nuclear Generating Station is a nuclear power plant located south of San Clemente, California, just outside of Los Angeles. The nuclear plant opened in 1968 and, due to its close proximity to several active tectonic faults, posed a danger to the eight million people living within the 50-mile radius of the plant. This would not be allowed in today’s highly regulated environment, but in 1968, the safety regulations that governed the locations of nuclear power plants were scant. In 2009, the plant’s reactors received an upgrade designed to last 20 years. However, after the Fukushima disaster in Japan, new regulations in January 2012 ultimately forced the shutdown of the San Onofre site in 2013.

This closure meant that roughly 2,000 MW of power generation capacity was taken offline, creating a 20% power shortage to large portions of Southern California, with no obvious location for a replacement of capacity.

### How to Efficiently Allocate Power Capacity: Advanced Microgrid Solutions (AMS)

Advanced Microgrid Solutions won 90 MWs of contracts to build energy storage systems for grid support in Southern California to help obviate the power supply issues created by the closure of San Onofre. AMS started in 2012 with a focus on the design and management of energy storage systems at host customer sites. The customer base consists of many large consumers of power, such as manufacturing plants, large office buildings and water/wastewater treatment facilities.

AMS receives revenue through two sources: 1. their share in the savings obtained by the host customer, 2. from signed contracts with utility companies to provide capacity for the grid. The basic business model for power storage is simply to buy low and sell high. AMS charges batteries by purchasing power from the grid when demand (and price) are low and discharges batteries to feed power to the grid when demand is high.

Customers pay for electric power based on both total energy consumed and their peak demand. Electric tariffs are complicated with as many as 10 to 20 different rates at any one time. Batteries can modify demand profiles by significantly reducing peak demand and shifting demand from high-cost periods to low-cost periods.

### Problem Statement

Advanced Microgrid Solutions won 90 MWs of contracts to build energy storage systems for grid support in Southern California to help obviate the power supply issues created by the closure of San Onofre. AMS started in 2012 with a focus on the design and management of energy storage systems at host customer sites. The customer base consists of many large consumers of power, such as manufacturing plants, large office buildings and water/wastewater treatment facilities.

### AMS Economic Model

Now, when overall grid demand is high, the utility company pays AMS to provide reserve capacity. The utility company can request power from AMS up to 150 times per year and ask for up to 90MW of power with 20 minutes notice.

## Optimization Opportunity

The efficient allocation of power can be formulated as an optimization problem, where there are two decisions to be made:

1. When to charge batteries, and
2. When to discharge batteries.

This problem is complex because there are complicated tariffs and multiple revenue streams. The optimization problem was formulated as a time-series network flow problem using forecast demand to model outflow. The optimization model has two types of constraints: physical constraints and economic constraints. The physical constraints comprise constraints for battery power and energy balance, and net export rules. The economic constraints entail constraints for host customer tariff interpretation, utility dispatch performance, and market product prices. Finally, the objective function of the optimization model is to maximize net present value of owning and operating the portfolio of battery assets.

The mathematical optimization model makes recommendations at 15-minute intervals and considers demand forecasts one or two weeks in advance. This yields a model with approximately 600,000 variables, which is the main source of difficulty. Another challenge of this model is the piecewise-linear costs. It would be ideal to introduce a stochastic component into the model to make it more robust, however the current deterministic model is quite difficult to solve. Introducing stochastic programming would increase its complexity tremendously.

Three employees (Andrew Martinez, Corey Noone, Kate Knox) from AMS developed the mathematical optimization model. Their backgrounds are in mechanical engineering and economics, and they had limited formal training in mathematical optimization from graduate school. As part of their work, they learned mathematical optimization on their own, and found it straightforward to build the optimization model and solve it using Gurobi.

In addition, the AMS team chose Gurobi because of:

• The Python Interface
• “The Gurobi Python modeling extensions greatly simplify the process of developing our optimization models. They work well as a part of our software stack.”
– Andrew Martinez, Lead Analyst, AMS
• Gurobi Support
• “We’ve had great experiences interacting with the Gurobi team. Gurobi provides us with the robust, reliable, and efficient solver we need to solve large problems frequently.”
– Corey Noone, Director of Data Science and Optimization, AMS

### Results

Gurobi Optimization is a key enabler of the AMS energy analytics platform. This platform uses energy consumption data, retail and wholesale energy prices, carbon intensity and efficiency metrics to create a diagnostic energy profile for each facility. The AMS optimization model is solved with the Gurobi Optimizer to optimize resource scenarios using best-in-class energy storage, on-site generation, load control technologies and various utility tariffs to identify maximum efficiency, savings and revenue opportunities. The AMS platform, using Gurobi Optimizer, optimizes energy resources in real time at the facility level and fleet level across portfolios. Combining real-time energy usage and market data with the power of advanced energy storage gives portfolio managers control over energy costs like no other energy management platform on the market today.

A typical customer spends $10K-$100K per month on power. The optimization capabilities of the AMS analytics platform are a key enabler that brings a 5-10% reduction in a customer’s power bill. Also, AMS provides significant added redundancy to the overall electrical power grid with no need to build additional generation capacity.

Currently, AMS operates in Los Angeles. It has a new project in Maine, and it is raising funding for projects in Australia and the UK. Japan is also likely to adopt AMS technology in the future.