Skip to content

Commit

Permalink
Merge branch 'develop' into feature/test-new-outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir authored Nov 8, 2024
2 parents a863482 + 48e1474 commit d9e4449
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeGraphVizOptions.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(GRAPHVIZ_GENERATE_PER_TARGET FALSE)
set(GRAPHVIZ_IGNORE_TARGETS ".*test.*")
set(GRAPHVIZ_EXTERNAL_LIBS FALSE)
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,10 @@ endif ()
#version file to define Xpansion and Antares-simulator versions
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/python/antares_xpansion/__version__.py.in ${CMAKE_CURRENT_SOURCE_DIR}/src/python/antares_xpansion/__version__.py)
include(CPack)

add_custom_target(graphviz
COMMAND ${CMAKE_COMMAND} "--graphviz=xpansion.dot" .
COMMAND dot -Tsvg xpansion.dot -o xpansion.svg
COMMAND dot -Tpng xpansion.dot -o xpansion.png
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
4 changes: 3 additions & 1 deletion src/cpp/benders/factories/BendersFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit d9e4449

Please sign in to comment.