- java.lang.Object
-
- org.logicng.solvers.maxsat.algorithms.MaxSAT
-
- org.logicng.solvers.maxsat.algorithms.WMSU3
-
public class WMSU3 extends MaxSAT
The weighted MSU3 algorithm.- Since:
- 1.0
- Version:
- 2.1.0
-
-
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 LNGBooleanVectoractiveSoftprotected LNGIntVectorassumptionsprotected LNGIntVectorcoeffsprotected SortedMap<Integer,Integer>coreMappingprotected Encoderencoderprotected MaxSATConfig.IncrementalStrategyincrementalStrategyprotected LNGIntVectorobjFunctionprotected PrintStreamoutputprotected MiniSatStyleSolversolver
-
Constructor Summary
Constructors Constructor Description WMSU3()Constructs a new solver with default values.WMSU3(MaxSATConfig config)Constructs a new solver with a given configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitRelaxation()protected MaxSAT.MaxSATResultiterative()protected MaxSAT.MaxSATResultiterativeBmo()protected MaxSAT.MaxSATResultnone()protected MiniSatStyleSolverrebuildSolver()MaxSAT.MaxSATResultsearch()The main MaxSAT solving method.protected static booleansubsetSum(LNGIntVector set, int sum)StringtoString()-
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
-
encoder
protected final Encoder encoder
-
incrementalStrategy
protected final MaxSATConfig.IncrementalStrategy incrementalStrategy
-
assumptions
protected final LNGIntVector assumptions
-
objFunction
protected final LNGIntVector objFunction
-
coeffs
protected final LNGIntVector coeffs
-
activeSoft
protected final LNGBooleanVector activeSoft
-
output
protected final PrintStream output
-
solver
protected MiniSatStyleSolver solver
-
-
Constructor Detail
-
WMSU3
public WMSU3()
Constructs a new solver with default values.
-
WMSU3
public WMSU3(MaxSATConfig config)
Constructs a new solver with a given configuration.- Parameters:
config- the configuration
-
-
Method Detail
-
subsetSum
protected static boolean subsetSum(LNGIntVector set, int sum)
-
search
public MaxSAT.MaxSATResult search()
Description copied from class:MaxSATThe main MaxSAT solving method.
-
iterative
protected MaxSAT.MaxSATResult iterative()
-
none
protected MaxSAT.MaxSATResult none()
-
iterativeBmo
protected MaxSAT.MaxSATResult iterativeBmo()
-
rebuildSolver
protected MiniSatStyleSolver rebuildSolver()
-
initRelaxation
protected void initRelaxation()
-
-