Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.DS_Store
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ We provide two methods to access location data:
```python
from watttime import WattTimeMaps

wt = WattTimeMaps(username, password)
wt = WattTimeMaps()

# get BA region for a given location
wt.region_from_loc(
Expand All @@ -144,3 +144,17 @@ wt.region_from_loc(
# get shape files for all regions of a signal type
wt.get_maps_json('co2_moer')
```

# Optimizer Package

[Optimizer Read Me](https://github.com/jbadsdata/watttime-python-client/blob/5780c09e1a7aaae0bc9746cd0004c64c263ead1f/watttime_optimizer/Optimizer%20README.md)

WattTime data users use WattTime electricity grid-related data for real-time, evidence-based emissions reduction strategies.

The [WattTimeOptimizer](https://github.com/jbadsdata/watttime-python-client/tree/b45fd677cb38ec8e9095b1e4a53f5bb43383820b/watttime_optimizer) is an experimental feature designed to support the rapid development of automated emissions reduction (“AER”) software applications. It produces a proposed power usage schedule that minimizes carbon emissions subject to user and device constraints.

The feature has four basic requirements: Watttime’s forecast of marginal emissions (MOER) for a particular region, device capacity and energy needs, project usage window start time and projected window end time. The [underlying algorithms](https://github.com/jbadsdata/watttime-python-client/tree/b45fd677cb38ec8e9095b1e4a53f5bb43383820b/watttime_optimizer/alg) are simple enough to serve as a base for set of predefined use cases, outlined in the Optimizer Read Me, and mature enough to extend to encompass the requirements of more complex machinery.

Get started by reviewing example notebooks [here](https://github.com/jbadsdata/watttime-python-client/tree/b45fd677cb38ec8e9095b1e4a53f5bb43383820b/watttime_optimizer/notebooks).


4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
version="v1.2.1",
packages=["watttime"],
packages=["watttime","watttime_optimizer"],
python_requires=">=3.8",
install_requires=["requests", "pandas>1.0.0", "python-dateutil"],
install_requires=["requests", "pandas>1.0.0", "python-dateutil","tqdm"],
)
Empty file added tests/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions tests/test_battery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from watttime_optimizer.battery import Battery, CARS
import pandas as pd

tesla_charging_curve = pd.DataFrame(
columns=["SoC", "kW"],
data = CARS['tesla']
)

capacity_kWh = 70
initial_soc = .50

batt = Battery(tesla_charging_curve)

df = batt.get_usage_power_kw_df(capacity_kWh=capacity_kWh, initial_soc=initial_soc)

print(df.head())
Loading