From ed1ac1aa8781205d99403c293dd41d062cf8536f Mon Sep 17 00:00:00 2001 From: Abdoulbari Zaher <32519851+a-zakir@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:45:46 +0100 Subject: [PATCH] use only area file in Benders (#960) adequacy_criterion --> outerloop area file -->Benders --- src/cpp/benders/factories/BendersFactory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/benders/factories/BendersFactory.cpp b/src/cpp/benders/factories/BendersFactory.cpp index b776abc1c..b416dbe03 100644 --- a/src/cpp/benders/factories/BendersFactory.cpp +++ b/src/cpp/benders/factories/BendersFactory.cpp @@ -183,7 +183,9 @@ BendersMainFactory::ProcessCriterionInput() { const auto fpath = std::filesystem::path(options_.INPUTROOT) / options_.OUTER_LOOP_OPTION_FILE; // if adequacy_criterion.yml is provided read it - if (std::filesystem::exists(fpath)) { + if ((method_ == BENDERSMETHOD::BENDERS_OUTERLOOP || + method_ == BENDERSMETHOD::BENDERS_BY_BATCH_OUTERLOOP) && + std::filesystem::exists(fpath)) { return Benders::Criterion::OuterLoopInputFromYaml().Read(fpath); } // else compute criterion for all areas!