From 063e2c2c06c3db92ab9b79ddce674aa31603208b Mon Sep 17 00:00:00 2001
From: Marianna Rottoli <marianna.rottoli@mail.polimi.it>
Date: Tue, 24 Mar 2020 13:49:37 +0100
Subject: [PATCH] Added new expected dependencies to calls of functions from
 edgeTrpLib.

---
 scripts/iterative/EDGE_transport.R | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/iterative/EDGE_transport.R b/scripts/iterative/EDGE_transport.R
index 4c399c0..71ea2a8 100644
--- a/scripts/iterative/EDGE_transport.R
+++ b/scripts/iterative/EDGE_transport.R
@@ -116,7 +116,8 @@ if (file.exists(datapath("demand_previousiter.RDS"))) {
   stations = readRDS(datapath("stations.RDS"))
   ## calculate non fuel costs for technologies subjected to learning and merge the resulting values with the historical values
   nonfuel_costs = merge(nonfuel_costs, unique(int_dat[, c("iso", "vehicle_type")]), by = c("iso", "vehicle_type"), all.y = TRUE)
-  nonfuel_costs = applylearning(non_fuel_costs, gdx, REMINDmapping, EDGE2teESmap, demand_BEVtmp, ES_demandpr)
+  rebates_febates = EDGEscenarios[options== "rebates_febates", switch]
+  nonfuel_costs = applylearning(non_fuel_costs, gdx, REMINDmapping, EDGE2teESmap, demand_BEVtmp, ES_demandpr, rebates_febates = rebates_febates)
   saveRDS(nonfuel_costs, "nonfuel_costs_learning.RDS")
 } else {
   stations = NULL
@@ -178,7 +179,8 @@ if (inconvenience) {
     logit_params = logit_params,
     intensity_data = int_dat,
     price_nonmot = price_nonmot,
-    stations = if (!is.null(stations)) stations)
+    stations = if (!is.null(stations)) stations,
+    techswitch = techswitch)
 
 } else{
 
-- 
GitLab