Getting Started
Installing Electric Emissions & Costs (EEC)
For most users, the first step to using EEC will be to pip install the Python package:
pip install electric-emission-cost
Core Functionality
The EEC package has three main functions:
calculate the electricity bill of a facility given a tariff and user consumption data.
calculate the Scope 2 emissions implications given grid emissions and user consumption data.
incorporate flexibility metrics (e.g., round-trip efficiency) as a constraint or objective.
These functions can be performed in three different modes:
numpy
CVXPY
Pyomo
More information about how to correctly format data inputs can be found in How to Format Data.
Sample Model: Battery Optimization
Besides the core functionality and utility functions, a simple electric battery model (Pyomo) is included as an example.
The model uses a linear program to minimize the electricity cost of a facility + battery subject to the baseline power consumption of the facility, dynamic constraints associated with battery charging and discharging, and the rules of the electricity tariff.
This example is not intended to be a comprehensive model of battery dynamics, but rather a illustrate how to use the electric-emission-cost
package in within and outside of an optimization problem.
The model file is located in the examples
directory, and can be run with the following command after installing in editable mode:
.. code-block:: bash
python examples/battery_optimization.py
A full walkthrough of this example is available in the Jupyter notebook within the github repository at examples/example_pyomo_jupyter.ipynb
.