3#include "solvers/CDCL/SolverCdclInterface.hpp"
4#include "solvers/LocalSearch/LocalSearchInterface.hpp"
9using IDScaler = std::function<unsigned(
const std::shared_ptr<SolverInterface>&)>;
28 std::shared_ptr<SolverInterface>& createdSolver);
40 std::vector<std::shared_ptr<SolverCdclInterface>>& cdclSolvers,
41 std::vector<std::shared_ptr<LocalSearchInterface>>& localSolvers);
53 std::string portfolio,
54 std::vector<std::shared_ptr<SolverCdclInterface>>& cdclSolvers,
55 std::vector<std::shared_ptr<LocalSearchInterface>>& localSolvers);
62 static void printStats(
const std::vector<std::shared_ptr<SolverCdclInterface>>& cdclSolvers,
63 const std::vector<std::shared_ptr<LocalSearchInterface>>& localSolvers);
73 const std::vector<std::shared_ptr<SolverCdclInterface>>& cdclSolvers,
74 const std::vector<std::shared_ptr<LocalSearchInterface>>& localSolvers,
75 const IDScaler& generalIdScaler =
76 [](
const std::shared_ptr<SolverInterface>& solver) {
return solver->getSolverId(); },
77 const IDScaler& typeIdScaler =
78 [](
const std::shared_ptr<SolverInterface>& solver) {
return solver->getSolverTypeId(); });
Factory class for creating and managing SAT solvers.
Definition SolverFactory.hpp:16
static void diversification(const std::vector< std::shared_ptr< SolverCdclInterface > > &cdclSolvers, const std::vector< std::shared_ptr< LocalSearchInterface > > &localSolvers, const IDScaler &generalIdScaler=[](const std::shared_ptr< SolverInterface > &solver) { return solver->getSolverId();}, const IDScaler &typeIdScaler=[](const std::shared_ptr< SolverInterface > &solver) { return solver->getSolverTypeId();})
Applies diversification to a group of solvers.
static void printStats(const std::vector< std::shared_ptr< SolverCdclInterface > > &cdclSolvers, const std::vector< std::shared_ptr< LocalSearchInterface > > &localSolvers)
Prints statistics for a group of solvers.
static SolverAlgorithmType createSolver(char type, char importDBType, std::vector< std::shared_ptr< SolverCdclInterface > > &cdclSolvers, std::vector< std::shared_ptr< LocalSearchInterface > > &localSolvers)
Creates a solver of the specified type and adds it to the appropriate vector.
static std::atomic< int > currentIdSolver
Atomic counter for assigning unique IDs to solvers.
Definition SolverFactory.hpp:84
static SolverAlgorithmType createSolver(char type, char importDbType, std::shared_ptr< SolverInterface > &createdSolver)
Creates a solver of the specified type.
static void createSolvers(int count, char importDBType, std::string portfolio, std::vector< std::shared_ptr< SolverCdclInterface > > &cdclSolvers, std::vector< std::shared_ptr< LocalSearchInterface > > &localSolvers)
Creates multiple solvers based on a portfolio.
SolverAlgorithmType
Enumeration for types of solver algorithms.
Definition SolverInterface.hpp:50