Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for 'biomass' and 'other' generators #71

Merged
merged 2 commits into from
Dec 16, 2019
Merged
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
14 changes: 7 additions & 7 deletions powersimdata/input/change_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class ChangeTable(object):
grid as well as to the original demand, hydro, solar and wind profiles.
A pickle file enclosing the change table in form of a dictionary can be
created and transferred on the server. Keys are *'demand'*, *'branch'*,
*'coal'*, *'dfo'*, *'geothermal'*, *'ng'*, *'nuclear'*, *'hydro'*,
*'solar'*, *'wind'* and *'storage'*. If a key is missing in the
dictionary, then no changes will be applied. The data structure is
given below:
*'biomass'*, *'coal'*, *'dfo'*, *'geothermal'*, *'ng'*, *'nuclear'*,
*'hydro'*, *'solar'*, *'wind'*, *'other'*, and *'storage'*.
If a key is missing in the dictionary, then no changes will be applied.
The data structure is given below:

* *'demand'*:
value is a dictionary. The latter has *'zone_id'* as keys and a
Expand All @@ -28,8 +28,8 @@ class ChangeTable(object):
desired increase/decrease of capacity of the line or the lines in
the zone (1.2 would correspond to a 20% increase while 0.95 would
be a 5% decrease).
* *'coal'*, *'dfo'*, *'geothermal'*, *'ng'*, *'nuclear'*, *'hydro'*,
*'solar'*, and *'wind'*:
* *'biomass'*, *'coal'*, *'dfo'*, *'geothermal'*, *'ng'*, *'nuclear'*,
*'hydro'*, *'solar'*, *'wind'*, and *'other'*:
value is a dictionary. The latter has *'plant_id'* and/or
*'zone_id'* as keys. The *'plant_id'* dictionary has the plant ids
as keys while the *'zone_id'* dictionary has the zone ids as keys.
Expand Down Expand Up @@ -65,7 +65,7 @@ def _check_resource(resource):
"""
possible = [
'coal', 'dfo', 'geothermal', 'ng', 'nuclear',
'hydro', 'solar', 'wind']
'hydro', 'solar', 'wind', 'biomass', 'other']
if resource not in possible:
print("-----------------------")
print("Possible Generator type")
Expand Down
6 changes: 5 additions & 1 deletion powersimdata/input/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class Grid(object):
5: 'coal',
6: 'geothermal',
7: 'dfo',
8: 'storage'}
8: 'biomass',
9: 'other',
10: 'storage'}

type2id = {v: k for k, v in id2type.items()}

Expand All @@ -29,6 +31,8 @@ class Grid(object):
'coal': sns.xkcd_rgb["light brown"],
'geothermal': sns.xkcd_rgb["hot pink"],
'dfo': sns.xkcd_rgb["royal blue"],
'biomass': sns.xkcd_rgb["dark green"],
'other': sns.xkcd_rgb["melon"],
'storage': sns.xkcd_rgb["orange"]}

def __init__(self, interconnect):
Expand Down
3 changes: 2 additions & 1 deletion powersimdata/input/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class Scaler(object):
"""

_gen_types = [
'coal', 'dfo', 'geothermal', 'ng', 'nuclear', 'hydro', 'solar', 'wind']
'biomass', 'coal', 'dfo', 'geothermal', 'ng', 'nuclear', 'hydro',
'solar', 'wind', 'other']
_thermal_gen_types = ['coal', 'dfo', 'geothermal', 'ng', 'nuclear']

def __init__(self, scenario_info, ssh_client):
Expand Down