Skip to content

Commit

Permalink
Merge pull request #104 from thegridelectric/dev
Browse files Browse the repository at this point in the history
v 0.4.0 - first pass Simple Resistive Hydronic Flo
  • Loading branch information
jessicamillar authored Jul 6, 2023
2 parents af41041 + a1c246d commit 3949ede
Show file tree
Hide file tree
Showing 64 changed files with 3,374 additions and 1,438 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ __pycache__/
.env
venv

# scratch files and folders
# scratch files, folders and dev sqlite3 databases
scratch*
cook*
*.sqlite3


# Code generation airtable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ from gwatn.enums.</xsl:text>
</xsl:for-each>
<xsl:text>

# hacks
from gwatn.enums.hack_price_method import PriceMethod
from gwatn.enums.hack_recognized_p_node_alias import RecognizedPNodeAlias
from gwatn.enums.hack_weather_method import WeatherMethod
from gwatn.enums.hack_weather_source import WeatherSource

__all__ = [</xsl:text>
<xsl:for-each select="$airtable//ProtocolEnums/ProtocolEnum[(normalize-space(ProtocolName) ='gwatn') or (normalize-space(ProtocolName) ='gwproto') or (normalize-space(ProtocolName) ='gridworks')]">
Expand All @@ -95,6 +100,10 @@ __all__ = [</xsl:text>
</xsl:for-each>
</xsl:for-each>
<xsl:text>
"PriceMethod",
"RecognizedPNodeAlias",
"WeatherMethod",
"WeatherSource",
]

</xsl:text>
Expand Down
31 changes: 31 additions & 0 deletions docs/apis/json/atn-outside-temp-regr-coeffs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"gwapi": "001",
"type_name": "atn.outside.temp.regr.coeffs",
"version": "000",
"owner": "[email protected]",
"description": ". Coefficients for a linear regression of avg power leaving a building as a function of weather: PowerOut = Alpha + Beta * OutsideTempF These are an example of Slowly Varying State variables maintained for a thermal storage heating Terminal Asset by its AtomicTNode and Scada.",
"url": "https://gridworks-atn.readthedocs.io/en/latest/data-categories.html#slowly-varying-state-variables",
"properties": {
"Alpha": {
"type": "integer",
"title": "Alpha (units: W)",
"required": true
},
"Beta": {
"type": "number",
"title": "Beta (units: W / deg F) ",
"required": true
},
"TypeName": {
"type": "string",
"value": "atn.outside.temp.regr.coeffs.000",
"title": "The type name"
},
"Version": {
"type": "string",
"title": "The type version",
"default": "000",
"required": true
}
}
}
20 changes: 15 additions & 5 deletions docs/apis/json/atn-params-simpleresistivehydronic.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"const": "2127aba6",
"title": "VersantA1StorageHeatTariff",
"url": "https://github.com/thegridelectric/gridworks-ps/blob/dev/input_data/electricity_prices/isone/distp__w.isone.stetson__2022__gw.me.versant.a1.res.ets.csv",
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). Alternately known as the 'Home Eco Rate With Bonus Meter, Time-of-Use.' Look for rate A1 in Versant [rate schedules](https://www.versantpower.com/residential/rates/rates-schedules/); details are also available [here](https://drive.google.com/drive/u/0/folders/1mhIeNj2JWVyIJrQnSHmBDOkBpNnRRVKB). More: Service under this rate will be available to residential customers with thermal energy storage devices, electric battery storage devices, and/or vehicle chargers who agree to install a second metered point of delivery. The customer will be subject to inspections to ensure that the thermal storage device, electric battery storage device, and electric vehicle charger(s) are sized appropriately for residential use. If the thermal storage device, electric battery storage device, and electric vehicle charger(s) do not pass Company inspection, then the service will be denied. Service will be single-phase, alternating current, 60 hertz, at one standard secondary distribution voltage. Customers taking service under this rate schedule are responsible for paying both Distribution Service and Stranded Cost."
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). Alternately known as the 'Home Eco Rate With Bonus Meter, Time-of-Use.' Look for rate A1 in Versant [rate schedules](https://www.versantpower.com/residential/rates/rates-schedules/); details are also available [here](https://drive.google.com/drive/u/0/folders/1mhIeNj2JWVyIJrQnSHmBDOkBpNnRRVKB). More: Service under this rate will be available to residential customers with thermal energy storage devices, electric battery storage devices, and/or vehicle chargers who agree to install a second metered point of delivery. The customer will be subject to inspections to ensure that the thermal storage device, electric battery storage device, and electric vehicle charger(s) are sized appropriately for residential use. If the thermal storage device, electric battery storage device, and electric vehicle charger(s) do not pass Company inspection, then the service will be denied. Service will be single-phase, alternating current, 60 hertz, at one standard secondary distribution voltage. Customers taking service under this rate schedule are responsible for paying both Distribution Service and Stranded Cost. See attached csv for instantiation of this rate as an 8760."
},
{
"const": "ea5c675a",
Expand All @@ -36,7 +36,7 @@
{
"const": "54aec3a7",
"title": "VersantA20HeatTariff",
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). This is an alternative tariff available for electric heat."
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). This is an alternative tariff available for electric heat."
}
]
},
Expand Down Expand Up @@ -140,7 +140,7 @@
"title": "",
"required": true
},
"DistributionTariffDollarsPerMwh": {
"FlatDistributionTariffDollarsPerMwh": {
"type": "integer",
"title": "",
"required": true
Expand All @@ -165,12 +165,12 @@
"title": "",
"required": true
},
"FixedPumpGpm": {
"CirculatorPumpGpm": {
"type": "number",
"title": "",
"required": true
},
"ReturnWaterFixedDeltaT": {
"ReturnWaterDeltaTempF": {
"type": "integer",
"title": "",
"required": true
Expand All @@ -195,6 +195,16 @@
"title": "",
"required": true
},
"StorePassiveLossRatio": {
"type": "number",
"title": "",
"required": true
},
"AmbientTempStoreF": {
"type": "integer",
"title": "",
"required": true
},
"TypeName": {
"type": "string",
"value": "atn.params.simpleresistivehydronic.000",
Expand Down
123 changes: 115 additions & 8 deletions docs/apis/json/flo-params-simpleresistivehydronic.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@
}
},
"enums": {
"DistributionTariff000": {
"type": "string",
"name": "distribution.tariff.000",
"description": "Name of distribution tariff of local network company/utility",
"oneOf": [
{
"const": "00000000",
"title": "Unknown",
"description": ""
},
{
"const": "2127aba6",
"title": "VersantA1StorageHeatTariff",
"url": "https://github.com/thegridelectric/gridworks-ps/blob/dev/input_data/electricity_prices/isone/distp__w.isone.stetson__2022__gw.me.versant.a1.res.ets.csv",
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). Alternately known as the 'Home Eco Rate With Bonus Meter, Time-of-Use.' Look for rate A1 in Versant [rate schedules](https://www.versantpower.com/residential/rates/rates-schedules/); details are also available [here](https://drive.google.com/drive/u/0/folders/1mhIeNj2JWVyIJrQnSHmBDOkBpNnRRVKB). More: Service under this rate will be available to residential customers with thermal energy storage devices, electric battery storage devices, and/or vehicle chargers who agree to install a second metered point of delivery. The customer will be subject to inspections to ensure that the thermal storage device, electric battery storage device, and electric vehicle charger(s) are sized appropriately for residential use. If the thermal storage device, electric battery storage device, and electric vehicle charger(s) do not pass Company inspection, then the service will be denied. Service will be single-phase, alternating current, 60 hertz, at one standard secondary distribution voltage. Customers taking service under this rate schedule are responsible for paying both Distribution Service and Stranded Cost. See attached csv for instantiation of this rate as an 8760."
},
{
"const": "ea5c675a",
"title": "VersantATariff",
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). The A Tariff is their standard residential tariff. Look for rate A in Versant [rate schedules](https://www.versantpower.com/residential/rates/rates-schedules/)"
},
{
"const": "54aec3a7",
"title": "VersantA20HeatTariff",
"description": "Versant is a utility serving customers in Maine, and in particular serves much of the area behind the Keene Rd Constraint in the [GridWorks Millinocket Demo](https://gridworks.readthedocs.io/en/latest/millinocket-demo.html#background). This is an alternative tariff available for electric heat."
}
]
},
"RecognizedCurrencyUnit000": {
"type": "string",
"name": "recognized.currency.unit.000",
Expand All @@ -38,6 +66,28 @@
"description": "Pounds sterling"
}
]
},
"EnergySupplyType000": {
"type": "string",
"name": "energy.supply.type.000",
"description": "",
"oneOf": [
{
"const": "00000000",
"title": "Unknown",
"description": ""
},
{
"const": "cb18f937",
"title": "StandardOffer",
"description": ""
},
{
"const": "e9dc99a6",
"title": "RealtimeLocalLmp",
"description": ""
}
]
}
},
"properties": {
Expand Down Expand Up @@ -88,6 +138,11 @@
"title": "",
"required": true
},
"StorageSteps": {
"type": "integer",
"title": "",
"required": true
},
"StoreSizeGallons": {
"type": "integer",
"title": "",
Expand All @@ -98,7 +153,7 @@
"title": "",
"required": true
},
"ElementMaxPowerKw": {
"RatedPowerKw": {
"type": "number",
"title": "",
"required": true
Expand All @@ -108,27 +163,52 @@
"title": "",
"required": true
},
"FixedPumpGpm": {
"CirculatorPumpGpm": {
"type": "number",
"title": "",
"required": true
},
"ReturnWaterFixedDeltaT": {
"ReturnWaterDeltaTempF": {
"type": "integer",
"title": "",
"required": true
},
"SliceDurationMinutes": {
"RoomTempF": {
"type": "integer",
"title": "",
"required": true
},
"AmbientPowerInKw": {
"type": "number",
"title": "",
"required": true
},
"HouseWorstCaseTempF": {
"type": "number",
"title": "",
"required": true
},
"StorePassiveLossRatio": {
"type": "number",
"title": "",
"required": true
},
"PowerLostFromHouseKwList": {
"type": "number",
"title": "",
"required": true
},
"OutsideTempF": {
"AmbientTempStoreF": {
"type": "integer",
"title": "",
"required": true
},
"SliceDurationMinutes": {
"type": "integer",
"title": "",
"required": true
},
"RealtimeElectricityPrice": {
"type": "number",
"title": "",
"required": true
Expand All @@ -138,7 +218,7 @@
"title": "",
"required": true
},
"RealtimeElectricityPrice": {
"OutsideTempF": {
"type": "number",
"title": "",
"required": true
Expand All @@ -149,13 +229,13 @@
"title": "",
"required": true
},
"WeatherUid": {
"DistPriceUid": {
"type": "string",
"format": "UuidCanonicalTextual",
"title": "",
"required": true
},
"DistPriceUid": {
"WeatherUid": {
"type": "string",
"format": "UuidCanonicalTextual",
"title": "",
Expand All @@ -167,6 +247,33 @@
"title": "",
"required": true
},
"Tariff": {
"type": "string",
"format": "DistributionTariff000",
"title": "",
"required": true
},
"EnergyType": {
"type": "string",
"format": "EnergySupplyType000",
"title": "",
"required": true
},
"StandardOfferPriceDollarsPerMwh": {
"type": "integer",
"title": "",
"required": true
},
"FlatDistributionTariffDollarsPerMwh": {
"type": "integer",
"title": "",
"required": true
},
"StartingStoreIdx": {
"type": "integer",
"title": "",
"required": true
},
"TypeName": {
"type": "string",
"value": "flo.params.simpleresistivehydronic.000",
Expand Down
4 changes: 4 additions & 0 deletions docs/apis/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ AtnBid
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: json/atn-bid.json

AtnOutsideTempRegrCoeffs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: json/atn-outside-temp-regr-coeffs.json

AtnParams
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: json/atn-params.json
Expand Down
12 changes: 12 additions & 0 deletions docs/data-categories.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Data Categories
================


Slowly Varying State Variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This refers to state variables for a TerminalAsset that are likely to stay the
same day-to-day but still are likely to change during normal lifecycle operations.

A good example is the linear regression coefficients used for predicting building
heat loss as a function of weather.
12 changes: 12 additions & 0 deletions docs/hello-atn.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
Hello AtomicTNode
=================

AtomicTNodes intro - what they are, what they do.

Walk through the tutorial using an open-source demo strategy for what we call a simple
resistive hydronic heating system. This code emakes some simplifying assumptions that
one would want to adjust for better performance in the field, but captures many of
the core functional concepts of an AtomicTNode operating for a thermal storage
asset that is indeed an appropriate part of the mix for a high renewables future.

.. image:: images/simple-resistive-hydronic.png
:alt: Simple Resistive Hydronic model
:align: center
Binary file added docs/images/simple-resistive-hydronic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ Installation
:caption: Code Support

Hello AtomicTNode <hello-atn>
Brick Storage Heater model <brick-storage-heater>
Forward Looking Optimization <flo>
Simple Scada Simulation <simple-sim-scada>
Lexicon <https://gridworks.readthedocs.io/en/latest/lexicon.html>
Lexicon <lexicon>


.. toctree::
Expand Down
14 changes: 14 additions & 0 deletions docs/lexicon.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GridWorks Atn lexicon
---------------------

See `GridWorks Lexicon <https://gridworks.readthedocs.io/en/latest/lexicon.html>`_.

.. toctree::
:hidden:
:maxdepth: 2
:caption: Participate
Brick Storage Heater strategy <brick-storage-heater>
Data Categories <data-categories>
Forward Looking Optimization <flo>
Simple Resistive Hydronic strategy <simple-resistive-hydronic>
Simple Scada Simulation <simple-sim-scada>
Loading

0 comments on commit 3949ede

Please sign in to comment.