org.sat4j.tools.encoding
Class Commander
java.lang.Object
org.sat4j.tools.encoding.EncodingStrategyAdapter
org.sat4j.tools.encoding.Commander
public class Commander
- extends EncodingStrategyAdapter
The case "at most one" is introduced in W. Klieber and G. Kwon
"Efficient CNF encoding for selecting 1 from N objects" in Fourth Workshop on
Constraints in Formal Verification, 2007.
The generalization to the "at most k" case is described in A. M. Frisch and P
. A. Giannaros, "SAT Encodings of the At-Most-k Constraint", in International
Workshop on Modelling and Reformulating Constraint Satisfaction Problems,
2010
- Since:
- 2.3.1
- Author:
- sroussel
Commander
public Commander()
addAtMostOne
public IConstr addAtMostOne(ISolver solver,
IVecInt literals)
throws ContradictionException
- In this encoding, variables are partitioned in groups. Kwon and Klieber
claim that the fewest clauses are produced when the size of the groups is
3, thus leading to 3.5 clauses and introducing n/2 variables.
- Overrides:
addAtMostOne
in class EncodingStrategyAdapter
- Throws:
ContradictionException
addAtMost
public IConstr addAtMost(ISolver solver,
IVecInt literals,
int degree)
throws ContradictionException
- Overrides:
addAtMost
in class EncodingStrategyAdapter
- Throws:
ContradictionException
Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.