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

move reading in REMIND fuel costs to mrtransport #311

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
bring back option to set gdx path in EDGE Transport SA
  • Loading branch information
fbenke-pik committed Dec 13, 2024
commit 28d996ec69abad7a5e84c235873adacff6c6c4ec
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '42559986'
ValidationKey: '42568470'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message: If you use this software, please cite it using the metadata from this f
type: software
title: 'edgeTransport: Prepare EDGE Transport Data for the REMIND model'
version: 2.12.1
date-released: '2024-12-09'
date-released: '2024-12-13'
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Date: 2024-12-09
Date: 2024-12-13
Config/testthat/edition: 3
Imports:
rmndt,
Expand Down
3 changes: 3 additions & 0 deletions R/calcEdgeTransportSA.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#' @param transportPolScen EDGE-T transport policy scenario
#' @param isICEban optional enabling of ICE ban
#' @param demScen Demand scenario, used to apply reduction factors on total demands from the regression
#' @param gdxPath Path to a GDX file to load price signals from a REMIND run
#' @param outputFolder Path to folder for storing output data
#' @param isStored Optional saving of intermediate RDS files
#' @param isTransportReported Optional transport reporting in MIF format
Expand All @@ -23,6 +24,7 @@ calcEdgeTransportSA <- function(SSPscen,
transportPolScen,
isICEban = FALSE,
demScen = "default",
gdxPath = NULL,
outputFolder = NULL,
isStored = FALSE,
isTransportReported = TRUE,
Expand All @@ -35,6 +37,7 @@ calcEdgeTransportSA <- function(SSPscen,
transportPolScen,
isICEban,
demScen,
gdxPath,
outputFolder,
isStored,
isTransportReported,
Expand Down
5 changes: 4 additions & 1 deletion R/toolEdgeTransportSA.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#' @param transportPolScen EDGE-T transport policy scenario
#' @param isICEban optional enabling of ICE ban
#' @param demScen Demand scenario, used to apply reduction factors on total demands from the regression
#' @param gdxPath Path to a GDX file to load price signals from a REMIND run
#' @param outputFolder Path to folder for storing output data
#' @param isStored Optional saving of intermediate RDS files
#' @param isTransportReported Optional transport reporting in MIF format
Expand All @@ -24,6 +25,7 @@ toolEdgeTransportSA <- function(SSPscen,
transportPolScen,
isICEban = FALSE,
demScen = "default",
gdxPath = NULL,
outputFolder = NULL,
isStored = TRUE,
isTransportReported = TRUE,
Expand All @@ -45,7 +47,7 @@ toolEdgeTransportSA <- function(SSPscen,
########################################################
if (is.null(outputFolder) & isStored) stop("Please provide an outputfolder to store your results")

inputs <- toolLoadInputs(SSPscen, transportPolScen, demScen, hybridElecShare)
inputs <- toolLoadInputs(SSPscen, transportPolScen, demScen, gdxPath, hybridElecShare)

helpers <- inputs$helpers
genModelPar <- inputs$genModelPar
Expand Down Expand Up @@ -224,6 +226,7 @@ toolEdgeTransportSA <- function(SSPscen,
SSPscen = SSPscen,
transportPolScen = transportPolScen,
demScen = demScen,
gdxPath = gdxPath,
hybridElecShare = hybridElecShare,
histPrefs = histPrefs,
fleetSizeAndComposition = fleetSizeAndComposition,
Expand Down
5 changes: 3 additions & 2 deletions R/toolLoadInputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#' @param SSPscen SSP or SDP scenario
#' @param transportPolScen EDGE-T transport policy scenario
#' @param demScen Demand scenario, used to apply reduction factors on total demands from the regression
#' @param gdxPath Path to a GDX file to load price signals from a REMIND run
#' @param hybridElecShare Share of electricity in Hybrid electric vehicles
#' @returns list with different input data sets
#' @import data.table
#' @export

toolLoadInputs <- function(SSPscen, transportPolScen, demScen, hybridElecShare) {
toolLoadInputs <- function(SSPscen, transportPolScen, demScen, gdxPath, hybridElecShare) {

### load inputs ------------------------------------------------------------

Expand Down Expand Up @@ -47,7 +48,7 @@ toolLoadInputs <- function(SSPscen, transportPolScen, demScen, hybridElecShare)
mrdriversData <- toolLoadmrdriversData(SSPscen, helpers)

## from REMIND
REMINDfuelCosts <- toolLoadREMINDfuelCosts(gdxPath = NULL, hybridElecShare, helpers)
REMINDfuelCosts <- toolLoadREMINDfuelCosts(gdxPath, hybridElecShare, helpers)

# from mrremind (soon to be replaced by mrtransport data)
mrremindData <- toolLoadmrremindData(helpers)
Expand Down
3 changes: 3 additions & 0 deletions man/EdgeTransportSA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/toolEdgeTransportSA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/toolLoadInputs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading