5#include "LocalSearchInterface.hpp"
10#include "yalsat/yals.h"
20 YalSat(
int _id,
unsigned long flipsLimit,
unsigned long maxNoise);
32 void setPhase(
const unsigned int var,
const bool phase);
38 void addClauses(
const std::vector<ClauseExchangePtr>& clauses);
52 friend int yalsat_terminate(
void* p_YalSat);
58 std::atomic<bool> terminateSolver;
61 unsigned long clausesCount;
64 unsigned long m_flipsLimit;
67 unsigned long m_maxNoise;
Interface for Local Search solvers.
Definition LocalSearchInterface.hpp:32
Implements LocalSearchInterface to interact with the YalSAT local search solver.
Definition YalSat.hpp:18
void setPhase(const unsigned int var, const bool phase)
Set initial phase for a given variable.
void addClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of permanent clauses to the formula.
void loadFormula(const char *filename)
Load formula from a given dimacs file.
void addInitialClauses(const std::vector< simpleClause > &clauses, unsigned int nbVars)
Add a list of initial clauses to the formula.
void printStatistics()
Print solver statistics.
int getDivisionVariable()
Get a variable suitable for search splitting.
void unsetSolverInterrupt()
Remove the SAT solving interrupt request.
void addClause(ClauseExchangePtr clause)
Add a permanent clause to the formula.
void setSolverInterrupt()
Interrupt resolution, solving cannot continue until interrupt is unset.
unsigned int getVariablesCount()
Get the current number of variables.
std::vector< int > getModel()
Return the model in case of SAT result.
SatResult solve(const std::vector< int > &cube)
Solve the formula with a given cube.
void diversify(const SeedGenerator &getSeed)
Perform native diversification. The Default lambda returns the solver ID.
void printParameters()
Print the parameters set for a solver.
SatResult
Enumeration for SAT solver results.
Definition SolverInterface.hpp:39