-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature uncontrolled vs controlled charging #338
Feature uncontrolled vs controlled charging #338
Conversation
for more information, see https://pre-commit.ci
…com/adrienmellot/euro-calliope into feature-uncontrolled-charging-share
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.
A few comments to address
Snakefile
Outdated
@@ -98,7 +99,7 @@ rule all_tests: | |||
|
|||
|
|||
rule dummy_tech_locations_template: # needed to provide `techs_and_locations_template` with a locational CSV linked to each technology that has no location-specific data to define. | |||
message: "Create empty {wildcards.resolution} location-specific data file for the {wildcards.tech_group} tech `{wildcards.tech}`." | |||
message: "Create empty {wildcards.resolution} location-specific data file for the {wildcards.tech_group} tech `{wildcards.tech}`." # Not used only if ruleorder is updated at top of file |
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.
Maybe update to: Update ruleorder at the top of the file if you instead want the techs_and_locations_template rule to be used to generate a file
config/default.yaml
Outdated
@@ -162,6 +162,7 @@ parameters: | |||
coaches-and-buses: Motor coaches, buses and trolley buses | |||
passenger-cars: Passenger cars | |||
motorcycles: Powered 2-wheelers | |||
uncontrolled-charging-share: 0.5 |
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.
uncontrolled-charging-share: 0.5 | |
uncontrolled-ev-charging-share: 0.5 |
rules/transport.smk
Outdated
@@ -1,7 +1,7 @@ | |||
"""Rules to process transport sector data.""" | |||
|
|||
|
|||
rule download_transport_timeseries: | |||
rule download_transport_timeseries: # TODO have correct timeseries data once RAMP has generated the new charging profile and it's been put on Zenodo |
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.
Add the TODO on the line below. Makes it easier to read
rules/transport.smk
Outdated
script: "../scripts/transport/road_transport_timeseries.py" | ||
|
||
|
||
use rule create_road_transport_timeseries as create_road_transport_timeseries_historic_electrification with: | ||
message: "Create timeseries for historic electrified road transport demand" | ||
use rule create_uncontrolled_road_transport_timeseries as create_unctronolled_road_transport_timeseries_historic_electrification with: |
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.
spelling
rules/transport.smk
Outdated
"build/data/transport/timeseries/timeseries-coaches-and-buses.csv", | ||
"build/data/transport/timeseries/timeseries-passenger-cars.csv", | ||
"build/data/transport/timeseries/timeseries-motorcycles.csv"), | ||
"build/data/transport/timeseries/timeseries-uncontrolled-light-duty-vehicles.csv", |
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.
Turn this into a for loop that uses the keys from the config to decide what needs to be built.
.sub(total_historically_electrified_distance.rename("value"), fill_value=0) | ||
.to_csv(snakemake.output.road_distance_uncontrolled) | ||
) | ||
road_distance_historically_electrified = ( # ASSUME historically electrified road consumption is all uncontrolled |
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.
put comment in its own line (above)
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.
I haven't looked, but how close is this to a copy-paste of the uncontrolled
python file? If it is very similar, we should consider using the two files with a controlled/uncontrolled flag that decides on the functions to use etc.
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.
It's fairly different, because the uncontrolled
scripts generate timeseries per vehicle type which are then aggregated and rescaled per resolution. This last step is similar but still different because contains different data structures. The controlled
script is actually closer to the rescale.py
in the heat sector.
for more information, see https://pre-commit.ci
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.
Need to also update docs customisation.md
note "demand/electrified-transport.yaml"
locations: | ||
{% for id, location in locations.iterrows() %} | ||
{{ id }}.techs.demand_road_transport_electrified: | ||
{{ id }}.techs.demand_road_transport_historic_electrified: | ||
{{ id }}.techs.demand_road_transport_electrified_uncontrolled: |
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 controlled tech here too. I'd maybe update to:
{{ id }}.techs:
demand_road_transport_electrified_uncontrolled:
demand_road_transport_historic_electrified_uncontrolled:
demand_road_transport_electrified_controlled:
parent: supply | ||
carrier: electricity | ||
constraints: | ||
resource: file=demand/road-transport-historic-electrification.csv | ||
resource: file=demand/uncontrolled-road-transport-historic-electrification.csv | ||
resource_min_use: 1 |
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 this be "force_resource"?
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.
I've updated it, indeed I think it makes more sense
for more information, see https://pre-commit.ci
…com/adrienmellot/euro-calliope into feature-uncontrolled-charging-share
…ontrolled-charging-share Feature uncontrolled vs controlled charging Co-authored by: Francesco Sanvito sanvitofrancesco@gmail.com
…ontrolled-charging-share Feature uncontrolled vs controlled charging Co-authored by: Francesco Sanvito sanvitofrancesco@gmail.com
…ontrolled-charging-share Feature uncontrolled vs controlled charging Co-authored by: Francesco Sanvito sanvitofrancesco@gmail.com
This PR does not fix any issue but is a step towards fixing #274 , #273 , #81 .
This separates fully electrified road transport demand into a controlled part (for now, as an annual demand to be met without any constraints), and an uncontrolled part (as a fixed timeseries profile). This share is a parameter to be decided by in the config file.
To note:
Co-authored by: Francesco Sanvito sanvitofrancesco@gmail.com
Checklist
Any checks which are not relevant to the PR can be pre-checked by the PR creator. All others should be checked by the reviewer. You can add extra checklist items here if required by the PR.