Breakthrough-Energy / Breakthrough-Energy/PreREISE

Smart LDV: implement functions to load in scaling factors

Open
#303 0 comments 0 reactions 6 assignees Claimed by @victoriahunt View on GitHub
transportation electrification
Dominant language
Jupyter Notebook
Stars
22
Forks
29
PR merge metrics
No merged PRs in 30d

Description

# :rocket:

- [ ] Is your feature request essential for your project?

### Describe the workflow you want to enable
Currently, the smart charging code for light-duty vehicles uses a constant value called `emfacvmt` in order to scale the charging profiles. However, `emfacvmt` needs to be updated so that its value is based on the type of area that the user would like to generate profiles for.

### Describe your proposed implementation, if applicable

Similar to what's already implemented in PR #301 and PR #302, we can create functions `load_urbanized_scaling_factor` and `load_rural_scaling_factor` to load values for urbanized and rural areas in order to generate the appropriate the charging profiles.

Function: `load_urbanized_scaling_factor`

- Load the scaling factor for urbanized areas based on model year and vehicle type for the inputted urbanized area and state.
- Input parameters:
- `int model_year`: year that is being modelled/projected to, 2017, 2030, 2040, 2050.
- `str veh_type`: determine which category (MDV, HDV, or Transit) to produce a fuel efficiency value for.
- `int veh_range`: 100, 200, or 300, represents how far vehicle can travel on single charge.
- `str urbanized_area`: name of urbanized area or city.
- `str state`: the US state the inputted urbanized area is in.
- `str filepath`: the path to the csv.
- Output:
- (*int/float*) -- scaling factor value from the Regional_scaling_factors_UA_{model_year}.csv
- `raises ValueError`: if ``veh_range`` is not 100, 200, or 300 and if ``veh_type`` is not 'LDT', 'LDV', 'MDV', 'HDV', or 'Transit

Function: `load_rural_scaling_factor`

- Load the scaling factor for rural areas based on model year and vehicle type for the inputted state.
- Input parameters:
- `int model_year`: year that is being modelled/projected to, 2017, 2030, 2040, 2050.
- `str veh_type`: determine which category (MDV, HDV, or Transit) to produce a fuel efficiency value for.
- `int veh_range`: 100, 200, or 300, represents how far vehicle can travel on single charge.
- `str state`: the US state the inputted urbanized area is in.
- `str filepath`: the path to the csv.
- Output:
- (*int/float*) -- scaling factor value from the Regional_scaling_factors_RA_{model_year}.csv
- `raises ValueError`: if ``veh_range`` is not 100, 200, or 300 and if ``veh_type`` is not 'LDT', 'LDV', 'MDV', 'HDV', or 'Transit

### Describe alternatives you've considered, if relevant
Open to alternate solutions on how Breakthrough would like to integrate the scaling factors for the charging profiles.

### Additional context

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.