Skip to content

Commit

Permalink
create sub-folder in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Nov 24, 2024
1 parent 382cc89 commit 54b77cb
Show file tree
Hide file tree
Showing 27 changed files with 61 additions and 59 deletions.
1 change: 1 addition & 0 deletions lib/src/mixed-integer/modeling/models/Dualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "idol/mixed-integer/modeling/expressions/operations/operators.h"
#include "idol/mixed-integer/modeling/constraints/TempQCtr.h"
#include "idol/mixed-integer/modeling/variables/TempVar.h"
#include <cassert>

idol::Dualizer::Dualizer(const idol::Model &t_parent,
const QuadExpr<Var, double> &t_primal_objective,
Expand Down
5 changes: 1 addition & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,4 @@ file(COPY ${CMAKE_SOURCE_DIR}/tests/data DESTINATION ${CMAKE_BINARY_DIR}/tests/)
file(COPY ${CMAKE_SOURCE_DIR}/tests/data DESTINATION ${CMAKE_BINARY_DIR}/) # Necessary for GitHub Actions

# Define tests
add_subdirectory(modeling)
add_subdirectory(wrappers)
add_subdirectory(branch-and-bound)
add_subdirectory(branch-and-price)
add_subdirectory(mixed-integer)
4 changes: 4 additions & 0 deletions tests/mixed-integer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
add_subdirectory(branch-and-bound)
add_subdirectory(branch-and-price)
add_subdirectory(modeling)
add_subdirectory(wrappers)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ foreach (OPTIMIZER ${AVAILABLE_MILP_SOLVERS})

add_executable(${target_name}
knapsack.cpp
../cartesian_product.h
../../cartesian_product.h
)

target_compile_definitions(${target_name} PRIVATE OPTIMIZER=${OPTIMIZER})
Expand All @@ -20,7 +20,7 @@ foreach (OPTIMIZER ${AVAILABLE_MILP_SOLVERS})

add_executable(${target_name}
location.cpp
../cartesian_product.h
../../cartesian_product.h
)

target_compile_definitions(${target_name} PRIVATE OPTIMIZER=${OPTIMIZER})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include <catch2/catch_all.hpp>
#include "../cartesian_product.h"
#include "../../cartesian_product.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/DepthFirst.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/BreadthFirst.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/BestBound.h"
Expand All @@ -14,13 +14,13 @@
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/UniformlyRandom.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/StrongBranching.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/PseudoCost.h"
#include <idol/modeling.h>
#include <idol/mixed-integer/problems/knapsack-problem/KP_Instance.h>
#include <idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h>
#include <idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h>
#include <idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h>
#include <idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h>
#include <idol/mixed-integer/optimizers/wrappers/Osi/Osi.h>
#include "idol/modeling.h"
#include "idol/mixed-integer/problems/knapsack-problem/KP_Instance.h"
#include "idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h"
#include "idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h"
#include "idol/mixed-integer/optimizers/wrappers/Osi/Osi.h"

using namespace Catch::literals;
using namespace idol;
Expand Down Expand Up @@ -60,7 +60,7 @@ TEMPLATE_LIST_TEST_CASE("Solve Knapsack Problem instances with different node se
);
const auto subtree_depth = GENERATE(0, 1);

const auto instance = read_instance("../data/knapsack-problem/" + filename);
const auto instance = read_instance("../../data/knapsack-problem/" + filename);
const unsigned int n_items = instance.n_items();

auto x = Var::make_vector(env, Dim<1>(n_items), 0., 1., Binary, 0., "x");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include <catch2/catch_all.hpp>
#include "../cartesian_product.h"
#include "../../cartesian_product.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/DepthFirst.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/BreadthFirst.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/BestBound.h"
Expand All @@ -14,13 +14,13 @@
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/UniformlyRandom.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/StrongBranching.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/PseudoCost.h"
#include <idol/modeling.h>
#include <idol/mixed-integer/problems/facility-location-problem/FLP_Instance.h>
#include <idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h>
#include <idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h>
#include <idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h>
#include <idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h>
#include <idol/mixed-integer/optimizers/wrappers/Osi/Osi.h>
#include "idol/modeling.h"
#include "idol/mixed-integer/problems/facility-location-problem/FLP_Instance.h"
#include "idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h"
#include "idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h"
#include "idol/mixed-integer/optimizers/wrappers/Osi/Osi.h"

using namespace Catch::literals;
using namespace idol;
Expand Down Expand Up @@ -64,7 +64,7 @@ TEMPLATE_LIST_TEST_CASE("Solve Facility Location Problem instances with differen
const auto subtree_depth = GENERATE(0, 1);

// Read instance
const auto instance = read_instance_1991_Cornuejols_et_al("../data/facility-location-problem/" + filename);
const auto instance = read_instance_1991_Cornuejols_et_al("../../data/facility-location-problem/" + filename);
const unsigned int n_customers = instance.n_customers();
const unsigned int n_facilities = instance.n_facilities();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ foreach (OPTIMIZER ${AVAILABLE_MILP_SOLVERS})

add_executable(${target_name}
assignment.cpp
../cartesian_product.h
../../cartesian_product.h
)

target_compile_definitions(${target_name} PRIVATE OPTIMIZER=${OPTIMIZER})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include <catch2/catch_all.hpp>
#include "../cartesian_product.h"
#include "../../cartesian_product.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/node-selection-rules/factories/BestBound.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/BranchAndBound.h"
#include "idol/mixed-integer/optimizers/branch-and-bound/branching-rules/factories/MostInfeasible.h"
Expand All @@ -12,13 +12,13 @@
#include "idol/mixed-integer/optimizers/dantzig-wolfe/infeasibility-strategies/FarkasPricing.h"
#include "idol/mixed-integer/optimizers/dantzig-wolfe/stabilization/Neame.h"
#include "idol/mixed-integer/optimizers/dantzig-wolfe/infeasibility-strategies/ArtificialCosts.h"
#include <idol/modeling.h>
#include <idol/mixed-integer/problems/generalized-assignment-problem/GAP_Instance.h>
#include <idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h>
#include <idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h>
#include <idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h>
#include <idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h>
#include <idol/mixed-integer/optimizers/wrappers/Osi/Osi.h>
#include "idol/modeling.h"
#include "idol/mixed-integer/problems/generalized-assignment-problem/GAP_Instance.h"
#include "idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h"
#include "idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h"
#include "idol/mixed-integer/optimizers/wrappers/Osi/Osi.h"

using namespace Catch::literals;
using namespace idol;
Expand Down Expand Up @@ -47,7 +47,7 @@ TEST_CASE("Solve Generalized Assignment Problem instances with different branch-
const auto subtree_depth = GENERATE(0, 1);
const auto solver_index = GENERATE(0, 1, 2);

const auto instance = read_instance("../data/generalized-assignment-problem/" + filename);
const auto instance = read_instance("../../data/generalized-assignment-problem/" + filename);
const unsigned int n_agents = instance.n_agents();
const unsigned int n_jobs = instance.n_jobs();

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by henri on 31/01/23.
//
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by henri on 30/11/22.
//
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by henri on 30/11/22.
//
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifdef IDOL_USE_EIGEN

#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Optimizers_Gurobi.h"
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include "idol/modeling.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Created by henri on 22.10.23.
//
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include <idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h>
#include <idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h>
#include <idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h>
#include <idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h>
#include <idol/mixed-integer/optimizers/wrappers/Osi/Osi.h>
#include "idol/modeling.h"
#include "idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h"
#include "idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h"
#include "idol/mixed-integer/optimizers/wrappers/Osi/Osi.h"

using namespace Catch::literals;
using namespace idol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Created by henri on 22.10.23.
//
#include <catch2/catch_all.hpp>
#include <idol/modeling.h>
#include <idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h>
#include <idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h>
#include <idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h>
#include <idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h>
#include <idol/mixed-integer/optimizers/wrappers/Osi/Osi.h>
#include "idol/modeling.h"
#include "idol/mixed-integer/optimizers/wrappers/GLPK/GLPK.h"
#include "idol/mixed-integer/optimizers/wrappers/Mosek/Mosek.h"
#include "idol/mixed-integer/optimizers/wrappers/Gurobi/Gurobi.h"
#include "idol/mixed-integer/optimizers/wrappers/HiGHS/HiGHS.h"
#include "idol/mixed-integer/optimizers/wrappers/Osi/Osi.h"

using namespace Catch::literals;
using namespace idol;
Expand Down

0 comments on commit 54b77cb

Please sign in to comment.