From cec32ef0ad2d951e5b8dab609ac95352a340a49f Mon Sep 17 00:00:00 2001 From: Nekmek7 Date: Thu, 30 May 2024 11:05:40 +0200 Subject: [PATCH] Change for readInputRES maatrix default --- R/readInputClusters.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/readInputClusters.R b/R/readInputClusters.R index 4a612aa9..6c756a34 100644 --- a/R/readInputClusters.R +++ b/R/readInputClusters.R @@ -222,9 +222,10 @@ readInputRES <- function(areas = "all", mid <- .importInputTS(cl, timeStep, opts, filePattern, "production", inputTimeStep = "hourly", type = "matrix") if (is.null(mid)){ - timeId_value <- 1:8736 - tsId_value <- replicate(8736,1) - production_value <- replicate(8736,0) + nb_rows_ts <- opts$timeIdMax + timeId_value <- seq(1,nb_rows_ts) + tsId_value <- replicate(nb_rows_ts,1) + production_value <- replicate(nb_rows_ts,0) mid <- data.table("timeId" = timeId_value, "tsId" = tsId_value, "production" = production_value) } mid$area <- x