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

Mix4 BEV phase-in adjustment #269

Merged
merged 13 commits into from
Aug 9, 2024
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
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '4005126'
ValidationKey: '4188030'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: 7910e0323d7213f34275a7a562b9ef0fde8ce1b9 # frozen: v0.4.2
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
hooks:
- id: parsable-R
- id: deps-in-desc
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'edgeTransport: Prepare EDGE Transport Data for the REMIND model'
version: 2.0.1
date-released: '2024-07-22'
version: 2.1.0
date-released: '2024-08-08'
abstract: EDGE-T is a fork of the GCAM transport module https://jgcri.github.io/gcam-doc/energy.html#transportation
with a high level of detail in its representation of technological and modal options.
It is a partial equilibrium model with a nested multinomial logit structure and
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: edgeTransport
Title: Prepare EDGE Transport Data for the REMIND model
Version: 2.0.1
Version: 2.1.0
Authors@R: c(
person("Johanna", "Hoppe", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0004-6753-5090")),
Expand All @@ -18,7 +18,7 @@ Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Date: 2024-07-22
Date: 2024-08-08
Config/testthat/edition: 3
Imports:
rmndt,
Expand Down
13 changes: 7 additions & 6 deletions R/toolUpdateEndogenousCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,19 @@ toolUpdateEndogenousCosts <- function(dataEndoCosts,
applyICEban <- function(year, currentMask) {
if (year < 2030){
floorCosts <- currentMask
} else if (year >= 2030 & year <= 2032){
floorCosts <- strangeICEbanFunction(year, 2030, currentMask, 2032, 0.35)
} else if (year == 2030){
floorCosts <- 0.05
} else if (year > 2030 & year <= 2032){
floorCosts <- strangeICEbanFunction(year, 2030, 0.1, 2032, 0.3)
} else if(year > 2032 & year <= 2034){
floorCosts <- strangeICEbanFunction(year, 2032, 0.35, 2034, 0.95)
floorCosts <- strangeICEbanFunction(year, 2032, 0.3, 2034, 0.5)
} else if (year == 2035){
floorCosts <- 0.95
} else {
floorCosts <- 0.6
} else if (year > 2035) {
floorCosts <- 1
}
return(floorCosts)
}

policyMask <- copy(scenParIncoCost)
# Expand regional and temporal resolution
regions <- unique(dataEndoCosts$region)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prepare EDGE Transport Data for the REMIND model

R package **edgeTransport**, version **2.0.1**
R package **edgeTransport**, version **2.1.0**

[![CRAN status](https://www.r-pkg.org/badges/version/edgeTransport)](https://cran.r-project.org/package=edgeTransport) [![R build status](https://github.com/pik-piam/edgeTransport/workflows/check/badge.svg)](https://github.com/pik-piam/edgeTransport/actions) [![codecov](https://codecov.io/gh/pik-piam/edgeTransport/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/edgeTransport) [![r-universe](https://pik-piam.r-universe.dev/badges/edgeTransport)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -46,7 +46,7 @@ In case of questions / problems please contact Johanna Hoppe <johanna.hoppe@pik-

To cite package **edgeTransport** in publications use:

Hoppe J, Dirnaichner A, Rottoli M, Muessel J (2024). _edgeTransport: Prepare EDGE Transport Data for the REMIND model_. R package version 2.0.1, <https://github.com/pik-piam/edgeTransport>.
Hoppe J, Dirnaichner A, Rottoli M, Muessel J (2024). _edgeTransport: Prepare EDGE Transport Data for the REMIND model_. R package version 2.1.0, <https://github.com/pik-piam/edgeTransport>.

A BibTeX entry for LaTeX users is

Expand All @@ -55,7 +55,7 @@ A BibTeX entry for LaTeX users is
title = {edgeTransport: Prepare EDGE Transport Data for the REMIND model},
author = {Johanna Hoppe and Alois Dirnaichner and Marianna Rottoli and Jarusch Muessel},
year = {2024},
note = {R package version 2.0.1},
note = {R package version 2.1.0},
url = {https://github.com/pik-piam/edgeTransport},
}
```
10 changes: 5 additions & 5 deletions inst/extdata/scenParIncoCost.csv
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ SSP2EU;Mix1;LDV|4W;Liquids;targetYear;2027
SSP2EU;Mix1;LDV|4W;Liquids;targetValue;0
SSP2EU;Mix1;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix2;LDV|4W;BEV;startYear;2025
SSP2EU;Mix2;LDV|4W;BEV;startValue;0.5
SSP2EU;Mix2;LDV|4W;BEV;startValue;0.65
SSP2EU;Mix2;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix2;LDV|4W;BEV;targetValue;0.15
SSP2EU;Mix2;LDV|4W;Liquids;startYear;2020
SSP2EU;Mix2;LDV|4W;Liquids;startYear;2023
SSP2EU;Mix2;LDV|4W;Liquids;targetYear;2027
SSP2EU;Mix2;LDV|4W;Liquids;targetValue;0.05
SSP2EU;Mix2;LDV|4W;Liquids;targetValue;0.01
SSP2EU;Mix2;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix3;LDV|4W;BEV;startYear;2025
SSP2EU;Mix3;LDV|4W;BEV;startValue;0.5
Expand All @@ -297,12 +297,12 @@ SSP2EU;Mix3;LDV|4W;Liquids;targetYear;2045
SSP2EU;Mix3;LDV|4W;Liquids;targetValue;0.7
SSP2EU;Mix3;LDV|4W;Hybrid electric;ratioPHEV;0.5
SSP2EU;Mix4;LDV|4W;BEV;startYear;2025
SSP2EU;Mix4;LDV|4W;BEV;startValue;0.5
SSP2EU;Mix4;LDV|4W;BEV;startValue;1
SSP2EU;Mix4;LDV|4W;BEV;targetYear;2035
SSP2EU;Mix4;LDV|4W;BEV;targetValue;0
SSP2EU;Mix4;LDV|4W;Liquids;startYear;2023
SSP2EU;Mix4;LDV|4W;Liquids;targetYear;2055
SSP2EU;Mix4;LDV|4W;Liquids;targetValue;1.5
SSP2EU;Mix4;LDV|4W;Liquids;targetValue;0.1
SSP2EU;Mix4;LDV|4W;Hybrid electric;ratioPHEV;1.5
SSP2EU;NAV_act;LDV|4W;BEV;startYear;2025
SSP2EU;NAV_act;LDV|4W;BEV;startValue;0.5
Expand Down