From 2f5541dc7b121d3dafaefc2b75e6833c4470ec17 Mon Sep 17 00:00:00 2001 From: "BERTHET Clement (Externe)" Date: Thu, 14 Mar 2024 16:32:25 +0100 Subject: [PATCH] readBindingConstraints() minor fix to read BC v870 from API --- R/readBindingConstraints.R | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/R/readBindingConstraints.R b/R/readBindingConstraints.R index ce19edcd..4cd4d63c 100644 --- a/R/readBindingConstraints.R +++ b/R/readBindingConstraints.R @@ -157,11 +157,14 @@ readBindingConstraints <- function(opts = simOptions()) { # check path file # multiple path for "both" case - if(!all(file.exists(path_file_value))) - stop("Time series file for binding constraint ", - binding_object$id, - " not exist", - call. = FALSE) + if(opts$typeLoad != "api"){ + if(!all(file.exists(path_file_value))) + stop("Time series file for binding constraint ", + binding_object$id, + " not exist", + call. = FALSE) + } + # Read files # both case