- java.lang.Object
-
- org.logicng.solvers.maxsat.algorithms.MaxSATConfig.Builder
-
- Enclosing class:
- MaxSATConfig
public static class MaxSATConfig.Builder extends Object
The builder for a MaxSAT configuration.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaxSATConfig.Builderbmo(boolean bmo)Enables BMO (Boolean Multilevel Optimization).MaxSATConfigbuild()Builds the configuration.MaxSATConfig.Buildercardinality(MaxSATConfig.CardinalityEncoding card)Sets the cardinality encoding.MaxSATConfig.Builderincremental(MaxSATConfig.IncrementalStrategy inc)Sets the incremental strategy.MaxSATConfig.Builderlimit(int lim)Sets the symmetry limit.MaxSATConfig.Builderoutput(PrintStream output)Sets the output stream for logging information.MaxSATConfig.Buildersolver(MaxSATConfig.SolverType solver)Sets the underlying solver type.MaxSATConfig.Buildersymmetry(boolean symm)Enables symmetry handling.MaxSATConfig.Builderverbosity(MaxSATConfig.Verbosity verb)Sets the verbosity.MaxSATConfig.Builderweight(MaxSATConfig.WeightStrategy weight)Sets the weight strategy.
-
-
-
Method Detail
-
incremental
public MaxSATConfig.Builder incremental(MaxSATConfig.IncrementalStrategy inc)
Sets the incremental strategy. The default value isNONE.- Parameters:
inc- the incremental strategy- Returns:
- the builder
-
cardinality
public MaxSATConfig.Builder cardinality(MaxSATConfig.CardinalityEncoding card)
Sets the cardinality encoding. The default value isTOTALIZER.- Parameters:
card- the cardinality encoding- Returns:
- the builder
-
weight
public MaxSATConfig.Builder weight(MaxSATConfig.WeightStrategy weight)
Sets the weight strategy. The default value isNONE.- Parameters:
weight- the weight strategy- Returns:
- the builder
-
solver
public MaxSATConfig.Builder solver(MaxSATConfig.SolverType solver)
Sets the underlying solver type. The default value isGLUCOSE.- Parameters:
solver- the underlying solver type- Returns:
- the builder
-
symmetry
public MaxSATConfig.Builder symmetry(boolean symm)
Enables symmetry handling. The default value istrue.- Parameters:
symm- {code true} if symmetry handling should be activated,falseotherwise- Returns:
- the builder
-
limit
public MaxSATConfig.Builder limit(int lim)
Sets the symmetry limit. The default value isInteger.MAX_VALUE.- Parameters:
lim- the symmetry limit- Returns:
- the builder
-
bmo
public MaxSATConfig.Builder bmo(boolean bmo)
Enables BMO (Boolean Multilevel Optimization). The default value istrue.- Parameters:
bmo- {code true} if BMO should be activated,falseotherwise- Returns:
- the builder
-
verbosity
public MaxSATConfig.Builder verbosity(MaxSATConfig.Verbosity verb)
Sets the verbosity. The default value isNONE. If you set the verbosity toSOMEyou have also to set an output stream.- Parameters:
verb- the verbosity level- Returns:
- the builder
-
output
public MaxSATConfig.Builder output(PrintStream output)
Sets the output stream for logging information. The default istSystem.out.- Parameters:
output- the output stream for logging information- Returns:
- the builder
-
build
public MaxSATConfig build()
Builds the configuration.- Returns:
- the configuration.
-
-