-
Notifications
You must be signed in to change notification settings - Fork 239
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
make chp fuel flexible #1392
base: master
Are you sure you want to change the base?
make chp fuel flexible #1392
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed change makes sense. Some code style, documentation to be improved and a bug to be addressed before merging.
scripts/prepare_sector_network.py
Outdated
efficiency3=costs.at["gas", "CO2 intensity"], | ||
lifetime=costs.at["central gas CHP", "lifetime"], | ||
) | ||
fuel_type = options["chp"]["fuel_type"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be added to config.default.yaml
and documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have added this PR as draft. Just wanted to put it there that it is still on my to do.
But now I already addressed your comments.
scripts/prepare_sector_network.py
Outdated
if not isinstance(fuel_type, list): | ||
fuel_type = [fuel_type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not isinstance(fuel_type, list): | |
fuel_type = [fuel_type] | |
fuel_type = np.atleast_1d(fuel_type) |
this is a nice shorthand for such things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
scripts/prepare_sector_network.py
Outdated
if not isinstance(fuel_type, list): | ||
fuel_type = [fuel_type] | ||
for fuel in fuel_type: | ||
fuel_nodes = eval(f"spatial.{fuel}.df") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The eval()
is a bit extravagant. Let's use something like getattr(spatial, fuel).df
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bus3="co2 atmosphere", | ||
carrier="urban central CHP", | ||
p_nom_extendable=True, | ||
capital_cost=costs.at["central gas CHP", "fixed"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release note and documentation of the config setting for the fuel types should state that the same costs as for gas CHP are used for all fuels! This might be a strong assumption, which is fine for now but we might want to revisit this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
scripts/prepare_sector_network.py
Outdated
) | ||
n.madd( | ||
"Link", | ||
nodes + " urban central gas CHP CC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodes + " urban central gas CHP CC", | |
nodes + f" urban central {fuel} CHP CC", |
Bug! Gas CHP CC is added multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
prepare_sector_network: adress Fabians comments docs: add new config settings to doc
one thing we should still add is to check if all urban central heat buses exist. similar to #1407 Edit: not needed here, because |
Validator ReportI am the Validator. Download all artifacts here. ❗ Run failed!Download 'logs' artifact to see more details.
Model Metrics Comparing |
Changes proposed in this Pull Request
Allows you to define multiple fuels in config for which chps are added
Checklist
envs/environment.yaml
.config/config.default.yaml
.doc/configtables/*.csv
.doc/data_sources.rst
.doc/release_notes.rst
is added.