- java.lang.Object
-
- org.logicng.solvers.maxsat.algorithms.MaxSAT
-
- org.logicng.solvers.maxsat.algorithms.WBO
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.logicng.solvers.maxsat.algorithms.MaxSAT
MaxSAT.MaxSATResult, MaxSAT.ProblemType, MaxSAT.Stats
-
-
Field Summary
Fields Modifier and Type Field Description protected LNGIntVectorassumptionsprotected SortedMap<Integer,Integer>coreMappingprotected Set<Pair<Integer,Integer>>duplicatedSymmetryClausesprotected LNGIntVectorindexSoftCoreprotected intnbCurrentSoftprotected PrintStreamoutputprotected LNGVector<LNGIntVector>relaxationMappingprotected LNGVector<LNGIntVector>softMappingprotected MiniSatStyleSolversolverprotected intsymmetryBreakingLimitprotected booleansymmetryStrategyprotected MaxSATConfig.WeightStrategyweightStrategy
-
Constructor Summary
Constructors Constructor Description WBO()Constructs a new solver with default values.WBO(MaxSATConfig config)Constructs a new solver with a given configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidencodeEO(LNGIntVector lits)protected intfindNextWeight(int weight)protected intfindNextWeightDiversity(int weight)protected MaxSAT.MaxSATResultnormalSearch()protected MiniSatStyleSolverrebuildHardSolver()protected MiniSatStyleSolverrebuildWeightSolver(MaxSATConfig.WeightStrategy strategy)protected voidrelaxCore(LNGIntVector conflict, int weightCore, LNGIntVector assumps)MaxSAT.MaxSATResultsearch()The main MaxSAT solving method.protected voidsymmetryBreaking()StringtoString()protected MaxSAT.MaxSATResultweightSearch()-
Methods inherited from class org.logicng.solvers.maxsat.algorithms.MaxSAT
addHardClause, addSoftClause, addSoftClause, computeCostModel, currentWeight, isBMO, model, newLiteral, newSATSolver, newSATVariable, newVar, nHard, nSoft, nVars, result, saveModel, search, searchSATSolver, searchSATSolver, setCurrentWeight, setProblemType, stats, updateSumWeights
-
-
-
-
Field Detail
-
output
protected final PrintStream output
-
solver
protected MiniSatStyleSolver solver
-
nbCurrentSoft
protected int nbCurrentSoft
-
weightStrategy
protected MaxSATConfig.WeightStrategy weightStrategy
-
assumptions
protected LNGIntVector assumptions
-
symmetryStrategy
protected boolean symmetryStrategy
-
indexSoftCore
protected LNGIntVector indexSoftCore
-
softMapping
protected LNGVector<LNGIntVector> softMapping
-
relaxationMapping
protected LNGVector<LNGIntVector> relaxationMapping
-
symmetryBreakingLimit
protected int symmetryBreakingLimit
-
-
Constructor Detail
-
WBO
public WBO()
Constructs a new solver with default values.
-
WBO
public WBO(MaxSATConfig config)
Constructs a new solver with a given configuration.- Parameters:
config- the configuration
-
-
Method Detail
-
search
public MaxSAT.MaxSATResult search()
Description copied from class:MaxSATThe main MaxSAT solving method.
-
rebuildWeightSolver
protected MiniSatStyleSolver rebuildWeightSolver(MaxSATConfig.WeightStrategy strategy)
-
rebuildHardSolver
protected MiniSatStyleSolver rebuildHardSolver()
-
findNextWeight
protected int findNextWeight(int weight)
-
findNextWeightDiversity
protected int findNextWeightDiversity(int weight)
-
encodeEO
protected void encodeEO(LNGIntVector lits)
-
relaxCore
protected void relaxCore(LNGIntVector conflict, int weightCore, LNGIntVector assumps)
-
symmetryBreaking
protected void symmetryBreaking()
-
weightSearch
protected MaxSAT.MaxSATResult weightSearch()
-
normalSearch
protected MaxSAT.MaxSATResult normalSearch()
-
-