- java.lang.Object
-
- org.logicng.solvers.maxsat.algorithms.MaxSAT
-
- org.logicng.solvers.maxsat.algorithms.LinearUS
-
public class LinearUS extends MaxSAT
Linear search 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 MaxSATConfig.IncrementalStrategyincrementalStrategyprotected LNGIntVectorobjFunctionprotected PrintStreamoutputprotected MiniSatStyleSolversolver
-
Constructor Summary
Constructors Constructor Description LinearUS()Constructs a new solver with default values.LinearUS(MaxSATConfig config)Constructs a new solver with a given configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitRelaxation()protected MaxSAT.MaxSATResultiterative()protected MaxSAT.MaxSATResultnone()protected MiniSatStyleSolverrebuildSolver()MaxSAT.MaxSATResultsearch()The main MaxSAT solving method.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
-
objFunction
protected final LNGIntVector objFunction
-
output
protected final PrintStream output
-
solver
protected MiniSatStyleSolver solver
-
-
Constructor Detail
-
LinearUS
public LinearUS()
Constructs a new solver with default values.
-
LinearUS
public LinearUS(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.
-
none
protected MaxSAT.MaxSATResult none()
-
iterative
protected MaxSAT.MaxSATResult iterative()
-
rebuildSolver
protected MiniSatStyleSolver rebuildSolver()
-
initRelaxation
protected void initRelaxation()
-
-