- java.lang.Object
-
- org.logicng.solvers.maxsat.algorithms.MaxSAT
-
- org.logicng.solvers.maxsat.algorithms.WBO
-
- org.logicng.solvers.maxsat.algorithms.IncWBO
-
public class IncWBO extends WBO
Incremental WBO solver.- 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 Encoderencoderprotected booleanfirstBuildprotected LNGBooleanVectorincSoftprotected PrintStreamoutput-
Fields inherited from class org.logicng.solvers.maxsat.algorithms.WBO
assumptions, coreMapping, duplicatedSymmetryClauses, indexSoftCore, nbCurrentSoft, relaxationMapping, softMapping, solver, symmetryBreakingLimit, symmetryStrategy, weightStrategy
-
-
Constructor Summary
Constructors Constructor Description IncWBO()Constructs a new solver with default values.IncWBO(MaxSATConfig config)Constructs a new solver with a given configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intincComputeCostModel(LNGBooleanVector currentModel)protected voidincrementalBuildWeightSolver(MaxSATConfig.WeightStrategy strategy)protected MaxSAT.MaxSATResultnormalSearch()protected voidrelaxCore(LNGIntVector conflict, int weightCore)MaxSAT.MaxSATResultsearch()The main MaxSAT solving method.protected voidsymmetryBreaking()StringtoString()protected MaxSAT.MaxSATResultweightSearch()-
Methods inherited from class org.logicng.solvers.maxsat.algorithms.WBO
encodeEO, findNextWeight, findNextWeightDiversity, rebuildHardSolver, rebuildWeightSolver, relaxCore
-
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
-
incSoft
protected final LNGBooleanVector incSoft
-
output
protected final PrintStream output
-
firstBuild
protected boolean firstBuild
-
-
Constructor Detail
-
IncWBO
public IncWBO()
Constructs a new solver with default values.
-
IncWBO
public IncWBO(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.
-
incrementalBuildWeightSolver
protected void incrementalBuildWeightSolver(MaxSATConfig.WeightStrategy strategy)
-
relaxCore
protected void relaxCore(LNGIntVector conflict, int weightCore)
-
symmetryBreaking
protected void symmetryBreaking()
- Overrides:
symmetryBreakingin classWBO
-
weightSearch
protected MaxSAT.MaxSATResult weightSearch()
- Overrides:
weightSearchin classWBO
-
incComputeCostModel
protected int incComputeCostModel(LNGBooleanVector currentModel)
-
normalSearch
protected MaxSAT.MaxSATResult normalSearch()
- Overrides:
normalSearchin classWBO
-
-